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

◆ MaxLifetimeRefreshCalc()

void Entity::MaxLifetimeRefreshCalc ( )
inlineprivate

Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)

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

350 {
351 if ( (!GetGame().IsMultiplayer() || GetGame().IsServer()) && GetEconomyProfile() )
352 {
353 float lifetime = GetEconomyProfile().GetLifetime();
354 int frequency = GetCEApi().GetCEGlobalInt("FlagRefreshFrequency");
355 if ( frequency <= 0 )
356 {
357 frequency = GameConstants.REFRESHER_FREQUENCY_DEFAULT;
358 }
359
360 if ( frequency <= lifetime )
361 {
362 m_RefresherViable = true;
364 }
365 }
366 }
proto native CEApi GetCEApi()
Get the CE API.
proto native float GetLifetime()
proto native CEItemProfile GetEconomyProfile()
Get economy item profile (if assigned, otherwise null)
bool m_RefresherViable
Определения EntityAI.c:104
proto native void SetSynchDirty()
Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take ef...
proto native CGame GetGame()

Перекрестные ссылки GetCEApi(), GetEconomyProfile(), GetGame(), m_RefresherViable, GameConstants::REFRESHER_FREQUENCY_DEFAULT и SetSynchDirty().

Используется в EEInit().