diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-01 21:06:44 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-01 21:06:44 +0100 |
commit | a7f053776a432373104f1a93a03dbdcc3bee4557 (patch) | |
tree | f87ce083460cb273d89e216bdb9b5f1a6d15d08f /src/render | |
parent | bad stuff (diff) | |
parent | rain fix (diff) | |
download | re3-a7f053776a432373104f1a93a03dbdcc3bee4557.tar re3-a7f053776a432373104f1a93a03dbdcc3bee4557.tar.gz re3-a7f053776a432373104f1a93a03dbdcc3bee4557.tar.bz2 re3-a7f053776a432373104f1a93a03dbdcc3bee4557.tar.lz re3-a7f053776a432373104f1a93a03dbdcc3bee4557.tar.xz re3-a7f053776a432373104f1a93a03dbdcc3bee4557.tar.zst re3-a7f053776a432373104f1a93a03dbdcc3bee4557.zip |
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/Weather.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp index 52e93951..17c45fcd 100644 --- a/src/render/Weather.cpp +++ b/src/render/Weather.cpp @@ -226,15 +226,15 @@ void CWeather::Update(void) // Rain float fNewRain; if (NewWeatherType == WEATHER_RAINY || NewWeatherType == WEATHER_HURRICANE) { - // if raining for >1 hour, values: 0, 0.33, 0.66, 0.99, switching every ~16.5s - fNewRain = ((uint16)CTimer::GetTimeInMilliseconds() >> 14) * 0.33f; + // if raining for >1 hour, values: 0, 0.33, switching every ~16.5s + fNewRain = (((uint16)CTimer::GetTimeInMilliseconds() >> 14) & 1) * 0.33f; if (OldWeatherType != WEATHER_RAINY && OldWeatherType != WEATHER_HURRICANE) { if (InterpolationValue < 0.4f) // if rain has just started (<24 minutes), always 0.5 fNewRain = 0.5f; else - // if rain is ongoing for >24 minutes, values: 0.25, 0.5, 0.75, 1.0, switching every ~16.5s - fNewRain = 0.25f + ((uint16)CTimer::GetTimeInMilliseconds() >> 14) * 0.25f; + // if rain is ongoing for >24 minutes, values: 0.25, 0.5, switching every ~16.5s + fNewRain = 0.25f + (((uint16)CTimer::GetTimeInMilliseconds() >> 14) & 1) * 0.25f; } fNewRain = Max(fNewRain, 0.5f); } |