ACE3/addons/common/functions/fnc_waveHeightAt.sqf

20 lines
523 B
Plaintext
Raw Normal View History

/*
* Author: jaynus
*
* Gets the wave height at a specific location. Uses a logic, so may be performance iffy
*
* Arguments:
2015-05-12 20:40:12 +00:00
* 0: Position ASL to get height at
*
* Return Value:
* Wave height in meters
*
*/
2015-05-12 20:40:12 +00:00
#include "script_component.hpp"
if(isNil QGVAR(waveHeightLogic)) then {
GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
};
GVAR(waveHeightLogic) setPosASL (_this select 0);
(((getPosASLW GVAR(waveHeightLogic)) select 2) - ((getPosASL GVAR(waveHeightLogic)) select 2))