From 127fd009bf75de8813d1668d4bf328362105149e Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Sat, 7 Mar 2026 11:31:35 +0100 Subject: [PATCH] feat: use dedicated :EVENT:SECTOR: and :EVENT:ENDMISSION: commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Route sector events (captured/contested/capturedFlag) through :EVENT:SECTOR: and endMission through :EVENT:ENDMISSION: instead of piggybacking on :EVENT:GENERAL:. This matches the new typed event commands in the extension. - fnc_handleCustomEvent: sector → :EVENT:SECTOR:, endMission → :EVENT:ENDMISSION: - fnc_exportData: endMission → :EVENT:ENDMISSION: with [frame, side, message] --- addons/recorder/fnc_exportData.sqf | 3 +-- addons/recorder/fnc_handleCustomEvent.sqf | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/recorder/fnc_exportData.sqf b/addons/recorder/fnc_exportData.sqf index 47b6818..a4654d3 100644 --- a/addons/recorder/fnc_exportData.sqf +++ b/addons/recorder/fnc_exportData.sqf @@ -114,9 +114,8 @@ if (!isNil QGVAR(PFHObject)) then { private _winSide = if (isNil "_side") then {""} else {if (_side isEqualTo sideUnknown) then {""} else {str _side}}; private _endMessage = if (isNil "_message") then {if (_winSide == "") then {"Mission ended"} else {""}} else {_message}; -[":EVENT:GENERAL:", [ +[":EVENT:ENDMISSION:", [ _endFrameNumber, - "endMission", _winSide, _endMessage ]] call EFUNC(extension,sendData); diff --git a/addons/recorder/fnc_handleCustomEvent.sqf b/addons/recorder/fnc_handleCustomEvent.sqf index 1e7cb0c..c2b8562 100644 --- a/addons/recorder/fnc_handleCustomEvent.sqf +++ b/addons/recorder/fnc_handleCustomEvent.sqf @@ -5,9 +5,9 @@ Description: Routes custom events to the extension with typed positional args based on - event type. Sector events (captured/contested/capturedFlag) send structured - fields; endMission sends side and message; all other events use the legacy - format with JSON-encoded extraData. + event type. Sector events (captured/contested/capturedFlag) use :EVENT:SECTOR: + with structured fields; endMission uses :EVENT:ENDMISSION: with side and + message; all other events use :EVENT:GENERAL: with JSON-encoded extraData. Applied during initialization of OCAP in . @@ -67,7 +67,7 @@ switch (_eventName) do { _args pushBack _eventMessage; }; - [":EVENT:GENERAL:", _args] call EFUNC(extension,sendData); + [":EVENT:SECTOR:", _args] call EFUNC(extension,sendData); }; case "endMission": { @@ -79,7 +79,7 @@ switch (_eventName) do { } else { _message = _eventMessage; }; - [":EVENT:GENERAL:", [GVAR(captureFrameNo), _eventName, _side, _message]] call EFUNC(extension,sendData); + [":EVENT:ENDMISSION:", [GVAR(captureFrameNo), _side, _message]] call EFUNC(extension,sendData); }; default {