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

◆ Destroy()

proto native void Destroy ( )

Cleans up the Effect, including unregistering if needed.

Заметки
Will stop the Effect and queue up the deletion in the callqueue
Is intended for usage from within the Effect itself, use SEffectManager.DestroyEffect when working from a pointer

Cleans up the Effect, including unregistering if needed.

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

215 {
216 // Already queued
217 if (IsPendingDeletion())
218 return;
219
220 // Mark it to prevent queuing it up multiple times or get stuck in a call loop
221 m_IsPendingDeletion = true;
222
223 // Stop it, so that the effects can clean up themselves
224 // Since if for example this is EffectParticle and the particle is looping
225 // It NEEDS to be stopped to clean up the Particle
226 Stop();
227
228 // Queue up the destroying, as we should not do it while we are accessing it here
229 if (GetGame())
230 {
232 }
233 }
bool m_IsPendingDeletion
Whether the Destroy process has already been called.
Определения Effect.c:35
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Определения EffectManager.c:271
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native CGame GetGame()
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
Определения Effect.c:258
void Stop()
Stops all elements this effect consists of.
Определения Effect.c:181
const int CALL_CATEGORY_GAMEPLAY
Определения tools.c:10

Перекрестные ссылки ScriptCallQueue::Call(), CALL_CATEGORY_GAMEPLAY, DestroyDamageTriggerEx(), SEffectManager::DestroyEffect(), CGame::GetCallQueue(), GetGame(), IsPendingDeletion(), m_IsPendingDeletion, OnTriggerDestroyed() и Stop().

Используется в EntityLightSource::CheckLifetime(), EntityLightSource::HandleBrightnessFadeing(), EntityLightSource::HandleRadiusFadeing() и ~AreaDamageManager().