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

◆ CheckStop()

TFResult PMTPlayback::CheckStop ( float dt)
inlineprivate

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

223 {
225
226 if (m_ParticleSources.IsValidIndex(m_StopPSID))
227 {
228 ParticleSource p = m_ParticleSources[m_StopPSID];
229 if (p)
230 {
231 if (p.IsParticlePlaying())
232 {
234 {
235 p.StopParticle();
237 m_bStopWasStopped = true;
238 }
239
240 return NTFR(TFR.PENDING);
241 }
242 else
243 {
244 // Means it was stopped before it was supposed to
245 // Possibly because particle length is shorter than STOP_ACCUMULATED_TIME_CUTOFF
247 {
248 return BTFR(false);
249 }
251 {
252 p.PlayParticle();
253 m_bStopWasResumed = true;
254 }
255 else if (m_bStopEnded)
256 {
257 // Clean up the Particle, no leaking from tests!
259 return BTFR(true);
260 }
261
262 return NTFR(TFR.PENDING);
263 }
264 }
265 else
266 {
267 // It should not be gone, no autodestroy
268 return BTFR(Assert(false));
269 }
270 }
271 else
272 {
273 return BTFR(Assert(false));
274 }
275 }
TFResult NTFR(TFR result)
Определения TestFramework.c:273
bool Assert(bool condition)
Определения TestFramework.c:262
TFR
Определения TestFramework.c:2
TFResult BTFR(bool result)
Определения TestFramework.c:278
proto native void ObjectDelete(Object obj)
int m_StopPSID
Определения PMTPlayback.c:18
ref array< ParticleSource > m_ParticleSources
Определения PMTPlayback.c:3
bool m_bStopEnded
Определения PMTPlayback.c:24
static const float STOP_ACCUMULATED_TIME_STOP_CUTOFF
Определения PMTPlayback.c:20
float m_StopAccumulatedTime
Определения PMTPlayback.c:19
bool m_bStopWasResumed
Определения PMTPlayback.c:23
static const float STOP_ACCUMULATED_TIME_PLAY_CUTOFF
Определения PMTPlayback.c:21
bool m_bStopWasStopped
Определения PMTPlayback.c:22
override void PlayParticle(int particle_id=-1)
Method to tell the particle to start playing.
Определения Particle.c:203
override bool StopParticle(int flags=0)
Method to tell the particle to stop playing.
Определения ParticleSource.c:372
override bool IsParticlePlaying()
Ask if the particle is still playing.
Определения ParticleSource.c:417
proto native CGame GetGame()

Перекрестные ссылки Assert(), BTFR(), GetGame(), ParticleSource::IsParticlePlaying(), m_bStopEnded, m_bStopWasResumed, m_bStopWasStopped, m_ParticleSources, m_StopAccumulatedTime, m_StopPSID, NTFR(), CGame::ObjectDelete(), Particle::PlayParticle(), STOP_ACCUMULATED_TIME_PLAY_CUTOFF, STOP_ACCUMULATED_TIME_STOP_CUTOFF, ParticleSource::StopParticle() и TFResult().