Skip to content

Commit

Permalink
Merge pull request #1456 from acemod/rain_probability
Browse files Browse the repository at this point in the history
Overcast > 0.7 no longer implies rain:
  • Loading branch information
ulteq committed May 31, 2015
2 parents a0dc435 + 903fb89 commit 6292db8
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 6292db8

Please sign in to comment.