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

◆ CanPlay()

bool VehicleVFXData::CanPlay ( )
inlineprotected

true if enough time has elapsed since the last playback (or it never played / no cooldown set)

g_Game.GetTime() is in milliseconds -> compare against cooldown converted to ms

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

44 {
45 if (m_CooldownSec <= 0 || m_LastPlayedTime == -1)
46 return true;
47
49 return (g_Game.GetTime() - m_LastPlayedTime) >= (int)(m_CooldownSec * 1000);
50 }
ActionOverrideData int
DayZGame g_Game
Определения DayZGame.c:4074
int m_LastPlayedTime
g_Game.GetTime() (ms) when this effect last started; -1 = never played
Определения VehicleVFXComponent.c:12
float m_CooldownSec
minimum seconds required between playbacks (0 = no guard)
Определения VehicleVFXComponent.c:13

Перекрестные ссылки g_Game, int, m_CooldownSec и m_LastPlayedTime.

Используется в VehicleVFXComponent::CanPlayEffectData().