ACE3/addons/weather/functions/fnc_updateWind.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

22 lines
668 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: ACE2 Team, Ruthberg
* Smoothly updates wind on the server (based on time of year and map data)
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_weather_fnc_updateWind
*
* Public: No
*/
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];
setWind [-_speed * sin(_direction), -_speed * cos(_direction), true];