553 {
554 float distanceDensity, heigthDensity, heightBias;
555 int year, month, day, hour, minute;
557
558 if ( hour < 6 && hour >= 3 )
559 {
560 heightBias =
m_Weather.GetDynVolFogHeightBias();
561
563 {
564 bool foggyMorning = Math.RandomIntInclusive(0,1);
565
566 if (foggyMorning)
567 {
569 }
570 else
571 {
573 }
574 }
575
577 {
578 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
579 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
580 }
581 else
582 {
583 distanceDensity = Math.Lerp( 0.5, 0.1, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
584 heigthDensity = Math.Lerp( 0.2, 1, lerpValue);
585 }
586 }
587 else if ( hour < 18 && hour >= 6 )
588 {
589 distanceDensity = Math.Lerp( 0.01, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
590 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
592 }
593 else
594 {
595 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
596 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
598 }
599
600 m_Weather.SetDynVolFogDistanceDensity(distanceDensity, changeTime);
601 m_Weather.SetDynVolFogHeightDensity(heigthDensity, changeTime);
602 m_Weather.SetDynVolFogHeightBias(heightBias, changeTime);
603 }
proto native World GetWorld()
proto void GetDate(out int year, out int month, out int day, out int hour, out int minute)
Get actual ingame world time.
ref WorldDataWeatherSettings m_WeatherDefaultSettings
proto native CGame GetGame()