2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-05-30 16:37:03 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus
|
|
|
|
* Gets the wave height at a specific location. Uses a logic, so may be performance iffy
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* 0: Position ASL to get height at <ARRAY>
|
2016-05-30 16:37:03 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* Wave height in meters <NUMBER>
|
2016-05-30 16:37:03 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [[5, 2, 5]]] call ace_common_fnc_waveHeightAt
|
2016-05-30 16:37:03 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_position"];
|
|
|
|
|
|
|
|
if (isNil QGVAR(waveHeightLogic)) then {
|
|
|
|
GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
|
|
|
|
};
|
|
|
|
|
|
|
|
GVAR(waveHeightLogic) setPosASL _position;
|
|
|
|
|
|
|
|
(getPosASLW GVAR(waveHeightLogic) select 2) - (getPosASL GVAR(waveHeightLogic) select 2)
|