2015-05-11 23:44:17 +00:00
|
|
|
/*
|
|
|
|
* 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
|
2015-05-11 23:44:17 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Wave height in meters
|
|
|
|
*
|
2015-09-17 16:25:02 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-05-11 23:44:17 +00:00
|
|
|
*/
|
2015-05-12 20:40:12 +00:00
|
|
|
#include "script_component.hpp"
|
2015-05-11 23:44:17 +00:00
|
|
|
|
2015-09-17 16:25:02 +00:00
|
|
|
params ["_position"];
|
|
|
|
|
|
|
|
if (isNil QGVAR(waveHeightLogic)) then {
|
2015-05-11 23:44:17 +00:00
|
|
|
GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
|
|
|
|
};
|
2015-09-20 13:52:40 +00:00
|
|
|
|
2015-09-17 16:25:02 +00:00
|
|
|
GVAR(waveHeightLogic) setPosASL _position;
|
2015-05-11 23:44:17 +00:00
|
|
|
|
2015-09-17 16:25:02 +00:00
|
|
|
(getPosASLW GVAR(waveHeightLogic) select 2) - (getPosASL GVAR(waveHeightLogic) select 2)
|