2015-04-20 11:54:22 +00:00
|
|
|
/*
|
2015-04-24 08:58:55 +00:00
|
|
|
* Author: ACE2 Team, Ruthberg
|
2015-04-20 11:54:22 +00:00
|
|
|
* Updates rain based on ACE_RAIN_PARAMS
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Arguments:
|
2015-04-20 11:54:22 +00:00
|
|
|
* Nothing
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2015-04-20 11:54:22 +00:00
|
|
|
* Nothing
|
2016-01-05 07:39:29 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_weather_fnc_updateRain
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-04-20 11:54:22 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-04-24 08:58:55 +00:00
|
|
|
if (!isNil "ACE_RAIN_PARAMS") then {
|
2015-08-04 00:11:24 +00:00
|
|
|
ACE_RAIN_PARAMS params ["_oldRain", "_newRain", "_period"];
|
|
|
|
|
2016-03-02 10:01:39 +00:00
|
|
|
private _periodPosition = (CBA_missionTime - GVAR(rain_period_start_time)) min _period;
|
2016-01-05 07:39:29 +00:00
|
|
|
private _periodPercent = (_periodPosition / _period) min 1;
|
2015-04-20 11:54:22 +00:00
|
|
|
|
2016-03-02 10:01:39 +00:00
|
|
|
GVAR(ACE_Rain) = linearConversion [GVAR(rain_period_start_time), (GVAR(rain_period_start_time) + _period), CBA_missionTime, _oldRain, _newRain];
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2016-01-05 07:39:29 +00:00
|
|
|
TRACE_3("Update Rain",rain,ACE_RAIN_PARAMS,GVAR(ACE_Rain));
|
2015-04-20 11:54:22 +00:00
|
|
|
};
|