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

◆ PredictiveForceSwapEntities()

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

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

8832 {
8833 InventoryLocation il = new InventoryLocation;
8834 if (item1.IsHeavyBehaviour() && item1.GetInventory().GetCurrentInventoryLocation(il) && il.GetType() == InventoryLocationType.GROUND && !m_ActionManager.GetRunningAction())
8835 {
8836 //Print("override bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)");
8837 ActionManagerClient mngr_client;
8838 CastTo(mngr_client,m_ActionManager);
8839
8840 ActionTarget atrg = new ActionTarget(item1,null,-1,vector.Zero,-1.0);
8841 if (mngr_client.GetAction(ActionSwapItemToHands).Can(this,atrg,ItemBase.Cast(item2)))
8842 {
8843 mngr_client.PerformActionStart(mngr_client.GetAction(ActionSwapItemToHands),atrg,ItemBase.Cast(item2));
8844 }
8845 return true;
8846 }
8847 else
8848 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
8849 }
class ActionTargets ActionTarget
class GP5GasMask extends MaskBase ItemBase
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
void PerformActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
Определения ActionManagerClient.c:762
proto native int GetType()
returns type of InventoryLocation
ActionManagerBase m_ActionManager
Определения PlayerBase.c:90

Перекрестные ссылки ActionTarget, InventoryLocation::GetType(), m_ActionManager, ActionManagerClient::PerformActionStart() и vector::Zero.

Используется в OnQuickBarSingleUse().