Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
infectedsoundeventbase.c
Go to the documentation of this file.
1
enum
EInfectedSoundEventType
2
{
3
GENERAL
,
4
}
5
6
class
InfectedSoundEventBase
extends
SoundEventBase
7
{
8
ZombieBase
m_Infected
;
9
10
void
InfectedSoundEventBase
()
11
{
12
m_Type
=
EInfectedSoundEventType
.GENERAL;
13
}
14
15
void
~InfectedSoundEventBase
()
16
{
17
if
(
m_SoundSetCallback
)
m_SoundSetCallback
.Stop();
18
}
19
20
void
Init
(
ZombieBase
pInfected)
21
{
22
m_Infected
= pInfected;
23
}
24
25
void
SoftStop
()
26
{
27
if
(
m_SoundSetCallback
)
28
{
29
m_SoundSetCallback
.Loop(
false
);
30
m_SoundSetCallback
=
null
;
31
}
32
}
33
34
override
void
Stop
()
35
{
36
if
(
m_SoundSetCallback
)
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
{
47
if
(
m_SoundSetCallback
)
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);
59
if
(
m_SoundSetCallback
)
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
}
SoundEventBase
Definition:
soundevents.c:1
GetGame
proto native CGame GetGame()
Error
void Error(string err)
Messagebox with error message.
Definition:
endebug.c:90
CALL_CATEGORY_GAMEPLAY
const int CALL_CATEGORY_GAMEPLAY
Definition:
tools.c:10
m_Type
eBleedingSourceType m_Type
Definition:
bleedingsource.c:25
InfectedSoundEventBase
void InfectedSoundEventBase()
Definition:
infectedsoundeventbase.c:10
EInfectedSoundEventType
EInfectedSoundEventType
Definition:
infectedsoundeventbase.c:1
Play
override bool Play()
Definition:
infectedsoundeventbase.c:53
Init
void Init(ZombieBase pInfected)
Definition:
infectedsoundeventbase.c:20
m_SoundSetCallback
AbstractWave m_SoundSetCallback
Definition:
soundevents.c:2
m_Infected
enum EInfectedSoundEventType m_Infected
PrintToRPT
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
PosUpdate
void PosUpdate()
Definition:
infectedsoundeventbase.c:45
~InfectedSoundEventBase
void ~InfectedSoundEventBase()
Definition:
infectedsoundeventbase.c:15
InfectedSoundEventBase
Definition:
mindstates.c:1
Stop
override void Stop()
Definition:
infectedsoundeventbase.c:34
GENERAL
@ GENERAL
Definition:
infectedsoundeventbase.c:3
SoftStop
void SoftStop()
Definition:
infectedsoundeventbase.c:25
ZombieBase
Definition:
zombiefemalebase.c:1
m_SoundSetNameRoot
string m_SoundSetNameRoot
Definition:
soundevents.c:7
DAYZ
scripts_v1.24.157551
scripts
world
classes
soundevents
infectedsoundevents
infectedsoundeventbase.c
Generated by
1.8.17