mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 22:19:37 +00:00
rain fix
This commit is contained in:
parent
c3f49386ca
commit
ec00a1eb0d
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue