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

◆ Update()

override void ActionManagerClient::Update ( int pCurrentCommandID)
inlineprotected

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

42 {
43 m_InventoryActionHandler.OnUpdate();
44 super.Update(pCurrentCommandID);
45 int currentCommandID = m_Player.GetCurrentCommandID();
46 m_ActionPossible = ActionPossibilityCheck(currentCommandID);
47
48 if (m_PendingActionData) //SP only
49 {
51
53
54 if (m_CurrentActionData.m_Action.IsInstant())
56
58 }
59
61 {
63 m_CurrentActionData.m_Action.OnUpdateClient(m_CurrentActionData);
64
65 switch (m_CurrentActionData.m_State)
66 {
67 case UA_AM_PENDING:
68 break;
69
70 case UA_AM_ACCEPTED:
71 int condition_mask = ActionBase.ComputeConditionMask(m_Player, m_CurrentActionData.m_Target, m_CurrentActionData.m_MainItem);
72
73 m_CurrentActionData.m_Action.ClearInventoryReservationEx(m_CurrentActionData);
74 bool can_be_action_done = ((condition_mask & m_CurrentActionData.m_Action.m_ConditionMask) == condition_mask);
75 // check currentCommandID before start or reject
76 if (m_ActionPossible && can_be_action_done)
77 {
78 m_CurrentActionData.m_Action.InventoryReservation(m_CurrentActionData);
81
82 if (m_CurrentActionData.m_Action.IsInstant())
84 }
85 else
86 {
89 }
91 break;
92
93 case UA_AM_REJECTED:
96 break;
97
98 default:
101 break;
102 }
103 }
104
105#ifdef DEVELOPER
106 if (DeveloperFreeCamera.IsFreeCameraEnabled())
107 {
108 m_ActionPossible = false;
110 }
111 else
112 {
113#endif
115 {
116 bool isMenuOpen = false;
117#ifndef NO_GUI
119#endif
120 if (m_Player.IsRaised() || isMenuOpen)
121 {
122 m_Targets.Clear();
123 }
124 else
125 {
126 m_Targets.Update();
127 }
128 FindContextualUserActions(currentCommandID);
129 }
130
131 InputsUpdate();
132#ifdef DEVELOPER
133 }
134#endif
135
136 }
ref ActionData m_CurrentActionData
Определения ActionManagerBase.c:61
bool ActionPossibilityCheck(int pCurrentCommandID)
Определения ActionManagerBase.c:244
int m_PendingActionAcknowledgmentID
Определения ActionManagerBase.c:59
DayZPlayer m_Player
Определения Hand_Events.c:42
override void OnActionEnd()
Определения ActionManagerClient.c:775
void ProcessActionRequestEnd()
Определения ActionManagerClient.c:329
ref InventoryActionHandler m_InventoryActionHandler
Определения ActionManagerClient.c:11
override void RequestInterruptAction()
client requests action interrupt
Определения ActionManagerClient.c:1280
void FindContextualUserActions(int pCurrentCommandID)
Определения ActionManagerClient.c:528
void InputsUpdate()
Определения ActionManagerClient.c:282
ref ActionTargets m_Targets
Определения ActionManagerClient.c:1292
void ResetInputsActions()
Определения ActionManagerClient.c:714
bool m_ActionPossible
Определения ActionManagerClient.c:9
void ProcessActionInputEnd()
Определения ActionManagerClient.c:359
ref ActionData m_PendingActionData
Определения ActionManagerClient.c:20
proto native UIManager GetUIManager()
bool IsRaised()
Определения DayZPlayerImplement.c:3809
bool IsMenuOpen(int id)
Returns true if menu with specific ID is opened (see MenuID)
Определения UIManager.c:154
proto native CGame GetGame()
const int MENU_INVENTORY
Определения constants.c:180
const int UA_START
Определения constants.c:467
const int UA_AM_ACCEPTED
Определения constants.c:475
const int UA_AM_REJECTED
Определения constants.c:476
const int UA_AM_PENDING
Определения constants.c:474

Перекрестные ссылки ActionPossibilityCheck(), ActionBase::ComputeConditionMask(), FindContextualUserActions(), GetGame(), CGame::GetUIManager(), InputsUpdate(), DeveloperFreeCamera::IsFreeCameraEnabled(), UIManager::IsMenuOpen(), m_ActionPossible, m_CurrentActionData, m_InventoryActionHandler, m_PendingActionAcknowledgmentID, m_PendingActionData, m_Player, m_Targets, MENU_INVENTORY, OnActionEnd(), ProcessActionInputEnd(), ProcessActionRequestEnd(), RequestInterruptAction(), ResetInputsActions(), UA_AM_ACCEPTED, UA_AM_PENDING, UA_AM_REJECTED и UA_START.