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

◆ PredictiveSwapEntities()

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

См. определение в файле Man.c строка 501

502 {
503 if (!ScriptInputUserData.CanStoreInputUserData())
504 {
505 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveSwapEntities input data not sent yet, cannot allow another input action");
506 return false;
507 }
508
509 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1.GetHierarchyParent(), item2.GetHierarchyParent());
510 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2.GetHierarchyParent(), item1.GetHierarchyParent());
511 if (need_j1 || need_j2)
512 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
513 else
514 return SwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2);
515 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
bool SwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
Определения Man.c:527
bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
Определения Man.c:155
proto void Print(void var)
Prints content of variable to console/log.

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

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