203 {
204 if (!
g_Game.IsDedicatedServer() )
205 {
206 InventoryLocation il = new InventoryLocation;
208
209 }
210
211 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[inv] " +
GetDebugName(
this) +
" STS = " + GetSimulationTimeStamp() +
" ::Take2Hands(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" +
Object.GetDebugName(item));
213
214 InventoryLocation src_item = new InventoryLocation;
215 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
216 {
217 if (itemInHands == null)
218 {
219 InventoryLocation hand_dst = new InventoryLocation;
222 }
224 GetInventory().SwapEntities(mode, itemInHands, item);
226 }
227 }
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()