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

◆ OnUpdate()

void AlarmClock_ColorBase::OnUpdate ( )
inlineprivate

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

113 {
114 if ( IsAlarmOn() )
115 {
116 //due to variable server time flow(day-night time accel), it's not possible to simply set a timer for X secs without some convoluted math/code, so we need to check at regular intervals
117 int alarm_hand_in_minutes = ConvertAlarmHand01ToMins12h(m_AlarmTime01);
118
119 int pass, hour, minute;
120 g_Game.GetWorld().GetDate(pass, pass, pass, hour, minute);
121
122 int curr_time_in_minutes = ConvertTimeToMins12h(hour, minute);
123
124 //Print(GetAlarmInMin());
125
126 if ( alarm_hand_in_minutes == curr_time_in_minutes )
127 {
129 }
130 }
131
132 if ( IsRinging())
133 {
135
137 {
138 TurnOff();
139 }
140 else if ( m_NoiseSystem )
141 {
143 }
144 }
145 }
enum EAlarmClockState m_AlarmTime01
void TurnOff()
Определения ClockBase.c:306
bool IsRinging()
Определения ClockBase.c:291
bool IsAlarmOn()
Определения ClockBase.c:296
float m_RingingDuration
Определения ClockBase.c:16
static int ConvertAlarmHand01ToMins12h(float time01)
Определения ClockBase.c:65
float GetRingingDurationMax()
Определения ClockBase.c:181
static const float UPDATE_TICK_RATE
Определения ClockBase.c:14
void MakeRingingStart()
Определения ClockBase.c:223
static int ConvertTimeToMins12h(int hour, int minute)
Определения ClockBase.c:81
DayZGame g_Game
Определения DayZGame.c:4074
static ref NoiseParams m_NoisePar
Определения AlarmClock.c:9
static NoiseSystem m_NoiseSystem
Определения AlarmClock.c:10
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки ConvertAlarmHand01ToMins12h(), ConvertTimeToMins12h(), g_Game, GetPosition(), GetRingingDurationMax(), IsAlarmOn(), IsRinging(), m_AlarmTime01, m_NoisePar, m_NoiseSystem, m_RingingDuration, MakeRingingStart(), TurnOff() и UPDATE_TICK_RATE.