Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл PlayerSoundEventBase.c

См. исходные тексты.

Перечисления

enum  EPlayerSoundEventType {
  GENERAL = 0x00000001 , MELEE = 0x00000002 , STAMINA = 0x00000004 , DAMAGE = 0x00000008 ,
  DUMMY = 0x00000010 , INJURY = 0x00000020 , DROWNING = 0x00000040
}
 

Функции

bool IsDummy ()
 
EPlayerSoundEventType GetPriorityOverTypes ()
 
bool HasHoldBreathException ()
 
void PlayerSoundEventBase ()
 
void ~PlayerSoundEventBase ()
 
int GetSoundVoiceAnimEventClassID ()
 
bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
bool IsFinished ()
 
bool IsDummyFinished ()
 
void OnTick (float delta_time)
 
bool CanPlay (PlayerBase player)
 
void Init (PlayerBase player)
 
void InitEx (PlayerBase player, int param)
 
void OnEnd ()
 
void SendEvent (float time)
 
void OnInterupt ()
 
override void OnPlay (PlayerBase player)
 
override bool Play ()
 

Переменные

enum EPlayerSoundEventType SKIP_CONTROLLED_PLAYER = 0x00000001
 
enum EPlayerSoundEventType HIGHEST_PRIORITY = 0x00000002
 
enum EPlayerSoundEventType ENUM_COUNT = 0x00000002
 
enum EPlayerSoundEventType m_Player = 0x00000002
 
float m_DummySoundLength
 
float m_DummyStartTime
 
bool m_IsDummyType
 
bool m_ProcessPlaybackEvent
 
float m_PlayTime
 
ref HumanMovementState m_Hms = new HumanMovementState()
 
EPlayerSoundEventType m_HasPriorityOverTypes
 

Перечисления

◆ EPlayerSoundEventType

Элементы перечислений
GENERAL 
MELEE 
STAMINA 
DAMAGE 
DUMMY 
INJURY 
DROWNING 
2{
3 GENERAL = 0x00000001,
4 MELEE = 0x00000002,
5 STAMINA = 0x00000004,
6 DAMAGE = 0x00000008,
7 DUMMY = 0x00000010,
8 INJURY = 0x00000020,
9 DROWNING = 0x00000040,
10 //HEAT_COMFORT = 0x00000080,
11}
@ INJURY
Definition PlayerSoundEventBase.c:8
@ MELEE
Definition PlayerSoundEventBase.c:4
@ STAMINA
Definition PlayerSoundEventBase.c:5
@ DUMMY
Definition PlayerSoundEventBase.c:7
@ DROWNING
Definition PlayerSoundEventBase.c:9
@ DAMAGE
Definition PlayerSoundEventBase.c:6
@ GENERAL
Definition PlayerSoundEventBase.c:3

Функции

◆ CanPlay()

bool CanPlay ( PlayerBase player)
116 {
117 player.GetMovementState(m_Hms);
118
119 if (player.IsHoldingBreath() && !HasHoldBreathException())
120 {
121 return false;
122 }
123 if (player.m_IsDrowning || (player.IsSwimming() && m_Hms.m_iMovement != 0))
124 {
125 return false;
126 }
127 return true;
128 }
ref HumanMovementState m_Hms
Definition PlayerSoundEventBase.c:39
bool HasHoldBreathException()
Definition PlayerSoundEventBase.c:53
Definition EntityAI.c:95

Перекрестные ссылки PlayerSoundEventBase::HasHoldBreathException() и m_Hms.

◆ GetPriorityOverTypes()

EPlayerSoundEventType GetPriorityOverTypes ( )
48 {
50 }
EPlayerSoundEventType m_HasPriorityOverTypes
Definition PlayerSoundEventBase.c:40

Перекрестные ссылки m_HasPriorityOverTypes.

◆ GetSoundVoiceAnimEventClassID()

int GetSoundVoiceAnimEventClassID ( )
70 {
72 }
int m_SoundVoiceAnimEventClassID
Definition SoundEvents.c:89

Перекрестные ссылки m_SoundVoiceAnimEventClassID.

◆ HasHoldBreathException()

bool HasHoldBreathException ( )
54 {
55 return false;
56 }

◆ HasPriorityOverCurrent()

bool HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
75 {
76 return true;
77 }

◆ Init()

void Init ( PlayerBase player)
131 {
132 InitEx(player,0);
133 }
void InitEx(PlayerBase player, int param)
Definition PlayerSoundEventBase.c:135

Перекрестные ссылки InitEx().

◆ InitEx()

void InitEx ( PlayerBase player,
int param )
136 {
138 m_Param = param;
139 if (param & EPlayerSoundEventParam.HIGHEST_PRIORITY)
140 {
142 }
143 }
enum EPlayerSoundEventType m_Player
int m_Param
Definition SoundEvents.c:93

Перекрестные ссылки m_HasPriorityOverTypes, m_Param и m_Player.

Используется в Init().

◆ IsDummy()

bool IsDummy ( )
43 {
44 return m_IsDummyType;
45 }
bool m_IsDummyType
Definition PlayerSoundEventBase.c:35

Перекрестные ссылки m_IsDummyType.

Используется в IsFinished() и Play().

◆ IsDummyFinished()

bool IsDummyFinished ( )
92 {
93 return GetGame().GetTime() > (m_DummyStartTime + m_DummySoundLength);
94 }
float m_DummySoundLength
Definition PlayerSoundEventBase.c:33
float m_DummyStartTime
Definition PlayerSoundEventBase.c:34
proto native CGame GetGame()

Перекрестные ссылки GetGame(), m_DummySoundLength и m_DummyStartTime.

