DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TakeEntityToHandsImpl()

void EntityAI::TakeEntityToHandsImpl ( InventoryMode mode,
EntityAI item )
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/Man.c строка 195

196 {
197 if (!g_Game.IsDedicatedServer() )
198 {
199 InventoryLocation il = new InventoryLocation;
200 il.SetHands(this, item);
201 //GetInventory().AddInventoryReservationEx(item, il ,GameInventory.c_InventoryReservationTimeoutShortMS);
202 }
203
204 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Hands(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
205 EntityAI itemInHands = GetEntityInHands();
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;
213 hand_dst.SetHands(this, item);
214 GetHumanInventory().TakeToDst(mode, src_item, hand_dst);
215 }
216 else if (GetHumanInventory().CanSwapEntitiesEx(itemInHands, item))
217 GetInventory().SwapEntities(mode, itemInHands, item);
219 }
220 }
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3942
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)
Определения HumanInventory.c:243
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
override string GetDebugName()
Определения dayzplayer.c:1173
class LOD Object

Перекрестные ссылки g_Game, GetDebugName(), GetEntityInHands(), GetHumanInventory(), LogManager::IsSyncLogEnable(), InventoryLocation::SetHands(), syncDebugPrint() и UpdateInventoryMenu().

Используется в JunctureTakeEntityToHands(), LocalTakeEntityToHands(), PredictiveTakeEntityToHands() и ServerTakeEntityToHands().