2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-04-20 11:54:22 +00:00
|
|
|
/*
|
2015-04-24 08:58:55 +00:00
|
|
|
* Author: ACE2 Team, Ruthberg
|
2017-11-10 14:44:15 +00:00
|
|
|
* Smoothly updates wind on the server (based on time of year and map data)
|
2015-04-20 11:54:22 +00:00
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-20 11:54:22 +00:00
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2016-01-05 07:39:29 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_weather_fnc_updateWind
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-04-20 11:54:22 +00:00
|
|
|
*/
|
|
|
|
|
2023-11-23 18:16:55 +00:00
|
|
|
// Public API to temporarily disable wind simulation
|
|
|
|
if (missionNamespace getVariable [QGVAR(disableWindSimulation), false]) exitWith {};
|
|
|
|
|
2017-11-10 14:44:15 +00:00
|
|
|
private _speed = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_speed), GVAR(next_wind_speed), true];
|
|
|
|
private _direction = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_direction), GVAR(next_wind_direction), true];
|
2015-04-24 08:03:48 +00:00
|
|
|
|
2017-11-10 14:44:15 +00:00
|
|
|
setWind [-_speed * sin(_direction), -_speed * cos(_direction), true];
|