Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overcast > 0.7 no longer implies rain: #1456

Merged
merged 1 commit into from
May 31, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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