DayZ 1.28
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 строка 216

217 {
218 // Already queued
219 if (IsPendingDeletion())
220 return;
221
222 // Mark it to prevent queuing it up multiple times or get stuck in a call loop
223 m_IsPendingDeletion = true;
224
225 // Stop it, so that the effects can clean up themselves
226 // Since if for example this is EffectParticle and the particle is looping
227 // It NEEDS to be stopped to clean up the Particle
228 Stop();
229
230 // Queue up the destroying, as we should not do it while we are accessing it here
231 if (GetGame())
232 {
234 }
235 }
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:260
void Stop()
Stops all elements this effect consists of.
Определения Effect.c:183
const int CALL_CATEGORY_GAMEPLAY
Определения 3_Game/tools/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().