Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
infectedsoundeventbase.c
Go to the documentation of this file.
5
7{
9
14
19
20 void Init(ZombieBase pInfected)
21 {
22 m_Infected = pInfected;
23 }
24
25 void SoftStop()
26 {
28 {
29 m_SoundSetCallback.Loop(false);
30 m_SoundSetCallback = null;
31 }
32 }
33
34 override void Stop()
35 {
37 {
38 m_SoundSetCallback.Stop();
39 m_SoundSetCallback = null;
40 }
41
42 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).RemoveByName(this, "PosUpdate");
43 }
44
45 void PosUpdate()
46 {
48 {
49 m_SoundSetCallback.SetPosition(m_Infected.GetPosition());
50 }
51 }
52
53 override bool Play()
54 {
55 string soundset_name;
56
57 soundset_name = string.Format("%1_%2_SoundSet", m_Infected.ClassName(), m_SoundSetNameRoot);
58 m_SoundSetCallback = m_Infected.ProcessVoiceFX(soundset_name);
60 {
61 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLaterByName(this, "PosUpdate", 0, true);
62 return true;
63 }
64 string error = "[%1] No sound callback for : \'%2\' in state: \'%3\' Please define relevant SoundSet in %4";
65 #ifdef DEVELOPER
66 Error(string.Format(error, "ERROR", m_Infected.ClassName(), m_SoundSetNameRoot, "Zombie_SoundSets.hpp"));
67 #else
68 PrintToRPT("" + string.Format(error, "WARNING", m_Infected.ClassName(), m_SoundSetNameRoot, "sounds/hpp/config.cpp"));
69 #endif
70 return false;
71 }
72}
eBleedingSourceType m_Type
override Widget Init()
Definition dayzgame.c:127
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Definition endebug.c:90
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
proto void Play()
void Stop()
Stops all elements this effect consists of.
Definition effect.c:183
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10
void ~InfectedSoundEventBase()
enum EInfectedSoundEventType m_Infected
void SoftStop()
void InfectedSoundEventBase()
void PosUpdate()
EInfectedSoundEventType
AbstractWave m_SoundSetCallback
Definition soundevents.c:86
string m_SoundSetNameRoot
Definition soundevents.c:91