diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index 28909f19cd..6f4159e85d 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -15,9 +15,7 @@ */ #include "script_component.hpp" -private ["_unit"]; - -_unit = _this select 0; +params ["_unit"]; (["ACE_Altimeter"] call BIS_fnc_rscLayer) cutRsc ["ACE_Altimeter", "PLAIN", 0, true]; if (isNull (uiNamespace getVariable ["ACE_Altimeter", displayNull])) exitWith {}; @@ -27,7 +25,7 @@ GVAR(AltimeterActive) = true; [{ if (!GVAR(AltimeterActive)) exitWith {[_this select 1] call CALLSTACK(cba_fnc_removePerFrameEventHandler)}; disableSerialization; - EXPLODE_4_PVT(_this select 0,_display,_unit,_oldHeight,_prevTime); + (_this select 0) params ["_display", "_unit", "_oldHeight", "_prevTime"]; if !("ACE_Altimeter" in assignedItems _unit) exitWith {[_this select 1] call CALLSTACK(cba_fnc_removePerFrameEventHandler); call FUNC(hideAltimeter)}; private ["_height", "_hour", "_minute", "_descentRate","_HeightText", "_DecendRate", "_TimeText", "_curTime", "_timeDiff"]; @@ -38,7 +36,7 @@ GVAR(AltimeterActive) = true; _hour = floor daytime; _minute = floor ((daytime - _hour) * 60); - _height = (getPosASL _unit) select 2; + _height = ((getPosASL _unit) select 2) + EGVAR(common,mapAltitude); _curTime = ACE_time; _timeDiff = _curTime - _prevTime; _descentRate = if(_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0}; diff --git a/addons/parachute/script_component.hpp b/addons/parachute/script_component.hpp index 93a3e0d363..5668220421 100644 --- a/addons/parachute/script_component.hpp +++ b/addons/parachute/script_component.hpp @@ -1,4 +1,3 @@ -#define DEBUG_ENABLED_PARACHUTE #define COMPONENT parachute #include "\z\ace\addons\main\script_mod.hpp"