Skip to content

Commit 69fae93

Browse files
authored
fix: remove unused color field from sector events (#100)
The color field was never populated by any code path — fnc_trackSectors always sent empty strings. Remove it from the event format to keep the pipeline simple. Format: [objectType, unitName, side, [posX, posY, posZ]]
1 parent b5189f7 commit 69fae93

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

addons/recorder/fnc_handleCustomEvent.sqf

Lines changed: 2 additions & 3 deletions
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, getPos _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;
@@ -54,11 +54,10 @@ switch (_eventName) do {
5454
private _args = [GVAR(captureFrameNo), _eventName];
5555

5656
if (_eventMessage isEqualType []) then {
57-
// Array format: [objectType, unitName, side, color, [posX, posY, posZ]]
57+
// Array format: [objectType, unitName, side, [posX, posY, posZ]]
5858
_args pushBack (_eventMessage param [0, "", [""]]);
5959
_args pushBack (_eventMessage param [1, "", [""]]);
6060
_args pushBack (_eventMessage param [2, "", [""]]);
61-
_args pushBack (_eventMessage param [3, "", [""]]);
6261
{
6362
if (_x isEqualType [] && {count _x >= 2} && {(_x # 0) isEqualType 0}) exitWith {
6463
_args append _x;

addons/recorder/fnc_trackSectors.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ if (_this isEqualType [] && {count _this > 0}) exitWith {
4141

4242
private _pos = getPosATL _sector;
4343
if (_newOwner isEqualTo sideUnknown) then {
44-
[QGVARMAIN(customEvent), ["contested", ["sector", _name, "", "", _pos]]] call CBA_fnc_localEvent;
44+
[QGVARMAIN(customEvent), ["contested", ["sector", _name, "", _pos]]] call CBA_fnc_localEvent;
4545
} else {
46-
[QGVARMAIN(customEvent), ["captured", ["sector", _name, str _newOwner, "", _pos]]] call CBA_fnc_localEvent;
46+
[QGVARMAIN(customEvent), ["captured", ["sector", _name, str _newOwner, _pos]]] call CBA_fnc_localEvent;
4747
};
4848
}] call BIS_fnc_addScriptedEventHandler;
4949
};

0 commit comments

Comments
 (0)