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

◆ OnUpdate()

void AlarmClock_ColorBase::OnUpdate ( )
inlineprivate

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

111 {
112 if ( IsAlarmOn() )
113 {
114 //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
115 int alarm_hand_in_minutes = ConvertAlarmHand01ToMins12h(m_AlarmTime01);
116
117 int pass, hour, minute;
118 GetGame().GetWorld().GetDate(pass, pass, pass, hour, minute);
119
120 int curr_time_in_minutes = ConvertTimeToMins12h(hour, minute);
121
122 //Print(GetAlarmInMin());
123
124 if ( alarm_hand_in_minutes == curr_time_in_minutes )
125 {
127 }
128 }
129
130 if ( IsRinging())
131 {
133
135 {
136 TurnOff();
137 }
138 else if ( m_NoiseSystem )
139 {
140 m_NoiseSystem.AddNoiseTarget( GetPosition(), UPDATE_TICK_RATE, m_NoisePar, NoiseAIEvaluate.GetNoiseReduction(GetGame().GetWeather()));
141 }
142 }
143 }
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
static ref NoiseParams m_NoisePar
Определения AlarmClock.c:9
static NoiseSystem m_NoiseSystem
Определения AlarmClock.c:10
proto native World GetWorld()
proto void GetDate(out int year, out int month, out int day, out int hour, out int minute)
Get actual ingame world time.
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки ConvertAlarmHand01ToMins12h(), ConvertTimeToMins12h(), World::GetDate(), GetGame(), NoiseAIEvaluate::GetNoiseReduction(), GetPosition, GetRingingDurationMax(), CGame::GetWorld(), IsAlarmOn(), IsRinging(), m_AlarmTime01, m_NoisePar, m_NoiseSystem, m_RingingDuration, MakeRingingStart(), TurnOff() и UPDATE_TICK_RATE.