554 {
555 float distanceDensity, heigthDensity, heightBias;
556 int year, month, day, hour, minute;
557 g_Game.GetWorld().GetDate(year, month, day, hour, minute);
558
559 if ( hour < 6 && hour >= 3 )
560 {
561 heightBias =
m_Weather.GetDynVolFogHeightBias();
562
564 {
565 bool foggyMorning = Math.RandomIntInclusive(0,1);
566
567 if (foggyMorning)
568 {
570 }
571 else
572 {
574 }
575 }
576
578 {
579 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
580 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
581 }
582 else
583 {
584 distanceDensity = Math.Lerp( 0.5, 0.1, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
585 heigthDensity = Math.Lerp( 0.2, 1, lerpValue);
586 }
587 }
588 else if ( hour < 18 && hour >= 6 )
589 {
590 distanceDensity = Math.Lerp( 0.01, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
591 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
593 }
594 else
595 {
596 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
597 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
599 }
600
601 m_Weather.SetDynVolFogDistanceDensity(distanceDensity, changeTime);
602 m_Weather.SetDynVolFogHeightDensity(heigthDensity, changeTime);
603 m_Weather.SetDynVolFogHeightBias(heightBias, changeTime);
604 }
ref WorldDataWeatherSettings m_WeatherDefaultSettings