Skip to content

Commit

Permalink
Overcast > 0.7 no longer implies rain:
Browse files Browse the repository at this point in the history
* The higher the overcast value the higher the chance for rain
* But you can end up having no rain with an overcast value of 1.0
  • Loading branch information
ulteq committed May 31, 2015
1 parent a0dc435 commit 903fb89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/weather/functions/fnc_updateAceWeather.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ if (GVAR(syncRain) && GVAR(rain_period_count) > GVAR(rain_next_period)) then {
_rainOverCast = (overcast - 0.7) / 0.3;
if (GVAR(current_rain) == 0) then {
// Initialize rain with a random strength depending on the current overcast value
GVAR(current_rain) = 0.25 + (random 0.25) + (random 0.5) * _rainOverCast;
GVAR(current_rain) = -0.25 + (random 0.75) + (random 0.5) * _rainOverCast;
};

GVAR(current_rain) = GVAR(current_rain) + GVAR(current_rain) * ((_rainOverCast * _overcastMultiplier) / 8) * GVAR(rain_current_range);
GVAR(current_rain) = 0.01 max GVAR(current_rain) min 1;
GVAR(current_rain) = 0 max GVAR(current_rain) min 1;

GVAR(rain_current_range) = -1 + (random 2);
} else {
Expand Down

0 comments on commit 903fb89

Please sign in to comment.