Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
chernarusplus.c
Go to the documentation of this file.
1//#define WEATHER_DATA_LOGGING
2class ChernarusPlusData extends WorldData
3{
4 //-------test variables & methods ------
5 #ifdef WEATHER_DATA_LOGGING
6 int overcastChangeCount = 0;
7 int badWeatherCount = 0;
8 int cloudyWeatherCount = 0;
9 int clearWeatherCount = 0;
10 int startYear = 0;
11 int startMonth = 0;
12 int startDay = 0;
13 int startHour = 0;
14 int startMinute = 0;
15 int currentDay = 0;
16 int daysToRun = 10;
17 bool dayInit = false;
18 #endif
19 //------------------------
20
21 //All Chernarus firing coordinates
22 protected static const ref array<vector> CHERNARUS_ARTY_STRIKE_POS =
23 {
24 "-500.00 165.00 5231.69",
25 "-500.00 300.00 9934.41",
26 "10406.86 192.00 15860.00",
27 "4811.75 370.00 15860.00",
28 "-500.00 453.00 15860.00"
29 };
30
31 override void Init()
32 {
33 super.Init();
34
35 // new temperature curve settings
36 m_Sunrise_Jan = 8.54;
37 m_Sunset_Jan = 15.52;
38 m_Sunrise_Jul = 3.26;
39 m_Sunset_Jul = 20.73;
40
41 int tempIdx;
42 m_MinTemps = {-3,-2,0,4,9,14,18,17,13,11,9,0}; //{-3,-2,0,4,9,14,18,17,12,7,4,0} original values
43 if (CfgGameplayHandler.GetEnvironmentMinTemps() && CfgGameplayHandler.GetEnvironmentMinTemps().Count() == 12)
44 {
45 for (tempIdx = 0; tempIdx < CfgGameplayHandler.GetEnvironmentMinTemps().Count(); tempIdx++)
46 {
47 m_MinTemps[tempIdx] = CfgGameplayHandler.GetEnvironmentMinTemps().Get(tempIdx);
48 }
49 }
50
51 m_MaxTemps = {3,5,7,14,19,24,26,25,18,14,10,5}; //{3,5,7,14,19,24,26,25,21,16,10,5} original values
52 if (CfgGameplayHandler.GetEnvironmentMaxTemps() && CfgGameplayHandler.GetEnvironmentMaxTemps().Count() == 12)
53 {
54 for (tempIdx = 0; tempIdx < CfgGameplayHandler.GetEnvironmentMaxTemps().Count(); tempIdx++)
55 {
56 m_MaxTemps[tempIdx] = CfgGameplayHandler.GetEnvironmentMaxTemps().Get(tempIdx);
57 }
58 }
59
60 m_FiringPos = CHERNARUS_ARTY_STRIKE_POS;
61
62 m_WorldWindCoef = 0.4;
63 m_CloudsTemperatureEffectModifier = 2.0;
64 m_TemperaturePerHeightReductionModifier = 0.012;
65
66 m_UniversalTemperatureSourceCapModifier = -1.0;
67
68 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
69 {
70 m_Weather.SetDynVolFogHeightBias(m_WeatherDefaultSettings.m_DefaultHeigthBias);
71
72 if (GetGame().IsMultiplayer())
73 {
74 float startingOvercast = Math.RandomFloat(0.2,0.75);
75 m_Weather.GetOvercast().Set(startingOvercast,0,5); //forcing a random weather at a clean server start and an instant change for overcast
76 CalculateVolFog(startingOvercast, m_Weather.GetWindSpeed(), 0);
77 }
78 }
79 }
80
81 override void SetupWeatherSettings()
82 {
83 super.SetupWeatherSettings();
84
85 m_WeatherDefaultSettings.m_StormThreshold = 0.9;
86 m_WeatherDefaultSettings.m_GlobalSuddenChance = 0;
87 m_WeatherDefaultSettings.m_BadWeatherSuddenChance = 0;
88 m_WeatherDefaultSettings.m_DefaultHeigthBias = 50;
89 }
90
91 override bool WeatherOnBeforeChange( EWeatherPhenomenon type, float actual, float change, float time )
92 {
93 #ifdef WEATHER_DATA_LOGGING
94 if ( !dayInit )
95 {
96 GetGame().GetWorld().GetDate(startYear, startMonth, startDay, startHour, startMinute);
97 dayInit = true;
98 }
99 #endif
100
101 float phmnTime = 5;
102 float phmnLength = 10;
103 float phmnValue = 0;
104
105 m_Weather.SetStorm( 1.0, m_WeatherDefaultSettings.m_StormThreshold, 45 );
106
107 m_Weather.SetRainThresholds( m_WeatherDefaultSettings.m_RainThreshold, 1.0, 60 );
108 m_Weather.SetWindMaximumSpeed( 20 );
109
110 if (m_Weather.GetDynVolFogHeightBias() < m_WeatherDefaultSettings.m_DefaultHeigthBias)
111 {
112 m_Weather.SetDynVolFogHeightBias(m_WeatherDefaultSettings.m_DefaultHeigthBias);
113 }
114
115 switch (type)
116 {
117 //-----------------------------------------------------------------------------------------------------------------------------
118 case EWeatherPhenomenon.OVERCAST:
119 {
120 #ifdef WEATHER_DATA_LOGGING
121 overcastChangeCount++;
122 #endif
123
124 float windDirection, windMag;
125
126 //went something goes wrong choose some default random weather
127 phmnValue = Math.RandomFloatInclusive( 0.2, 0.7 );
128 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
129 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
130
131 //----
132 //calculate next weather
133 m_Chance = Math.RandomIntInclusive( 0, 100 );
134
135 //--
136 if ( m_LastWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
137 {
138 m_ClearWeatherChance -= ( m_StepValue * m_SameWeatherCnt); //decrease the chance of the same weather
139 }
140
141 if ( m_LastWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
142 {
143 m_ClearWeatherChance += ( m_StepValue * m_SameWeatherCnt); //increase the chance of the better weather
144 }
145
146 if ( m_LastWeather == WorldDataWeatherConstants.BAD_WEATHER )
147 {
148 m_ClearWeatherChance += m_StepValue; //increase the chance of the better weather slightly
149 m_BadWeatherChance += (( m_StepValue * m_SameWeatherCnt ) + m_StepValue ); //decrease the chance of the same weather rapidly
150 }
151
152 //----
153 if ( m_Chance < m_ClearWeatherChance )
154 {
155 m_ChoosenWeather = WorldDataWeatherConstants.CLEAR_WEATHER;
156 if ( m_LastWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
157 m_SameWeatherCnt ++;
158 }
159 else if ( m_Chance > m_BadWeatherChance )
160 {
161 m_ChoosenWeather = WorldDataWeatherConstants.BAD_WEATHER;
162 if ( m_LastWeather == WorldDataWeatherConstants.BAD_WEATHER )
163 m_SameWeatherCnt ++;
164 }
165 else
166 {
167 m_ChoosenWeather = WorldDataWeatherConstants.CLOUDY_WEATHER;
168 if ( m_LastWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
169 m_SameWeatherCnt ++;
170 }
171
172 if ( m_ChoosenWeather != m_LastWeather )
173 m_SameWeatherCnt = 0;
174
175 m_ClearWeatherChance = m_WeatherDefaultSettings.m_ClearWeatherChance;
176 m_BadWeatherChance = m_WeatherDefaultSettings.m_BadWeatherChance;
177
178 //----
179 //set choosen weather
180 if ( m_ChoosenWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
181 {
182 m_LastWeather = WorldDataWeatherConstants.CLEAR_WEATHER;
183 #ifdef WEATHER_DATA_LOGGING
184 clearWeatherCount++;
185 #endif
186
187 phmnValue = Math.RandomFloatInclusive( 0.0, 0.3 );
188 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
189 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
190 }
191
192 if ( m_ChoosenWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
193 {
194 m_LastWeather = WorldDataWeatherConstants.CLOUDY_WEATHER;
195 #ifdef WEATHER_DATA_LOGGING
196 cloudyWeatherCount++;
197 #endif
198
199 phmnValue = Math.RandomFloatInclusive( 0.3, 0.6 );
200 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
201 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
202 }
203
204 if ( m_ChoosenWeather == WorldDataWeatherConstants.BAD_WEATHER )
205 {
206 m_LastWeather = WorldDataWeatherConstants.BAD_WEATHER;
207 #ifdef WEATHER_DATA_LOGGING
208 badWeatherCount++;
209 #endif
210
211 phmnValue = Math.RandomFloatInclusive( 0.6, 1.0 );
212 phmnTime = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinTime, m_WeatherDefaultSettings.m_OvercastMaxTime );
213 phmnLength = Math.RandomIntInclusive( m_WeatherDefaultSettings.m_OvercastMinLength, m_WeatherDefaultSettings.m_OvercastMaxLength );
214 }
215
216 m_Weather.GetOvercast().Set( phmnValue, phmnTime, phmnLength );
217
218 CalculateWind( m_ChoosenWeather, false, windMag, windDirection );
219 m_Weather.GetWindMagnitude().Set( windMag, phmnTime * WIND_MAGNITUDE_TIME_MULTIPLIER , phmnTime * (1 - WIND_MAGNITUDE_TIME_MULTIPLIER) ); // magnitude change happens during the overcast change, after overcast change finishes wind will decrease a bit
220 m_Weather.GetWindDirection().Set( windDirection, phmnTime * WIND_DIRECTION_TIME_MULTIPLIER , phmnTime - (phmnTime * WIND_DIRECTION_TIME_MULTIPLIER) + phmnLength + 1000 );
221
222 CalculateVolFog(phmnValue, windMag, phmnTime);
223
224 Debug.WeatherLog(string.Format("Chernarus::Weather::Overcast:: (%1) overcast: %2", g_Game.GetDayTime(), actual));
225 Debug.WeatherLog(string.Format("Chernarus::Weather::Overcast::Rain:: (%1) %2", g_Game.GetDayTime(), m_Weather.GetRain().GetActual()));
226
227 #ifdef WEATHER_DATA_LOGGING
228 int testYear = 0;
229 int testMonth = 0;
230 int testDay = 0;
231 int testHour = 0;
232 int testMinute = 0;
233 GetGame().GetWorld().GetDate(testYear, testMonth, testDay, testHour, testMinute);
234
235 if ( testDay - startDay > currentDay && testHour - startHour >= 0 && testMinute - startMinute >= 0 )
236 {
237 FileHandle file = OpenFile("$profile:OvercastCountsCharnarus" + (currentDay + 1) + ".log", FileMode.WRITE);
238 FPrintln(file, "================================================================");
239 FPrintln(file," ================== Day " + (currentDay + 1) + " ================== ");
240 FPrintln(file, "================================================================");
241 FPrintln(file, "Overcast Change Count: " + overcastChangeCount);
242 FPrintln(file, "Bad Weather Change Count: " + badWeatherCount);
243 FPrintln(file, "Cloudy Weather Count: " + cloudyWeatherCount);
244 FPrintln(file, "Clear Weather Count: " + clearWeatherCount);
245
246 currentDay++;
247 CloseFile(file);
248 if ( currentDay == daysToRun )
249 {
250 g_Game.RequestExit(IDC_MAIN_QUIT);
251 }
252
253 overcastChangeCount = 0;
254 badWeatherCount = 0;
255 cloudyWeatherCount = 0;
256 clearWeatherCount = 0;
257 }
258 #endif
259
260 return true;
261 }
262 //-----------------------------------------------------------------------------------------------------------------------------
263 case EWeatherPhenomenon.RAIN:
264 {
265 float actualOvercast = m_Weather.GetOvercast().GetActual();
266
267 m_Chance = Math.RandomIntInclusive( 0, 100 );
268 phmnValue = 0.2;
269 phmnTime = 90;
270 phmnLength = 30;
271
272 if ( actualOvercast <= m_WeatherDefaultSettings.m_RainThreshold )
273 {
274 m_Weather.GetRain().Set( 0.0, m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
275 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain::ForceEnd:: (%1) %2 -> 0", g_Game.GetDayTime(), actual));
276 return true;
277 }
278
279 if ( actualOvercast > m_WeatherDefaultSettings.m_StormThreshold )
280 {
281 phmnValue = Math.RandomFloatInclusive( 0.8, 1.0 );
282 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
283 phmnLength = 0;
284
285 m_Weather.GetRain().Set( phmnValue, phmnTime, phmnLength );
286 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain::ForceStorm:: (%1) %2 -> %3", g_Game.GetDayTime(), actual, phmnValue));
287 return true;
288 }
289
290 //make a differnce in "normal rain"
291 if ( actualOvercast < 0.75 )
292 {
293 if ( m_Chance < 30 )
294 {
295 phmnValue = Math.RandomFloatInclusive( 0.1, 0.3 );
296 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
297 phmnLength = 0;
298 }
299 else if ( m_Chance < 60 )
300 {
301 phmnValue = Math.RandomFloatInclusive( 0.2, 0.5 );
302 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
303 phmnLength = 0;
304 }
305 else if ( m_Chance < 80 )
306 {
307 phmnValue = Math.RandomFloatInclusive( 0.0, 0.2 );
308 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
309 phmnLength = 0;
310 }
311 else //also have the chance to not have rain at all
312 {
313 phmnValue = 0;
314 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
315 phmnLength = m_WeatherDefaultSettings.m_RainLengthMax;
316 }
317 }
318 else
319 {
320 if ( m_Chance < 25 )
321 {
322 phmnValue = Math.RandomFloatInclusive( 0.5, 0.7 );
323 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
324 phmnLength = 0;
325 }
326 else if ( m_Chance < 50 )
327 {
328 phmnValue = Math.RandomFloatInclusive( 0.2, 0.4 );
329 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
330 phmnLength = 0;
331 }
332 else if ( m_Chance < 75 )
333 {
334 phmnValue = Math.RandomFloatInclusive( 0.4, 0.6 );
335 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
336 phmnLength = 0;
337 }
338 else //also have the chance to not have rain at all
339 {
340 phmnValue = 0;
341 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
342 phmnLength = m_WeatherDefaultSettings.m_RainLengthMax;
343 }
344 }
345
346 m_Weather.GetRain().Set( phmnValue, phmnTime, phmnLength );
347
348 Debug.WeatherLog(string.Format("Chernarus::Weather::Rain:: (%1) %2", g_Game.GetDayTime(), actual));
349
350 return true;
351 }
352 //-----------------------------------------------------------------------------------------------------------------------------
353 case EWeatherPhenomenon.FOG:
354 {
355 float fogMin = 0.0;
356 float fogMax = 0.15;
357 float fogTime = 1800.0;
358
359 float fogyMorning = Math.RandomFloatInclusive( 0.0, 1.0 );
360
361 if ( fogyMorning > 0.85 )
362 {
363 if ( (g_Game.GetDayTime() > 4 && g_Game.GetDayTime() < 7 ) )
364 {
365 fogMin = 0.10;
366 fogMax = 0.35;
367 fogTime = 300;
368 }
369 }
370
371 if ( m_Weather.GetOvercast().GetActual() < 0.3 )
372 {
373 fogMin = 0.0;
374 fogMax = 0.08;
375 fogTime = 900.0;
376 }
377
378 m_Weather.GetFog().Set( Math.RandomFloatInclusive( fogMin, fogMax ), fogTime, 0);
379
380 Debug.WeatherLog(string.Format("Chernarus::Weather::Fog:: (%1) %2", g_Game.GetDayTime(), actual));
381
382 return true;
383 }
384 //-----------------------------------------------------------------------------------------------------------------------------
385 case EWeatherPhenomenon.WIND_MAGNITUDE:
386 {
387 phmnTime = Math.RandomInt( m_WeatherDefaultSettings.m_RainTimeMin, m_WeatherDefaultSettings.m_RainTimeMax );
388 m_Weather.GetWindMagnitude().Set(m_Weather.GetWindMagnitude().GetActual() * 0.75, phmnTime , m_WeatherDefaultSettings.m_OvercastMaxLength); // next change will be happen with the overcast change
389
390 return true;
391 }
392 }
393
394 return false;
395 }
396
397 protected override void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
398 {
399 magnitude = 5;
400 direction = 0;
401
402 float windChance = Math.RandomIntInclusive( 0, 100 );
403
404 if ( newWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
405 {
406 if ( windChance < 30 )
407 {
408 magnitude = Math.RandomFloatInclusive( 6 , 10 );
409 direction = Math.RandomFloatInclusive( -1.0 , -0.5);
410 }
411 else if ( windChance < 75 )
412 {
413 magnitude = Math.RandomFloatInclusive( 8 , 12 );
414 direction = Math.RandomFloatInclusive( -1.3 , -0.9);
415 }
416 else
417 {
418 magnitude = Math.RandomFloatInclusive( 4 , 6 );
419 direction = Math.RandomFloatInclusive( -0.6 , 0.0);
420 }
421
422 }
423 else if ( newWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
424 {
425 if ( windChance < 45 )
426 {
427 magnitude = Math.RandomFloatInclusive( 6 , 10 );
428 direction = Math.RandomFloatInclusive( -3.14 , -2.4);
429 }
430 else if ( windChance < 90 )
431 {
432 magnitude = Math.RandomFloatInclusive( 8 , 12 );
433 direction = Math.RandomFloatInclusive( -2.6, -2.0);
434 }
435 else
436 {
437 magnitude = Math.RandomFloatInclusive( 10 , 14 );
438 direction = Math.RandomFloatInclusive( -2.2 , -1.4);
439 }
440 }
441 else
442 {
443 if ( suddenChange || m_Weather.GetOvercast().GetActual() > m_WeatherDefaultSettings.m_StormThreshold || m_Weather.GetOvercast().GetForecast() - m_Weather.GetOvercast().GetActual() >= 0.4 )
444 {
445 magnitude = Math.RandomFloatInclusive( 14 , 17 );
446 direction = Math.RandomFloatInclusive( 0.9 , 1.45);
447 }
448 else if ( windChance < 45 )
449 {
450 magnitude = Math.RandomFloatInclusive( 9 , 12 );
451 direction = Math.RandomFloatInclusive( 1.45, 1.7);
452 }
453 else if ( windChance < 90 )
454 {
455 magnitude = Math.RandomFloatInclusive( 7 , 10 );
456 direction = Math.RandomFloatInclusive( 1.6 , 2);
457 }
458 else
459 {
460 magnitude = Math.RandomFloatInclusive( 4 , 8 );
461 direction = Math.RandomFloatInclusive( 1.9, 2.2 );
462 }
463 }
464 }
465
466 protected override void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
467 {
468 float distanceDensity, heigthDensity, heightBias;
469 int year, month, day, hour, minute;
470 GetGame().GetWorld().GetDate(year, month, day, hour, minute);
471
472 if ( hour < 9 && hour >= 5 )
473 {
474 distanceDensity = Math.Lerp( 0.015, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude / m_Weather.GetWindMaximumSpeed()), 0.1, 1);
475 heigthDensity = Math.Lerp( 0.8, 1, lerpValue);
476
477 heightBias = m_Weather.GetDynVolFogHeightBias();
478
479 if (heightBias == m_WeatherDefaultSettings.m_DefaultHeigthBias) //checks if the randomization has been done
480 {
481 int diceRoll = Math.RandomIntInclusive(1,100);
482
483 if (diceRoll < 50)
484 {
485 heightBias = Math.RandomInt(m_WeatherDefaultSettings.m_DefaultHeigthBias + 1, 80);
486 }
487 else if (diceRoll < 85)
488 {
489 heightBias = Math.RandomInt(80, 120);
490 }
491 else
492 {
493 heightBias = Math.RandomInt(120, 200);
494 }
495 }
496 }
497 else if ( hour < 18 && hour >= 9 )
498 {
499 distanceDensity = Math.Lerp( 0.01, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude / m_Weather.GetWindMaximumSpeed()), 0.1, 1);
500 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
501 heightBias = m_WeatherDefaultSettings.m_DefaultHeigthBias;
502 }
503 else
504 {
505 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude / m_Weather.GetWindMaximumSpeed()), 0.1, 1);
506 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
507 heightBias = m_WeatherDefaultSettings.m_DefaultHeigthBias;
508 }
509
510 m_Weather.SetDynVolFogDistanceDensity(distanceDensity, changeTime);
511 m_Weather.SetDynVolFogHeightDensity(heigthDensity, changeTime);
512 m_Weather.SetDynVolFogHeightBias(heightBias, changeTime);
513 }
514
515 bool LogWeatherData() //called from mission file to check if the logging should start
516 {
517 #ifdef WEATHER_DATA_LOGGING
518 return true;
519 #endif
520 return false;
521 }
522
524 const int CLEAR_WEATHER = 1;
525 const int CLOUDY_WEATHER = 2;
526 const int BAD_WEATHER = 3;
527
529 const int OVERCAST_MIN_TIME = 600;
530 const int OVERCAST_MAX_TIME = 900;
531
532 const float RAIN_THRESHOLD = 0.6;
533 const int RAIN_TIME_MIN = 60;
534 const int RAIN_TIME_MAX = 120;
535 const float STORM_THRESHOLD = 0.9;
536
537 protected int m_clearWeatherChance = m_ClearWeatherChance;
538 protected int m_badWeatherChance = m_BadWeatherChance;
539
540 protected int m_sameWeatherCnt = m_SameWeatherCnt;
541 protected int m_stepValue = m_StepValue;
542 protected int m_chance = m_Chance;
543
544 protected int m_choosenWeather = m_ChoosenWeather;
545 protected int m_lastWeather = m_LastWeather;
546}
Definition debug.c:2
Definition enmath.c:7
Keeps information about currently loaded world, like temperature.
Definition worlddata.c:3
override void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
override bool WeatherOnBeforeChange(EWeatherPhenomenon type, float actual, float change, float time)
override void SetupWeatherSettings()
void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
int m_ClearWeatherChance
Definition worlddata.c:37
static const ref array< vector > CHERNARUS_ARTY_STRIKE_POS
bool LogWeatherData()
int m_Chance
Definition worlddata.c:46
int m_LastWeather
Definition worlddata.c:48
void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
int m_SameWeatherCnt
Definition worlddata.c:44
int m_BadWeatherChance
weather related
Definition worlddata.c:36
int m_StepValue
Definition worlddata.c:45
override void Init()
override void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
int m_ChoosenWeather
Definition worlddata.c:47
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZGame g_Game
Definition dayzgame.c:3868
proto native CGame GetGame()
FileMode
Definition ensystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Definition ensystem.c:390
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
const int IDC_MAIN_QUIT
Definition constants.c:144
Weather m_Weather
EWeatherPhenomenon
Definition weather.c:11
const int BAD_WEATHER
Definition worlddata.c:420
class WorldData CLEAR_WEATHER
const int CLOUDY_WEATHER
Definition worlddata.c:419