196 {
197 if (!
g_Game.IsDedicatedServer() )
198 {
199 InventoryLocation il = new InventoryLocation;
201
202 }
203
204 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[inv] " +
GetDebugName(
this) +
" STS = " + GetSimulationTimeStamp() +
" ::Take2Hands(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" +
Object.GetDebugName(item));
206
207 InventoryLocation src_item = new InventoryLocation;
208 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
209 {
210 if (itemInHands == null)
211 {
212 InventoryLocation hand_dst = new InventoryLocation;
215 }
217 GetInventory().SwapEntities(mode, itemInHands, item);
219 }
220 }
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void UpdateInventoryMenu()
proto native EntityAI GetEntityInHands()
Returns the current entity in hands.
proto native HumanInventory GetHumanInventory()
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
override string GetDebugName()