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

◆ CalculateWind() [2/2]

override void WorldData::CalculateWind ( int newWeather,
bool suddenChange,
out float magnitude,
out float direction )
inlineprotected

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

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 }
ref WorldDataWeatherSettings m_WeatherDefaultSettings
Определения WorldData.c:31
Weather m_Weather
Определения WorldData.c:18

Перекрестные ссылки m_Weather, m_WeatherDefaultSettings, Math::RandomFloatInclusive() и Math::RandomIntInclusive().