467 {
468 float distanceDensity, heigthDensity, heightBias;
469 int year, month, day, hour, minute;
471
472 if ( hour < 9 && hour >= 5 )
473 {
474 distanceDensity = Math.Lerp( 0.015, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
475 heigthDensity = Math.Lerp( 0.8, 1, lerpValue);
476
477 heightBias =
m_Weather.GetDynVolFogHeightBias();
478
480 {
481 int diceRoll = Math.RandomIntInclusive(1,100);
482
483 if (diceRoll < 50)
484 {
486 }
487 else if (diceRoll < 85)
488 {
489 heightBias = Math.RandomInt(80, 120);
490 }
491 else
492 {
493 heightBias = Math.RandomInt(120, 200);
494 }
495 }
496 }
497 else if ( hour < 18 && hour >= 9 )
498 {
499 distanceDensity = Math.Lerp( 0.01, 0.05, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
500 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
502 }
503 else
504 {
505 distanceDensity = Math.Lerp( 0.01, 0.03, lerpValue ) * Math.Clamp(1 - (windMagnitude /
m_Weather.GetWindMaximumSpeed()), 0.1, 1);
506 heigthDensity = Math.Lerp( 0.9, 1, lerpValue);
508 }
509
510 m_Weather.SetDynVolFogDistanceDensity(distanceDensity, changeTime);
511 m_Weather.SetDynVolFogHeightDensity(heigthDensity, changeTime);
512 m_Weather.SetDynVolFogHeightBias(heightBias, changeTime);
513 }
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()