2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-02-02 22:05:03 +00:00
|
|
|
/*
|
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Initialises the parachute system.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-04-17 11:01:38 +00:00
|
|
|
|
2015-02-02 20:52:08 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2016-06-21 23:39:20 +00:00
|
|
|
["ACE3 Equipment", QGVAR(showAltimeter), localize LSTRING(showAltimeter), {
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: canInteract
|
2017-12-02 17:02:16 +00:00
|
|
|
if (
|
|
|
|
!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) ||
|
|
|
|
{!('ACE_Altimeter' in assignedItems ACE_player)}
|
|
|
|
) exitWith { false };
|
|
|
|
|
|
|
|
if !(GETMVAR(GVAR(AltimeterActive),false)) then {
|
2015-05-19 16:17:10 +00:00
|
|
|
[ACE_player] call FUNC(showAltimeter);
|
2015-03-05 07:32:26 +00:00
|
|
|
} else {
|
|
|
|
call FUNC(hideAltimeter);
|
|
|
|
};
|
2017-12-02 17:02:16 +00:00
|
|
|
|
2015-03-05 07:32:26 +00:00
|
|
|
true
|
2016-06-21 23:39:20 +00:00
|
|
|
}, {false}, [24, [false, false, false]], false] call CBA_fnc_addKeybind;
|
2015-02-02 20:52:08 +00:00
|
|
|
|
2017-12-02 17:02:16 +00:00
|
|
|
// Handle reserve chute based on current backpack (fires when parachute opens too)
|
|
|
|
["loadout", FUNC(handleReserve), true] call CBA_fnc_addPlayerEventHandler;
|
2015-02-02 20:52:08 +00:00
|
|
|
|
2017-12-02 17:02:16 +00:00
|
|
|
// Don't show vanilla speed and height when in expert mode
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call CBA_fnc_addEventHandler;
|