92 {
93 super.OnExecuteClient(action_data);
94
95 PlayerBase player = action_data.m_Player;
96 float stackable;
97 InventoryLocation il;
98
99
100 if ( !player.GetInventory().CanAddEntityIntoHands(
m_Seed ) )
101 {
102 il = action_data.m_ReservedInventoryLocations.Get( 0 );
103 InventoryLocation targetInventoryLocation = new InventoryLocation;
104 m_Seed.GetInventory().GetCurrentInventoryLocation( targetInventoryLocation );
105
107
109 if ( stackable == 0 || stackable >=
m_Seed.GetQuantity() )
110 {
111 player.PredictiveTakeToDst( targetInventoryLocation, il );
112 }
113 else
114 {
115 m_Seed.SplitIntoStackMaxToInventoryLocationClient( il );
116 }
117 }
118 else
119 {
120
122 stackable =
m_Seed.GetTargetQuantityMax( -1 );
123
124 if ( stackable == 0 || stackable >=
m_Seed.GetQuantity() )
125 {
126 action_data.m_Player.PredictiveTakeEntityToHands(
m_Seed );
127 }
128 else
129 {
130 il = new InventoryLocation;
132 m_Seed.SplitIntoStackMaxToInventoryLocationClient( il );
133 }
134 }
135 }
void ClearInventoryReservationEx(ActionData action_data)
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
proto native int GetSlot()
returns slot id if current type is Attachment