From 987bc4a4605e097dab93a3797b934196778cc929 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Sat, 7 Mar 2026 16:13:49 +0100 Subject: [PATCH] fix: use getPosASL for sector positions Sector tracking used getPosATL which gives height relative to terrain, inconsistent with the rest of the capture pipeline (captureLoop, projectile tracking) which all use getPosASL. For accurate 3D rendering without a heightmap, all recorded positions must be in the same absolute coordinate system. Also fixes the example comment in handleCustomEvent. --- addons/recorder/fnc_handleCustomEvent.sqf | 2 +- addons/recorder/fnc_trackSectors.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/recorder/fnc_handleCustomEvent.sqf b/addons/recorder/fnc_handleCustomEvent.sqf index 6b7ffcf..b772d3f 100644 --- a/addons/recorder/fnc_handleCustomEvent.sqf +++ b/addons/recorder/fnc_handleCustomEvent.sqf @@ -23,7 +23,7 @@ Examples: (start code) // Sector captured with structured data (sent by fnc_trackSectors) - [QGVARMAIN(customEvent), ["captured", ["sector", "Sector Alpha", str west, getPos _sector]]] call CBA_fnc_localEvent; + [QGVARMAIN(customEvent), ["captured", ["sector", "Sector Alpha", str west, getPosASL _sector]]] call CBA_fnc_localEvent; // End mission with side and message [QGVARMAIN(customEvent), ["endMission", [str west, "BLUFOR controlled all sectors!"]]] call CBA_fnc_localEvent; diff --git a/addons/recorder/fnc_trackSectors.sqf b/addons/recorder/fnc_trackSectors.sqf index 46ae174..0bc813d 100644 --- a/addons/recorder/fnc_trackSectors.sqf +++ b/addons/recorder/fnc_trackSectors.sqf @@ -39,7 +39,7 @@ if (_this isEqualType [] && {count _this > 0}) exitWith { if (_name isEqualTo "") then { _name = vehicleVarName _sector }; if (_name isEqualTo "") then { _name = str _sector }; - private _pos = getPosATL _sector; + private _pos = getPosASL _sector; if (_newOwner isEqualTo sideUnknown) then { [QGVARMAIN(customEvent), ["contested", ["sector", _name, "", _pos]]] call CBA_fnc_localEvent; } else {