DayZ 1.24
Loading...
Searching...
No Matches
ThirstSoundHandler.c File Reference

Go to the source code of this file.

Classes

class  SoundHandlerBase
 
class  ThirstSoundHandlerBase
 

Functions

override void Update ()
 
void ProcessSound ()
 
void PlaySound ()
 

Variables

class ThirstSoundHandlerBase extends SoundHandlerBase SOUND_INTERVALS_LIGHT_MIN = 10
 
const float SOUND_INTERVALS_LIGHT_MAX = 30
 
float m_SoundTime
 
EffectSound m_Sound
 

Function Documentation

◆ PlaySound()

void PlaySound ( )

Definition at line 36 of file ThirstSoundHandler.c.

37 {
39 }
DayZPlayer m_Player
Definition Hand_Events.c:42
bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)

References m_Player, and DayZPlayer::PlaySoundEventEx().

◆ ProcessSound()

void ProcessSound ( )

Definition at line 26 of file ThirstSoundHandler.c.

27 {
28 if (GetGame().GetTime() > m_SoundTime)
29 {
31 m_SoundTime = GetGame().GetTime() + offset_time;
32 PlaySound();
33 }
34 }
float GetTime()
float m_SoundTime
void PlaySound()
class ThirstSoundHandlerBase extends SoundHandlerBase SOUND_INTERVALS_LIGHT_MIN
const float SOUND_INTERVALS_LIGHT_MAX
Definition EnMath.c:7
proto native CGame GetGame()
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

References GetGame(), GetTime(), m_SoundTime, PlaySound(), Math::RandomFloatInclusive(), SOUND_INTERVALS_LIGHT_MAX, and SOUND_INTERVALS_LIGHT_MIN.

Variable Documentation

◆ m_Sound

EffectSound m_Sound

Definition at line 18 of file ThirstSoundHandler.c.

◆ m_SoundTime

float m_SoundTime

Definition at line 17 of file ThirstSoundHandler.c.

◆ SOUND_INTERVALS_LIGHT_MAX

const float SOUND_INTERVALS_LIGHT_MAX = 30

Definition at line 16 of file ThirstSoundHandler.c.

◆ SOUND_INTERVALS_LIGHT_MIN

class ThirstSoundHandlerBase extends SoundHandlerBase SOUND_INTERVALS_LIGHT_MIN = 10