Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
replacesoundeventbase.c
Go to the documentation of this file.
1
class
ReplaceSoundEventBase
2
{
3
protected
ESoundEventType
m_EventType
;
4
protected
EReplaceSoundEventID
m_ID
;
5
protected
int
m_SoundAnimEventClassID
;
6
protected
int
m_ReplacedSoundAnimID
;
7
protected
string
m_UserString
;
8
protected
PlayerBase
m_Player
;
9
10
ESoundEventType
GetSoundEventType
()
11
{
12
return
m_EventType
;
13
}
14
15
EReplaceSoundEventID
GetSoundEventID
()
16
{
17
return
m_ID
;
18
}
19
20
int
GetSoundAnimEventClassID
()
21
{
22
return
m_SoundAnimEventClassID
;
23
}
24
25
void
Init
(
PlayerBase
player)
26
{
27
m_Player
= player;
28
}
29
30
bool
Play
()
31
{
32
m_ReplacedSoundAnimID
= -1;
//invalidate ID before selecting
33
SelectSoundID
();
34
35
//fail if no valid alternative found. Should return to regular flow.
36
if
(
m_ReplacedSoundAnimID
== -1)
37
return
false
;
38
39
switch
(
m_EventType
)
40
{
41
case
ESoundEventType
.SOUND_COMMON:
42
m_Player
.ProcessSoundEvent(
""
,
m_UserString
,
m_ReplacedSoundAnimID
);
43
break
;
44
45
case
ESoundEventType
.SOUND_WEAPON:
46
m_Player
.ProcessWeaponEvent(
""
,
m_UserString
,
m_ReplacedSoundAnimID
);
47
break
;
48
49
case
ESoundEventType
.SOUND_VOICE:
50
m_Player
.ProcessVoiceEvent(
""
,
m_UserString
,
m_ReplacedSoundAnimID
);
51
break
;
52
53
default
:
54
break
;
55
}
56
57
return
true
;
58
}
59
60
protected
void
SelectSoundID
();
61
}
PlayerBase
Definition
playerbaseclient.c:2
ReplaceSoundEventBase
Definition
actionsurfaceevents.c:24
ReplaceSoundEventBase::GetSoundEventID
EReplaceSoundEventID GetSoundEventID()
Definition
replacesoundeventbase.c:15
ReplaceSoundEventBase::Play
bool Play()
Definition
replacesoundeventbase.c:30
ReplaceSoundEventBase::m_UserString
string m_UserString
Definition
replacesoundeventbase.c:7
ReplaceSoundEventBase::GetSoundAnimEventClassID
int GetSoundAnimEventClassID()
Definition
replacesoundeventbase.c:20
ReplaceSoundEventBase::Init
void Init(PlayerBase player)
Definition
replacesoundeventbase.c:25
ReplaceSoundEventBase::m_SoundAnimEventClassID
int m_SoundAnimEventClassID
Definition
replacesoundeventbase.c:5
ReplaceSoundEventBase::m_EventType
ESoundEventType m_EventType
Definition
replacesoundeventbase.c:3
ReplaceSoundEventBase::m_Player
PlayerBase m_Player
Definition
replacesoundeventbase.c:8
ReplaceSoundEventBase::m_ID
EReplaceSoundEventID m_ID
Definition
replacesoundeventbase.c:4
ReplaceSoundEventBase::m_ReplacedSoundAnimID
int m_ReplacedSoundAnimID
Definition
replacesoundeventbase.c:6
ReplaceSoundEventBase::GetSoundEventType
ESoundEventType GetSoundEventType()
Definition
replacesoundeventbase.c:10
ReplaceSoundEventBase::SelectSoundID
void SelectSoundID()
Definition
actionsurfaceevents.c:25
ESoundEventType
ESoundEventType
Definition
replacesoundeventhandler.c:2
Games
Dayz
scripts
4_world
classes
soundevents
replacesoundevents
replacesoundeventbase.c
Generated by
1.17.0