4 bool m_HasReceivedEvent;
5 bool m_CancelCondition;
6 int m_InitMovementState;
7 int m_FinalMovementState;
22 GetGame().GetMission().RemoveActiveInputExcludes({
"map"},
false);
26 GetGame().GetMission().RemoveActiveInputExcludes({
"loopedactions"},
false);
28 GetGame().GetMission().RemoveActiveInputRestriction(EInputRestrictors.MAP);
31 if (!m_ActionData || !m_ActionData.m_Player)
34 ItemMap chernomap =
ItemMap.Cast(m_ActionData.m_Player.GetItemInHands());
35 if (chernomap && m_ActionData.m_Player.IsMapOpen())
37 chernomap.SetMapStateOpen(
false, m_ActionData.m_Player);
41 override void SetActionData(
ActionData action_data)
43 m_ActionData = action_data;
47 bool CancelCondition()
52 override void OnStateChange(
int pOldState,
int pCurrentState)
54 if (!m_ActionData || !m_ActionData.m_Player)
57 if ((pOldState == STATE_LOOP_IN && pCurrentState == STATE_LOOP_LOOP) && !
m_HasReceivedEvent)
63 override void OnAnimationEvent(
int pEventID)
65 if (!m_ActionData || !m_ActionData.m_Player)
87 override void OnFinish(
bool pCanceled)
89 if (m_ActionData && m_ActionData.m_Player)
91 if (m_ActionData && m_ActionData.m_ActionComponent)
92 m_ActionData.m_State = m_ActionData.m_ActionComponent.Interrupt(m_ActionData);
103 m_ActionData.m_Player.SetMapClosingSyncSet(
false);
105 ItemMap chernomap =
ItemMap.Cast(m_ActionData.m_Player.GetItemInHands());
106 if (chernomap && m_ActionData.m_Player.IsMapOpen())
108 chernomap.SetMapStateOpen(
false, m_ActionData.m_Player);
112 action.End(m_ActionData);
116 void PerformMapChange()
118 if (m_ActionData.m_Player.IsSwimming() || m_ActionData.m_Player.IsClimbing() || m_ActionData.m_Player.IsFalling() || m_ActionData.m_Player.IsClimbingLadder() || m_ActionData.m_Player.IsUnconscious() || m_ActionData.m_Player.IsRestrained())
121 ItemMap chernomap =
ItemMap.Cast(m_ActionData.m_Player.GetItemInHands());
124 if (!m_ActionData.m_Player.IsMapOpen() && !
m_MapFolding)
129 chernomap.SetMapStateOpen(
true, m_ActionData.m_Player);
136 if (!
GetGame().IsDedicatedServer())
140 m_UIManager =
GetGame().GetUIManager();
141 m_UIManager.CloseAll();
144 mapMenu = m_UIManager.EnterScriptedMenu(
MENU_MAP,
null);
145 mapMenu.InitMapItem(chernomap);
146 mapMenu.LoadMapMarkers();
147 GetGame().GetMission().AddActiveInputExcludes({
"map"});
151 GetGame().GetMission().AddActiveInputExcludes({
"loopedactions"});
154 GetGame().GetMission().AddActiveInputRestriction(EInputRestrictors.MAP);
157 else if (m_ActionData.m_Player.IsMapOpen())
159 chernomap.SetMapStateOpen(
false, m_ActionData.m_Player);
161 m_ActionData.m_Player.SetMapOpen(
false);
197 if (player.m_hac || player.IsMapOpen())
218 chernomap.SyncMapMarkers();
229 if (action_data.m_Player.m_hac)
231 action_data.m_Player.m_hac.m_MapFolding =
true;
232 action_data.m_Player.m_hac.PerformMapChange();
233 action_data.m_Player.m_hac.Cancel();
253 if (action_data.m_Player.m_hac)
255 action_data.m_Player.m_hac.SetActionData(action_data);
256 action_data.m_Callback = action_data.m_Player.m_hac;