DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PlayRequest()

override bool PlayRequest ( int id,
bool sent_from_server = false )

same sound event - skip

См. определение в файле InfectedSoundEventHandler.c строка 82

83 {
84 InfectedSoundEventBase requested_state = m_AvailableStates[id];
85
86 if ( !requested_state.CanPlay() )
87 {
88 return false;
89 }
90
92 {
93 if (!m_CurrentState.IsSoundCallbackExist())
94 {
95 //Print("Missing callback - cleanup and continue");
96 delete m_CurrentState;
97 }
98
100 if (GetCurrentStateEventID() == id)
101 {
102 //Print("Same ID - skipping");
103 return false;
104 }
105 }
106
107 if (m_CurrentState)
108 {
109 m_CurrentState.SoftStop();
110 m_CurrentState = InfectedSoundEventBase.Cast(requested_state.ClassName().ToType().Spawn());
112 m_CurrentState.Play();
113 return true;
114 }
115 else
116 {
117 m_CurrentState = InfectedSoundEventBase.Cast(requested_state.ClassName().ToType().Spawn());
119 m_CurrentState.Play();
120 return true;
121 }
122
123 return false;//should never get here
124 }
enum EInfectedSoundEventType m_Infected
ref InfectedSoundEventBase m_CurrentState
Определения InfectedSoundEventHandler.c:18
static ref InfectedSoundEventBase m_AvailableStates[SOUND_EVENTS_MAX]
Определения InfectedSoundEventHandler.c:17
override int GetCurrentStateEventID()
Определения InfectedSoundEventHandler.c:38
override bool CanPlay()
Определения MindStates.c:3

Перекрестные ссылки InfectedSoundEventBase::CanPlay(), GetCurrentStateEventID(), m_AvailableStates, m_CurrentState и m_Infected.