DayZ 1.24
Loading...
Searching...
No Matches
StaminaSoundHandlerBase Class Reference
Collaboration diagram for StaminaSoundHandlerBase:
[legend]

Private Member Functions

void PostponeStamina (float time)
 
override void Update ()
 

Private Attributes

float m_PostponeTime = -1
 
float m_LastTick
 
bool m_UpdateTimerRunning
 
bool m_StaminaUpEndPlayed = true
 
ref Timer m_ClientCharacterTick = new Timer
 
ref Timer m_ClientCharacterDistanceCheck = new Timer
 

Detailed Description

Definition at line 158 of file StaminaSoundHandler.c.

Member Function Documentation

◆ PostponeStamina()

void StaminaSoundHandlerBase::PostponeStamina ( float time)
inlineprivate

Definition at line 169 of file StaminaSoundHandler.c.

170 {
171 m_PostponeTime = GetGame().GetTime() + time;
172 }
proto native CGame GetGame()

References GetGame().

◆ Update()

override void StaminaSoundHandlerBase::Update ( )
inlineprivate

Definition at line 175 of file StaminaSoundHandler.c.

176 {
177 if (GetGame().GetTime() < m_PostponeTime || m_Player.GetPlayerSoundEventHandler().m_CurrentState)
178 return;
179 //Print(Math.RandomFloat01());
180 eStaminaState stamina_state = m_Player.GetStaminaState();
181 switch (stamina_state)
182 {
183 case eStaminaState.ZONE1_DOWN:
184 if (m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_DOWN_LIGHT))
185 m_StaminaUpEndPlayed = false;
186 break;
187
188 case eStaminaState.ZONE1_UP:
189 if (m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_UP_LIGHT))
190 m_StaminaUpEndPlayed = false;
191 break;
192
193 case eStaminaState.ZONE2_DOWN:
194 if (m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_DOWN_HEAVY))
195 m_StaminaUpEndPlayed = false;
196 break;
197
198 case eStaminaState.ZONE2_UP:
199 if (m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_UP_HEAVY))
200 m_StaminaUpEndPlayed = false;
201 break;
202
203 case eStaminaState.ZONE0_UP:
204 if (!m_StaminaUpEndPlayed && m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_UP_END))
206 else
207 m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_NORMAL_DUMMY);
208 break;
209
210 case eStaminaState.ZONE0_DOWN:
211 m_Player.PlaySoundEvent(EPlayerSoundEventID.STAMINA_NORMAL_DUMMY);
212 break;
213 }
214 }
float GetTime()
PlayerBase m_Player

References GetGame(), GetTime(), m_Player, and DayZPlayer::PlaySoundEvent().

Member Data Documentation

◆ m_ClientCharacterDistanceCheck

ref Timer StaminaSoundHandlerBase::m_ClientCharacterDistanceCheck = new Timer
private

Definition at line 166 of file StaminaSoundHandler.c.

◆ m_ClientCharacterTick

ref Timer StaminaSoundHandlerBase::m_ClientCharacterTick = new Timer
private

Definition at line 165 of file StaminaSoundHandler.c.

◆ m_LastTick

float StaminaSoundHandlerBase::m_LastTick
private

Definition at line 162 of file StaminaSoundHandler.c.

◆ m_PostponeTime

float StaminaSoundHandlerBase::m_PostponeTime = -1
private

Definition at line 160 of file StaminaSoundHandler.c.

◆ m_StaminaUpEndPlayed

bool StaminaSoundHandlerBase::m_StaminaUpEndPlayed = true
private

Definition at line 164 of file StaminaSoundHandler.c.

◆ m_UpdateTimerRunning

bool StaminaSoundHandlerBase::m_UpdateTimerRunning
private

Definition at line 163 of file StaminaSoundHandler.c.


The documentation for this class was generated from the following file: