DayZ 1.27
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 // check for active worlddata with custom onbeforechange behaviour
134 Mission currentMission = g_Game.GetMission();
135
136 if ( currentMission )
137 {
138 WorldData worldData = currentMission.GetWorldData();
139 if ( worldData )
140 {
141 return worldData.WeatherOnBeforeChange( GetType(), GetActual(), change, time );
142 }
143 }
144
145 return false;
146 }
DayZGame g_Game
Определения DayZGame.c:3868
WorldData GetWorldData()
Определения gameplay.c:743
bool GetMissionWeather()
Определения Weather.c:384
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(), Mission::GetWorldData() и WorldData::WeatherOnBeforeChange().