DayZ 1.27
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 //ForceActionTarget(player.m_PlayerLightManager.
855
856 m_SelectAction = NULL;
857 array<ActionBase_Basic> possible_actions;
858 ActionBase action;
859 int i;
860
861 m_MainItem = NULL;
862 if ( player )
863 {
864 Mich2001Helmet helmet = Mich2001Helmet.Cast(player.FindAttachmentBySlotName("Headgear"));
865 NVGHeadstrap headstrap = NVGHeadstrap.Cast(player.FindAttachmentBySlotName("Eyewear"));
866 if ( helmet )
867 {
868 //m_MainItem = Headtorch_ColorBase.Cast(player.FindAttachmentBySlotName("Headgear"));
869 target_new = new ActionTarget(helmet, null, -1, vector.Zero, -1);
870 ForceActionTarget(target_new);
871 }
872 else if ( headstrap )
873 {
874 target_new = new ActionTarget(headstrap, null, -1, vector.Zero, -1);
875 ForceActionTarget(target_new);
876 }
877 else
878 ClearForcedTarget();
879 }
880
881 target = m_ForcedTarget;
882 m_Target = m_ForcedTarget;
883
884 if(target && target.GetObject())
885 {
886 target.GetObject().GetActions(this.Type(), possible_actions);
887 if(possible_actions)
888 {
889 for (i = 0; i < possible_actions.Count(); i++)
890 {
891 action = ActionBase.Cast(possible_actions.Get(i));
892 if ( action.Can(player, target, m_MainItem, action_condition_mask) )
893 {
894 m_SelectAction = action;
895 return;
896 }
897 }
898 }
899 }
900 }
NoIndicationActionInputBase m_SelectAction
ref ActionTarget m_Target
Определения ActionInput.c:15
class ActionTargets ActionTarget
class BaitData m_MainItem
Определения ActionBase.c:36
string Type
Определения JsonDataContaminatedArea.c:11
bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
Определения ActionBase.c:861
ref ActionTarget target_new
Определения ActionInput.c:838

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