DayZ 1.24
Loading...
Searching...
No Matches
StanceIndicator.c
Go to the documentation of this file.
2{
5
11
12 void Update()
13 {
14 if (m_Player)
15 {
16 m_Player.GetMovementState(m_State);
17 int player_stance = m_State.m_iStanceIdx;
18 int hud_stance_id = 1;
19 //if ( player_stance == DayZPlayerConstants.STANCEIDX_ERECT || player_stance == DayZPlayerConstants.STANCEIDX_RAISEDERECT) hud_stance_id = 1;
20 if (player_stance == DayZPlayerConstants.STANCEIDX_CROUCH || player_stance == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
21 hud_stance_id = 2;
22 if (player_stance == DayZPlayerConstants.STANCEIDX_PRONE || player_stance == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
23 hud_stance_id = 3;
25 //Debug
26 //m_Player.MessageStatus(ToString(player) + "StanceIndicator.c || stance: " + ToString(player_stance));
27 }
28 }
29
31 {
32 if (m_Player)
33 {
34 DisplayElementBase stance_element = m_Player.GetVirtualHud().GetElement(eDisplayElements.DELM_STANCE);
36 stance_element.SetValue(stance);
37 //m_Player.GetVirtualHud().SetValue(eDisplayElements.DELM_STANCE, stance);
38 }
39 }
40};
void StanceIndicator(PlayerBase player)
PlayerBase m_Player
ref HumanMovementState m_State
void DisplayStance(int stance)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597