469 {
470 float distanceDensity, heigthDensity, heightBias;
471 int year, month, day, hour, minute;
472 g_Game.GetWorld().GetDate(year, month, day, hour, minute);
473
474 if ( hour < 9 && hour >= 5 )
475 {
476 distanceDensity = Math.Lerp( 0.015, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
477 heigthDensity = Math.Lerp( 0.8, 1, lerpValue);
478
479 heightBias =
m_Weather.GetDynVolFogHeightBias();
480
482 {
483 int diceRoll = Math.RandomIntInclusive(1,100);
484
485 if (diceRoll < 50)
486 {
488 }
489 else if (diceRoll < 85)
490 {
491 heightBias = Math.RandomInt(80, 120);
492 }
493 else
494 {
495 heightBias = Math.RandomInt(120, 200);
496 }
497 }
498 }
499 else if ( hour < 18 && hour >= 9 )
500 {
501 distanceDensity = Math.Lerp( 0.01, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
502 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
504 }
505 else
506 {
507 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
508 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
510 }
511
512 m_Weather.SetDynVolFogDistanceDensity(distanceDensity, changeTime);
513 m_Weather.SetDynVolFogHeightDensity(heigthDensity, changeTime);
514 m_Weather.SetDynVolFogHeightBias(heightBias, changeTime);
515 }
ref WorldDataWeatherSettings m_WeatherDefaultSettings