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