DayZ 1.29
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)

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 361

362 {
363 if ( (!g_Game.IsMultiplayer() || g_Game.IsServer()) && GetEconomyProfile() )
364 {
365 float lifetime = GetEconomyProfile().GetLifetime();
366 int frequency = GetCEApi().GetCEGlobalInt("FlagRefreshFrequency");
367 if ( frequency <= 0 )
368 {
369 frequency = GameConstants.REFRESHER_FREQUENCY_DEFAULT;
370 }
371
372 if ( frequency <= lifetime )
373 {
374 m_RefresherViable = true;
376 }
377 }
378 }
proto native CEApi GetCEApi()
Get the CE API.
DayZGame g_Game
Определения DayZGame.c:3942
proto native float GetLifetime()
proto native CEItemProfile GetEconomyProfile()
Get economy item profile (if assigned, otherwise null)
bool m_RefresherViable
proto native void SetSynchDirty()
Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take ef...

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

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