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

◆ OnBeforeChange()

bool WeatherPhenomenon::OnBeforeChange ( float change,
float time )
inlineprivate

Is called every time the Phenomenon computes new forecast.

Заметки
Called on server only.
Аргументы
changeComputed change of forecast value.
timeSeconds when the next forecast will be computed.
Возвращает
True when script modifies state of this phenomenon false otherwise.

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

126 {
127 // check if mission forces use of custom weather
128 Weather weather = g_Game.GetWeather();
129
130 if ( weather.GetMissionWeather() )
131 return false;
132
133 if (weather.GetWeatherUpdateFrozen())
134 return true;
135
136 // check for active worlddata with custom onbeforechange behaviour
137 Mission currentMission = g_Game.GetMission();
138
139 if ( currentMission )
140 {
141 WorldData worldData = currentMission.GetWorldData();
142 if ( worldData )
143 {
144 return worldData.WeatherOnBeforeChange( GetType(), GetActual(), change, time );
145 }
146 }
147
148 return false;
149 }
DayZGame g_Game
Определения DayZGame.c:3868
WorldData GetWorldData()
Определения gameplay.c:743
bool GetMissionWeather()
Определения Weather.c:388
bool GetWeatherUpdateFrozen()
Определения Weather.c:398
proto native float GetActual()
proto native EWeatherPhenomenon GetType()
Returns type of this phenomenon.
bool WeatherOnBeforeChange(EWeatherPhenomenon type, float actual, float change, float time)
Определения WorldData.c:240

Перекрестные ссылки g_Game, GetActual(), Weather::GetMissionWeather(), GetType(), Weather::GetWeatherUpdateFrozen(), Mission::GetWorldData() и WorldData::WeatherOnBeforeChange().