mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
568 B
Plaintext
26 lines
568 B
Plaintext
/*
|
|
* Author: ACE2 Team, Ruthberg
|
|
*
|
|
* Updates rain based on ACE_RAIN_PARAMS
|
|
*
|
|
* Argument:
|
|
* Nothing
|
|
*
|
|
* Return value:
|
|
* Nothing
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
if (!GVAR(syncRain)) exitWith {};
|
|
|
|
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;
|
|
|
|
0 setRain (_oldRain + (_newRain - _oldRain) * _periodPercent);
|
|
};
|