30 {
33
34
35 InventoryLocation target_location = new InventoryLocation;
36 if ( target_entity.GetInventory().FindFirstFreeLocationForNewEntity( item_entity.GetType(),
FindInventoryLocationType.ATTACHMENT, target_location ) )
37 {
38 action_data.
m_Player.PredictiveTakeEntityToTargetAttachmentEx( target_entity, item_entity, target_location.
GetSlot() );
39 }
40 }
FindInventoryLocationType
flags for searching locations in inventory
ref ActionTarget m_Target
proto native int GetSlot()
returns slot id if current type is Attachment