Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
thirstsoundhandler.c
Go to the documentation of this file.
2{
3 override void Init()
4 {
5 m_Id = eSoundHandlers.THIRST;
6 }
7
8}
9
10//---------------------------
11// Client
12//---------------------------
13class ThirstSoundHandlerClient extends ThirstSoundHandlerBase
14{
15 const float SOUND_INTERVALS_LIGHT_MIN = 10;
16 const float SOUND_INTERVALS_LIGHT_MAX = 30;
19
20 override void Update()
21 {
22 if ( m_Player.GetMixedSoundStates() & eMixedSoundStates.THIRSTY )
23 {
25 }
26 }
27
29 {
30 int currentTime = g_Game.GetTime();
31 if ( currentTime > m_SoundTime)
32 {
34 m_SoundTime = currentTime + offset_time;
35 PlaySound();
36 }
37 }
38
39 void PlaySound()
40 {
41 m_Player.PlaySoundEventEx(EPlayerSoundEventID.THIRST);
42 }
43}
44
45
46//---------------------------
47// Server
48//---------------------------
49class ThirstSoundHandlerServer extends ThirstSoundHandlerBase
50{
51
52}
map m_Player
Wrapper class for managing sound through SEffectManager.
Definition effectsound.c:5
Definition enmath.c:7
override void Init()
DayZGame g_Game
Definition dayzgame.c:3942
eMixedSoundStates
bits
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition enmath.c:106
override void Update()
float m_SoundTime
class HungerSoundHandlerBase extends SoundHandlerBase SOUND_INTERVALS_LIGHT_MIN
const float SOUND_INTERVALS_LIGHT_MAX
EffectSound m_Sound
eSoundHandlers
enum eStaminaZones m_Id
void PlaySound()
void ProcessSound()