summaryrefslogtreecommitdiffstats
path: root/src/render/Weather.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/render/Weather.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp
index bf3e51b4..771f85de 100644
--- a/src/render/Weather.cpp
+++ b/src/render/Weather.cpp
@@ -202,6 +202,7 @@ void CWeather::Update(void)
}
// Rain
+#ifndef VC_RAIN_NERF
float fNewRain;
if (NewWeatherType == WEATHER_RAINY) {
// if raining for >1 hour, values: 0, 0.33, 0.66, 0.99, switching every ~16.5s
@@ -223,6 +224,25 @@ void CWeather::Update(void)
else
Rain = Max(fNewRain, Rain - RAIN_CHANGE_SPEED * CTimer::GetTimeStep());
}
+#else
+ float fNewRain;
+ if (NewWeatherType == WEATHER_RAINY) {
+ // 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) {
+ 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, switching every ~16.5s
+ fNewRain = 0.25f + (((uint16)CTimer::GetTimeInMilliseconds() >> 14) & 1) * 0.25f;
+ }
+ fNewRain = Max(fNewRain, 0.5f);
+ }
+ else
+ fNewRain = 0.0f;
+ Rain = fNewRain;
+#endif
// Clouds
if (OldWeatherType != WEATHER_SUNNY)