summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-01 18:37:17 +0100
committeraap <aap@papnet.eu>2021-01-01 18:37:17 +0100
commitec00a1eb0db3131e5a9f563a95f2a8a961a44c6a (patch)
tree7729921d75fbcdd93a25d45560e6c1a4cd9d1baf /src/render
parentFix wrong sound when bumping peds (diff)
downloadre3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.tar
re3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.tar.gz
re3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.tar.bz2
re3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.tar.lz
re3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.tar.xz
re3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.tar.zst
re3-ec00a1eb0db3131e5a9f563a95f2a8a961a44c6a.zip
Diffstat (limited to '')
-rw-r--r--src/render/Weather.cpp8
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);
}