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

◆ PredictiveForceSwapEntities()

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

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

9184 {
9185 InventoryLocation il = new InventoryLocation;
9186 if (item1.IsHeavyBehaviour() && item1.GetInventory().GetCurrentInventoryLocation(il) && il.GetType() == InventoryLocationType.GROUND && !m_ActionManager.GetRunningAction())
9187 {
9188 //Print("override bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)");
9189 ActionManagerClient mngr_client;
9190 CastTo(mngr_client,m_ActionManager);
9191
9192 ActionTarget atrg = new ActionTarget(item1,null,-1,vector.Zero,-1.0);
9193 if (mngr_client.GetAction(ActionSwapItemToHands).Can(this,atrg,ItemBase.Cast(item2)))
9194 {
9195 mngr_client.PerformActionStart(mngr_client.GetAction(ActionSwapItemToHands),atrg,ItemBase.Cast(item2));
9196 }
9197 return true;
9198 }
9199 else
9200 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
9201 }
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
Определения ActionTargets.c:125
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:804
proto native int GetType()
returns type of InventoryLocation
ActionManagerBase m_ActionManager
Определения PlayerBase.c:90

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

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