Skip to content

Commit ec80d25

Browse files
authored
fix: use getPosASL for sector positions (#101)
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.
1 parent 69fae93 commit ec80d25

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

addons/recorder/fnc_handleCustomEvent.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
Examples:
2424
(start code)
2525
// Sector captured with structured data (sent by fnc_trackSectors)
26-
[QGVARMAIN(customEvent), ["captured", ["sector", "Sector Alpha", str west, getPos _sector]]] call CBA_fnc_localEvent;
26+
[QGVARMAIN(customEvent), ["captured", ["sector", "Sector Alpha", str west, getPosASL _sector]]] call CBA_fnc_localEvent;
2727
2828
// End mission with side and message
2929
[QGVARMAIN(customEvent), ["endMission", [str west, "BLUFOR controlled all sectors!"]]] call CBA_fnc_localEvent;

addons/recorder/fnc_trackSectors.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (_this isEqualType [] && {count _this > 0}) exitWith {
3939
if (_name isEqualTo "") then { _name = vehicleVarName _sector };
4040
if (_name isEqualTo "") then { _name = str _sector };
4141

42-
private _pos = getPosATL _sector;
42+
private _pos = getPosASL _sector;
4343
if (_newOwner isEqualTo sideUnknown) then {
4444
[QGVARMAIN(customEvent), ["contested", ["sector", _name, "", _pos]]] call CBA_fnc_localEvent;
4545
} else {

0 commit comments

Comments
 (0)