Используется в IsFinished().

◆ IsFinished()

bool IsFinished ( )
80 {
81 if(IsDummy())
82 {
83 return IsDummyFinished();
84 }
85 else
86 {
87 return !IsSoundCallbackExist();
88 }
89 }
bool IsDummy()
Definition PlayerSoundEventBase.c:42
bool IsDummyFinished()
Definition PlayerSoundEventBase.c:91
bool IsSoundCallbackExist()
Definition SoundEvents.c:115

Перекрестные ссылки IsDummy(), IsDummyFinished() и IsSoundCallbackExist().

◆ OnEnd()

void OnEnd ( )
146 {
148 SendEvent(1);
149 }
bool m_ProcessPlaybackEvent
Definition PlayerSoundEventBase.c:36
void SendEvent(float time)
Definition PlayerSoundEventBase.c:151

Перекрестные ссылки m_ProcessPlaybackEvent и SendEvent().

◆ OnInterupt()

void OnInterupt ( )
162 {
163
164 }

Используется в Play().

◆ OnPlay()

override void OnPlay ( PlayerBase player)

!! beware of the ifdef above , most likely you want to put your code above it, otherwise it might not get executed !!!

167 {
168 super.OnPlay(player);
169 //Print("start playing -------------------->" + m_Type);
170 player.OnVoiceEvent(this);
171 //m_Player.OnVoiceEventDuration(m_SoundSetCallback, 0);
172 }

◆ OnTick()

void OnTick ( float delta_time)
98 {
100 {
102 //---------- Playback event -------------
103 if( delta_time > 0 && m_ProcessPlaybackEvent )//delta_time 0 is for remotes
104 {
105
107 //this is not 100% precise as the playback position is not obtained from the sound system
110 //---------- Playback event -------------
111 }
112 }
113 }
float m_PlayTime
Definition PlayerSoundEventBase.c:37
AbstractWave m_SoundSetCallback
Definition SoundEvents.c:86
proto void SetPosition(vector position, vector velocity="0 0 0")
proto float GetLength()
WARNING: Blocking! Waits for header to load.
Definition EnMath.c:7
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), AbstractWave::GetLength(), m_Player, m_PlayTime, m_ProcessPlaybackEvent, m_SoundSetCallback, SendEvent() и AbstractWave::SetPosition().

◆ Play()

override bool Play ( )
175 {
176 if(!super.Play())
177 return false;
178
179 if( !IsDummy() )
180 {
181 m_SoundSetCallback = m_Player.ProcessVoiceEvent("","", m_SoundVoiceAnimEventClassID);
182
184 {
186 events.Event_OnSoundWaveEnded.Insert( OnEnd );
187 events.Event_OnSoundWaveStopped.Insert( OnInterupt );
188 return true;
189 }
190 else
191 return false;
192 }
193 else
194 {
195 m_DummyStartTime = GetGame().GetTime();
196 return true;
197 }
198 return false;
199
200 }
void OnEnd()
Definition PlayerSoundEventBase.c:145
void OnInterupt()
Definition PlayerSoundEventBase.c:161
proto Managed GetUserData()

Перекрестные ссылки GetGame(), AbstractWave::GetUserData(), IsDummy(), m_DummyStartTime, m_Player, m_SoundSetCallback, m_SoundVoiceAnimEventClassID, PlayerSoundEventBase::OnEnd(), OnInterupt() и DayZPlayer::ProcessVoiceEvent().

◆ PlayerSoundEventBase()

void PlayerSoundEventBase ( )
59 {
61 }
class DynamicMusicLocationTypes m_Type
EPlayerSoundEventType
Definition PlayerSoundEventBase.c:2

Перекрестные ссылки m_Type.

◆ SendEvent()

void SendEvent ( float time)
152 {
153 if(m_PlayTime < 0 || !m_SoundSetCallback)//negative m_PlayTime value indicates the event has already been sent for playback01 = 1
154 return;
155
156 m_Player.OnVoiceEventPlayback(this, m_SoundSetCallback, time);
157 if(time >= 1)
158 m_PlayTime = -float.MAX;
159 }
const float MAX
Definition EnConvert.c:99

Перекрестные ссылки m_Player, m_PlayTime, m_SoundSetCallback и float::MAX.

◆ ~PlayerSoundEventBase()

64 {
66 OnEnd();
67 }

Перекрестные ссылки m_SoundSetCallback и PlayerSoundEventBase::OnEnd().

Переменные

◆ ENUM_COUNT

enum EPlayerSoundEventType ENUM_COUNT = 0x00000002

◆ HIGHEST_PRIORITY

enum EPlayerSoundEventType HIGHEST_PRIORITY = 0x00000002

◆ m_DummySoundLength

float m_DummySoundLength

◆ m_DummyStartTime

float m_DummyStartTime

Используется в IsDummyFinished() и Play().

◆ m_HasPriorityOverTypes

◆ m_Hms

Используется в CanPlay().

◆ m_IsDummyType

bool m_IsDummyType

Используется в IsDummy() и StaminaSoundEventBase::StaminaNormalDummy().

◆ m_Player

enum EPlayerSoundEventType m_Player = 0x00000002

◆ m_PlayTime

float m_PlayTime

Используется в OnTick() и SendEvent().

◆ m_ProcessPlaybackEvent

bool m_ProcessPlaybackEvent

Используется в OnEnd(), OnTick() и StaminaNormalDummy().

◆ SKIP_CONTROLLED_PLAYER

enum EPlayerSoundEventType SKIP_CONTROLLED_PLAYER = 0x00000001