Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
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
g_Game
.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
g_Game
.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
}
m_Type
eBleedingSourceType m_Type
Definition
bleedingsource.c:25
InfectedSoundEventBase
Definition
mindstates.c:2
SoundEventBase
Definition
soundevents.c:2
ZombieBase
Definition
zombiefemalebase.c:2
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Init
override Widget Init()
Definition
dayzgame.c:127
Error
void Error(string err)
Messagebox with error message.
Definition
endebug.c:90
PrintToRPT
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
Play
proto void Play()
Definition
smptanimmeta.c:144
Stop
void Stop()
Stops all elements this effect consists of.
Definition
effect.c:183
string::Format
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
CALL_CATEGORY_GAMEPLAY
const int CALL_CATEGORY_GAMEPLAY
Definition
tools.c:10
~InfectedSoundEventBase
void ~InfectedSoundEventBase()
Definition
infectedsoundeventbase.c:15
m_Infected
enum EInfectedSoundEventType m_Infected
SoftStop
void SoftStop()
Definition
infectedsoundeventbase.c:25
InfectedSoundEventBase
void InfectedSoundEventBase()
Definition
infectedsoundeventbase.c:10
PosUpdate
void PosUpdate()
Definition
infectedsoundeventbase.c:45
EInfectedSoundEventType
EInfectedSoundEventType
Definition
infectedsoundeventbase.c:2
GENERAL
@ GENERAL
Definition
infectedsoundeventbase.c:3
m_SoundSetCallback
AbstractWave m_SoundSetCallback
Definition
soundevents.c:86
m_SoundSetNameRoot
string m_SoundSetNameRoot
Definition
soundevents.c:91
Games
Dayz
scripts
4_world
classes
soundevents
infectedsoundevents
infectedsoundeventbase.c
Generated by
1.17.0