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

◆ UpdatePossibleActions()

override void ToggleNVGActionInput::UpdatePossibleActions ( PlayerBase player,
ActionTarget target,
ItemBase item,
int action_condition_mask )
inlineprivate

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

848 {
849 if( ForceActionCheck(player) )
850 {
851 m_SelectAction = m_ForcedActionData.m_Action;
852 return;
853 }
854
855 m_SelectAction = null;
856 array<ActionBase_Basic> possible_actions;
857 ActionBase action;
858 int i;
859
860 m_MainItem = null;
861 if (player)
862 {
863 CachedEquipmentStorageQuery query = new CachedEquipmentStorageQuery();
865 query.m_Placement = ECachedEquipmentPlacement.ATTACHMENT;
866 query.m_MaximumDepth = 2;
867
868 array<Entity> nvgs = player.GetCachedEquipment().GetEntitiesByCategory(query);
869 Object nvgParent = null;
870 foreach (Entity nvg : nvgs)
871 {
872 nvgParent = EntityAI.Cast(nvg).GetHierarchyParent();
873 break;
874 }
875
876 if (nvgParent)
877 {
878 target_new = new ActionTarget(nvgParent, null, -1, vector.Zero, -1);
879 ForceActionTarget(target_new);
880 }
881 else
882 ClearForcedTarget();
883 }
884
885 target = m_ForcedTarget;
886 m_Target = m_ForcedTarget;
887
888 if(target && target.GetObject())
889 {
890 target.GetObject().GetActions(this.Type(), possible_actions);
891 if(possible_actions)
892 {
893 for (i = 0; i < possible_actions.Count(); i++)
894 {
895 action = ActionBase.Cast(possible_actions.Get(i));
896 if ( action.Can(player, target, m_MainItem, action_condition_mask) )
897 {
898 m_SelectAction = action;
899 return;
900 }
901 }
902 }
903 }
904 }
class LogManager EntityAI
NoIndicationActionInputBase m_SelectAction
ref ActionTarget m_Target
Определения ActionInput.c:15
class ActionTargets ActionTarget
class BaitData m_MainItem
Определения ActionBase.c:42
ECachedEquipmentItemCategory
Определения ECachedEquipmentItemCategory.c:2
ECachedEquipmentPlacement
Определения ECachedEquipmentPlacement.c:2
string Type
Определения JsonDataContaminatedArea.c:11
bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
Определения ActionBase.c:873
ECachedEquipmentItemCategory m_Category
Определения CachedEquipmentStorageBase.c:4
ECachedEquipmentPlacement m_Placement
Определения CachedEquipmentStorageBase.c:5
ref ActionTarget target_new
Определения ActionInput.c:838
class LOD Object

Перекрестные ссылки ActionTarget, ActionBase::Can(), CachedEquipmentStorageQuery::m_Category, m_MainItem, CachedEquipmentStorageQuery::m_MaximumDepth, CachedEquipmentStorageQuery::m_Placement, m_SelectAction, m_Target, target_new, Type и vector::Zero.