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

◆ CalculateWind()

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

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

588 {
589 magnitude = 5;
590 direction = 0;
591
592 float windChance = Math.RandomIntInclusive( 0, 100 );
593
594 if ( newWeather == WorldDataWeatherConstants.CLEAR_WEATHER )
595 {
596 if ( windChance < 15 )
597 {
598 magnitude = Math.RandomFloatInclusive( 2 , 4 );
599 direction = Math.RandomFloatInclusive( -0.35 , 0.35);
600 }
601 else if ( windChance < 90 )
602 {
603 magnitude = Math.RandomFloatInclusive( 3 , 6 );
604 direction = Math.RandomFloatInclusive( 0 , 2.2);
605 }
606 else
607 {
608 magnitude = Math.RandomFloatInclusive( 8 , 15 );
609 direction = Math.RandomFloatInclusive( -3.0 , -2.25);
610 }
611 }
612 else if ( newWeather == WorldDataWeatherConstants.CLOUDY_WEATHER )
613 {
614 if ( windChance < 45 )
615 {
616 magnitude = Math.RandomFloatInclusive( 5 , 10 );
617 direction = Math.RandomFloatInclusive( 1.0 , 1.25);
618 }
619 else if ( windChance < 90 )
620 {
621 magnitude = Math.RandomFloatInclusive( 8 , 14 );
622 direction = Math.RandomFloatInclusive( -1.8, -1.4);
623 }
624 else
625 {
626 magnitude = Math.RandomFloatInclusive( 2 , 4 );
627 direction = Math.RandomFloatInclusive( -1.0 , -0.4);
628 }
629 }
630 else
631 {
632 if ( suddenChange || m_Weather.GetOvercast().GetForecast() > 0.85 )
633 {
634 magnitude = Math.RandomFloatInclusive( 18 , 20 );
635 direction = Math.RandomFloatInclusive( 2.25 , 3.14);
636 }
637 else if ( windChance < 45 )
638 {
639 magnitude = Math.RandomFloatInclusive( 6 , 12 );
640 direction = Math.RandomFloatInclusive( -1.8 , -1.4);
641 }
642 else if ( windChance < 90 )
643 {
644 magnitude = Math.RandomFloatInclusive( 8 , 20 );
645 direction = Math.RandomFloatInclusive( 1.6 , 2.0);
646 }
647 else
648 {
649 magnitude = Math.RandomFloatInclusive( 4 , 10 );
650 direction = Math.RandomFloatInclusive( 1.5, 1.75 );
651 }
652 }
653
654 CalculateVolFog(m_Weather.GetSnowfall().GetForecast(), magnitude, 60);
655 }
override void CalculateVolFog(float lerpValue, float windMagnitude, float changeTime)
Определения Sakhal.c:657
Weather m_Weather
Определения WorldData.c:18

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

Используется в WeatherOnBeforeChange().