DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ChernarusPlus.c
См. документацию.
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
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 (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 //----
154 {
155 m_ChoosenWeather = WorldDataWeatherConstants.CLEAR_WEATHER;
156 if ( m_LastWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
158 }
159 else if ( m_Chance > m_BadWeatherChance )
160 {
161 m_ChoosenWeather = WorldDataWeatherConstants.BAD_WEATHER;
162 if ( m_LastWeather == WorldDataWeatherConstants.BAD_WEATHER )
164 }
165 else
166 {
167 m_ChoosenWeather = WorldDataWeatherConstants.CLOUDY_WEATHER;
168 if ( m_LastWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
170 }
171
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
539
541 protected int m_stepValue = m_StepValue;
542 protected int m_chance = m_Chance;
543
546}
DayZGame g_Game
Определения DayZGame.c:3868
@ Count
Определения RandomGeneratorSyncManager.c:8
EWeatherPhenomenon
Определения Weather.c:11
proto native World GetWorld()
static array< float > GetEnvironmentMaxTemps()
Определения CfgGameplayHandler.c:151
static array< float > GetEnvironmentMinTemps()
Определения CfgGameplayHandler.c:146
static void WeatherLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения Debug.c:195
Определения Debug.c:2
Определения EnMath.c:7
proto void GetDate(out int year, out int month, out int day, out int hour, out int minute)
Get actual ingame world time.
override void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
Определения ChernarusPlus.c:466
const int BAD_WEATHER
Определения ChernarusPlus.c:526
int m_choosenWeather
Определения ChernarusPlus.c:544
const int OVERCAST_MIN_TIME
DEPRECATED (see WorldDataWeatherSettings)
Определения ChernarusPlus.c:529
const float STORM_THRESHOLD
Определения ChernarusPlus.c:535
override bool WeatherOnBeforeChange(EWeatherPhenomenon type, float actual, float change, float time)
Определения ChernarusPlus.c:91
override void SetupWeatherSettings()
Определения ChernarusPlus.c:81
int m_chance
Определения ChernarusPlus.c:542
void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
const int OVERCAST_MAX_TIME
Определения ChernarusPlus.c:530
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_badWeatherChance
Определения ChernarusPlus.c:538
const int RAIN_TIME_MIN
Определения ChernarusPlus.c:533
int m_sameWeatherCnt
Определения ChernarusPlus.c:540
int m_ClearWeatherChance
Определения WorldData.c:37
ref WorldDataWeatherSettings m_WeatherDefaultSettings
Определения WorldData.c:31
const int CLOUDY_WEATHER
Определения ChernarusPlus.c:525
static const ref array< vector > CHERNARUS_ARTY_STRIKE_POS
Определения ChernarusPlus.c:22
ref array< vector > m_FiringPos
Определения WorldData.c:28
int m_stepValue
Определения ChernarusPlus.c:541
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_clearWeatherChance
Определения ChernarusPlus.c:537
bool LogWeatherData()
Определения ChernarusPlus.c:515
int m_Chance
Определения WorldData.c:46
int m_LastWeather
Определения WorldData.c:48
const int RAIN_TIME_MAX
Определения ChernarusPlus.c:534
int m_lastWeather
Определения ChernarusPlus.c:545
float m_MaxTemps[12]
Определения WorldData.c:22
void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
int m_SameWeatherCnt
Определения WorldData.c:44
float m_MinTemps[12]
Определения WorldData.c:23
const int CLEAR_WEATHER
DEPRECATED (see WorldDataWeatherConstants)
Определения ChernarusPlus.c:524
int m_BadWeatherChance
weather related
Определения WorldData.c:36
int m_StepValue
Определения WorldData.c:45
float WIND_MAGNITUDE_TIME_MULTIPLIER
Определения WorldData.c:15
override void Init()
Определения ChernarusPlus.c:31
override void CalculateWind(int newWeather, bool suddenChange, out float magnitude, out float direction)
Определения ChernarusPlus.c:397
float m_UniversalTemperatureSourceCapModifier
Определения WorldData.c:41
Weather m_Weather
Определения WorldData.c:18
const float RAIN_THRESHOLD
Определения ChernarusPlus.c:532
float m_Sunset_Jul
Определения WorldData.c:27
int m_ChoosenWeather
Определения WorldData.c:47
float m_Sunrise_Jul
Определения WorldData.c:26
Keeps information about currently loaded world, like temperature.
Определения WorldData.c:3
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
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
Определения constants.c:144