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

◆ EffectRegister()

static int SEffectManager::EffectRegister ( Effect effect)
inlinestaticprotected

Registers Effect in SEffectManager.

Заметки
Already handled in SEffectManager Create/Play methods
This will make SEffectManager hold a strong ref for the Effect
Аргументы
effectEffect The Effect to register
Возвращает
int The Effect ID

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

332 {
333 if (effect.IsRegistered())
334 {
335 ErrorEx(string.Format("Attempted to register Effect '%1' which was already registered.", effect.GetDebugName()), ErrorExSeverity.INFO);
336 return effect.GetID();
337 }
338
339 int id;
340
341 if (!m_IsCleanup)
342 {
343 id = GetFreeEffectID();
344 m_EffectsMap.Insert(id, effect);
345 effect.Event_OnRegistered(id);
346 }
347 else
348 ErrorEx("Attempted to register Effect while SEffectManager is cleaning up, request ignored.", ErrorExSeverity.WARNING);
349
350 return id;
351 }
static int GetFreeEffectID()
Helper function for EffectRegister to decide an Effect ID.
Определения EffectManager.c:409
static ref map< int, ref Effect > m_EffectsMap
Static map of all registered effects <id, Effect>
Определения EffectManager.c:8
static bool m_IsCleanup
Bool to check whether Cleanup is happening, which means that the maps should no longer be accessed.
Определения EffectManager.c:16
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки Effect(), ErrorEx, GetFreeEffectID(), m_EffectsMap и m_IsCleanup.

Используется в CreateSound(), Car::HandleDoorsSound(), Car::HandleEngineSound(), HandleEngineSound(), Car::HandleSeatAdjustmentSound(), Motorbike_01_ColorBase::OnAnimationPhaseStarted(), Truck_01_Base::OnAnimationPhaseStarted(), PlayInWorld() и PlayOnObject().