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

◆ PredictiveForceSwapEntities()

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

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

579 {
580 if (!ScriptInputUserData.CanStoreInputUserData())
581 {
582 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveForceSwapEntities input data not sent yet, cannot allow another input action");
583 return false;
584 }
585
586 EntityAI item1Parent = item1.GetHierarchyParent();
587 EntityAI item2Parent = item2.GetHierarchyParent();
588 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1Parent, item2Parent);
589 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2Parent, item1Parent);
590 if (need_j1 || need_j2)
591 return ForceSwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2, item2_dst);
592 else
593 return ForceSwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2, item2_dst);
594 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class LogManager EntityAI
bool ForceSwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:606
bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
Определения 3_Game/DayZ/Entities/Man.c:163
proto void Print(void var)
Prints content of variable to console/log.

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