mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added: waveHeightAt Function, refs #1024 for use.
This commit is contained in:
parent
89d19e817c
commit
7efe8ccba5
@ -183,6 +183,7 @@ PREP(unmuteUnit);
|
||||
PREP(useItem);
|
||||
PREP(useMagazine);
|
||||
PREP(waitAndExecute);
|
||||
PREP(waveHeightAt);
|
||||
|
||||
PREP(translateToWeaponSpace);
|
||||
PREP(translateToModelSpace);
|
||||
|
19
addons/common/functions/fnc_waveHeightAt.sqf
Normal file
19
addons/common/functions/fnc_waveHeightAt.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
*
|
||||
* Gets the wave height at a specific location. Uses a logic, so may be performance iffy
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Position ASL to get height at
|
||||
*
|
||||
* Return Value:
|
||||
* Wave height in meters
|
||||
*
|
||||
*/
|
||||
|
||||
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))
|
Loading…
Reference in New Issue
Block a user