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

◆ PredictiveForceSwapEntities()

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

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

8582 {
8583 InventoryLocation il = new InventoryLocation;
8584 if (item1.IsHeavyBehaviour() && item1.GetInventory().GetCurrentInventoryLocation(il) && il.GetType() == InventoryLocationType.GROUND && !m_ActionManager.GetRunningAction())
8585 {
8586 //Print("override bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)");
8587 ActionManagerClient mngr_client;
8588 CastTo(mngr_client,m_ActionManager);
8589
8590 ActionTarget atrg = new ActionTarget(item1,null,-1,vector.Zero,-1.0);
8591 if (mngr_client.GetAction(ActionSwapItemToHands).Can(this,atrg,ItemBase.Cast(item2)))
8592 {
8593 mngr_client.PerformActionStart(mngr_client.GetAction(ActionSwapItemToHands),atrg,ItemBase.Cast(item2));
8594 }
8595 return true;
8596 }
8597 else
8598 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
8599 }
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
Определения ActionTargets.c:121
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:768
proto native int GetType()
returns type of InventoryLocation
ActionManagerBase m_ActionManager
Определения PlayerBase.c:43

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

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