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

◆ PredictiveForceSwapEntities()

bool EntityAI::PredictiveForceSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

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

567 {
568 if (!ScriptInputUserData.CanStoreInputUserData())
569 {
570 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveForceSwapEntities input data not sent yet, cannot allow another input action");
571 return false;
572 }
573
574 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1.GetHierarchyParent(), item2.GetHierarchyParent());
575 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2.GetHierarchyParent(), item1.GetHierarchyParent());
576 if (need_j1 || need_j2)
577 return ForceSwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2, item2_dst);
578 else
579 return ForceSwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2, item2_dst);
580 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
bool ForceSwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/Entities/Man.c:592
bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
Определения 3_Game/Entities/Man.c:155
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), ForceSwapEntitiesImpl(), NeedInventoryJunctureFromServer() и Print().