mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Code cleanup
This commit is contained in:
parent
b3f4bf306d
commit
b3bf44fa1e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: ACE2 Team
|
||||
* Author: ACE2 Team, Ruthberg
|
||||
*
|
||||
* Calculate current wind locally from the data broadcasted by the server
|
||||
*
|
||||
|
@ -42,7 +42,6 @@ if (GVAR(syncRain) && GVAR(rain_period_count) > GVAR(rain_next_period)) then {
|
||||
|
||||
_transitionTime = 1 + (_rainOverCast * 5) + (random (_rainOverCast * 20));
|
||||
|
||||
systemChat format["%1, %2, %3", _lastRain, GVAR(current_rain), _transitionTime];
|
||||
ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime];
|
||||
TRACE_4("",_lastRain,_rainOverCast,_transitionTime,overcast);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: ACE2 Team
|
||||
* Author: ACE2 Team, Ruthberg
|
||||
*
|
||||
* Updates rain based on ACE_RAIN_PARAMS
|
||||
*
|
||||
@ -13,14 +13,13 @@
|
||||
|
||||
if (!GVAR(syncRain)) exitWith {};
|
||||
|
||||
private ["_oldStrength", "_rainStrength", "_transitionTime", "_periodPosition", "_periodPercent"];
|
||||
if (!isNil "ACE_RAIN_PARAMS") then {
|
||||
|
||||
EXPLODE_3_PVT(ACE_RAIN_PARAMS,_oldRain,_newRain,_period);
|
||||
|
||||
private ["_periodPosition", "_periodPercent"];
|
||||
_periodPosition = (time - GVAR(rain_period_start_time)) min _period;
|
||||
_periodPercent = (_periodPosition / _period) min 1;
|
||||
|
||||
if (!isNil "ACE_RAIN_PARAMS" && {!isNil QGVAR(rain_period_start_time)}) then {
|
||||
_oldStrength = ACE_RAIN_PARAMS select 0;
|
||||
_rainStrength = ACE_RAIN_PARAMS select 1;
|
||||
_transitionTime = ACE_RAIN_PARAMS select 2;
|
||||
_periodPosition = (time - GVAR(rain_period_start_time)) min _transitionTime;
|
||||
_periodPercent = (_periodPosition/_transitionTime) min 1;
|
||||
|
||||
0 setRain ((_periodPercent*(_rainStrength-_oldStrength))+_oldStrength);
|
||||
0 setRain (_oldRain + (_newRain - _oldRain) * _periodPercent);
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: ACE2 Team
|
||||
* Author: ACE2 Team, Ruthberg
|
||||
*
|
||||
* Updates wind, gusts and waves based on ACE_wind
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user