Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
replacesoundeventbase.c
Go to the documentation of this file.
2{
4 protected EReplaceSoundEventID m_ID;
6 protected int m_ReplacedSoundAnimID;
7 protected string m_UserString;
9
14
15 EReplaceSoundEventID GetSoundEventID()
16 {
17 return m_ID;
18 }
19
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
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}
void Init(PlayerBase player)
EReplaceSoundEventID GetSoundEventID()
ESoundEventType GetSoundEventType()
EReplaceSoundEventID m_ID