mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Ensure the transition time for rain is never 0
This commit is contained in:
parent
6d34c310ad
commit
a29e08ed3c
@ -11,23 +11,26 @@ if(GVAR(rain_period_count) > GVAR(rain_next_period)) then {
|
||||
GVAR(current_rain) = (GVAR(current_rain)+(((GVAR(current_rain)))*((_rainOverCast*(GVAR(overcast_multiplier)))/8)*GVAR(rain_current_range)));
|
||||
GVAR(current_rain) = (GVAR(current_rain) max 0.01) min 1;
|
||||
|
||||
_transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20));
|
||||
_transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20))+1;
|
||||
GVAR(rain_current_range) = -1+(random 2);
|
||||
|
||||
// player sideChat format["lastRain: %1 currentRain: %2", _lastRain, GVAR(current_rain)];
|
||||
// player sideChat format["_transitionTime: %1", _transitionTime];
|
||||
|
||||
|
||||
ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime];
|
||||
systemChat format ["ACE_RAIN_PARAMS_sent1: %1 %2 %3", ACE_RAIN_PARAMS];
|
||||
} else {
|
||||
GVAR(current_rain) = 0;
|
||||
_lastRain = GVAR(current_rain);
|
||||
_rainOverCast = 1;
|
||||
_transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20));
|
||||
_transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20))+1;
|
||||
|
||||
ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime];
|
||||
systemChat format ["ACE_RAIN_PARAMS_sent2: %1 %2 %3", ACE_RAIN_PARAMS];
|
||||
TRACE_4("",_lastRain,_rainOverCast,_transitionTime, overcast);
|
||||
};
|
||||
|
||||
|
||||
GVAR(rain_period_start_time) = time;
|
||||
publicVariable "ACE_RAIN_PARAMS";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user