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

◆ PredictiveSwapEntities()

bool EntityAI::PredictiveSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

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

519 {
520 if (!ScriptInputUserData.CanStoreInputUserData())
521 {
522 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveSwapEntities input data not sent yet, cannot allow another input action");
523 return false;
524 }
525
526 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1.GetHierarchyParent(), item2.GetHierarchyParent());
527 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2.GetHierarchyParent(), item1.GetHierarchyParent());
528 if (need_j1 || need_j2)
529 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
530 else
531 return SwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2);
532 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
bool SwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/Entities/Man.c:544
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(), NeedInventoryJunctureFromServer(), Print() и SwapEntitiesImpl().

Используется в ManBase::PredictiveSwapEntities() и PredictiveTakeOrSwapAttachment().