From bf2fd88d75524ee0a55800c42c25f4e1ef5c1de1 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Wed, 11 Feb 2026 00:03:04 +0100 Subject: [PATCH 1/4] Compatibility with Restrict Markers --- addons/recorder/fnc_handleMarkers.sqf | 9 +++++++++ addons/recorder/fnc_init.sqf | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/addons/recorder/fnc_handleMarkers.sqf b/addons/recorder/fnc_handleMarkers.sqf index 23ef001..2699b22 100644 --- a/addons/recorder/fnc_handleMarkers.sqf +++ b/addons/recorder/fnc_handleMarkers.sqf @@ -175,6 +175,9 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), { if (!_local) exitWith {}; + // If the Restrict Markers mod is loaded and enabled, only the server's markers should be recorded + if (GVAR(restrictMarkersCompat) && {!isServer}) exitWith {}; + // check for excluded values in marker name. if name contains at least one value, skip sending traffic to server // if value is undefined, then skip private _isExcluded = false; @@ -225,6 +228,9 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), { if (!_local) exitWith {}; + // If the Restrict Markers mod is loaded and enabled, only the server's markers should be recorded + if (GVAR(restrictMarkersCompat) && {!isServer}) exitWith {}; + // check for excluded values in marker name. if name contains at least one value, skip sending traffic to server // if value is undefined, then skip private _isExcluded = false; @@ -257,6 +263,9 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), { if (!_local) exitWith {}; + // If the Restrict Markers mod is loaded and enabled, only the server's markers should be recorded + if (GVAR(restrictMarkersCompat) && {!isServer}) exitWith {}; + // check for excluded values in marker name. if name contains at least one value, skip sending traffic to server // if value is undefined, then skip private _isExcluded = false; diff --git a/addons/recorder/fnc_init.sqf b/addons/recorder/fnc_init.sqf index 07ec54a..e34b85b 100644 --- a/addons/recorder/fnc_init.sqf +++ b/addons/recorder/fnc_init.sqf @@ -97,6 +97,13 @@ EGVAR(extension,version) = ([":VERSION:", []] call EFUNC(extension,sendData)); diag_log text format ["[OCAP] Extension version result: %1 (type: %2)", EGVAR(extension,version), typeName EGVAR(extension,version)]; publicVariable QEGVAR(extension,version); +/* + VARIABLE: OCAP_recorder_restrictMarkersCompat + Global variable flag to prevent a client's local markers from being recorded on the server, in the case of the mod Restrict Markers being loaded and enabled. Otherwise, marker recording would create lots of duplicates that hurt playback performance. +*/ +EGVAR(recorder,restrictMarkersCompat) = isClass (configFile >> "CfgPatches" >> "restrict_markers") && {!isNil "restrict_markers_main_enabled" && {restrict_markers_main_enabled}}; +publicVariable QEGVAR(recorder,restrictMarkersCompat); + // Add mission event handlers call FUNC(addEventMission); From 73088a32506034857a74dcaf4b01577344031226 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:57:11 +0100 Subject: [PATCH 2/4] Previous EGVAR is now a GVAR --- addons/recorder/fnc_init.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/recorder/fnc_init.sqf b/addons/recorder/fnc_init.sqf index e34b85b..820d9c8 100644 --- a/addons/recorder/fnc_init.sqf +++ b/addons/recorder/fnc_init.sqf @@ -101,8 +101,8 @@ publicVariable QEGVAR(extension,version); VARIABLE: OCAP_recorder_restrictMarkersCompat Global variable flag to prevent a client's local markers from being recorded on the server, in the case of the mod Restrict Markers being loaded and enabled. Otherwise, marker recording would create lots of duplicates that hurt playback performance. */ -EGVAR(recorder,restrictMarkersCompat) = isClass (configFile >> "CfgPatches" >> "restrict_markers") && {!isNil "restrict_markers_main_enabled" && {restrict_markers_main_enabled}}; -publicVariable QEGVAR(recorder,restrictMarkersCompat); +GVAR(restrictMarkersCompat) = isClass (configFile >> "CfgPatches" >> "restrict_markers") && {!isNil "restrict_markers_main_enabled" && {restrict_markers_main_enabled}}; +publicVariable QGVAR(restrictMarkersCompat); // Add mission event handlers call FUNC(addEventMission); From a416b4f962c7552e866af110ad49f12b48bcfc10 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:58:37 +0100 Subject: [PATCH 3/4] Refactor Condition --- addons/recorder/fnc_init.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/recorder/fnc_init.sqf b/addons/recorder/fnc_init.sqf index 820d9c8..58a1be7 100644 --- a/addons/recorder/fnc_init.sqf +++ b/addons/recorder/fnc_init.sqf @@ -101,7 +101,7 @@ publicVariable QEGVAR(extension,version); VARIABLE: OCAP_recorder_restrictMarkersCompat Global variable flag to prevent a client's local markers from being recorded on the server, in the case of the mod Restrict Markers being loaded and enabled. Otherwise, marker recording would create lots of duplicates that hurt playback performance. */ -GVAR(restrictMarkersCompat) = isClass (configFile >> "CfgPatches" >> "restrict_markers") && {!isNil "restrict_markers_main_enabled" && {restrict_markers_main_enabled}}; +GVAR(restrictMarkersCompat) = isClass (configFile >> "CfgPatches" >> "restrict_markers") && {missionNamespace getVariable ["restrict_markers_main_enabled", false]}; publicVariable QGVAR(restrictMarkersCompat); // Add mission event handlers From 4392f5e16ac086569268964d8c35943cc3a2250e Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:03:03 +0100 Subject: [PATCH 4/4] Lazy-Eval misplaced for simple variable evaluation --- addons/recorder/fnc_handleMarkers.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/recorder/fnc_handleMarkers.sqf b/addons/recorder/fnc_handleMarkers.sqf index 2699b22..550f186 100644 --- a/addons/recorder/fnc_handleMarkers.sqf +++ b/addons/recorder/fnc_handleMarkers.sqf @@ -176,7 +176,7 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), { if (!_local) exitWith {}; // If the Restrict Markers mod is loaded and enabled, only the server's markers should be recorded - if (GVAR(restrictMarkersCompat) && {!isServer}) exitWith {}; + if (GVAR(restrictMarkersCompat) && !isServer) exitWith {}; // check for excluded values in marker name. if name contains at least one value, skip sending traffic to server // if value is undefined, then skip @@ -229,7 +229,7 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), { if (!_local) exitWith {}; // If the Restrict Markers mod is loaded and enabled, only the server's markers should be recorded - if (GVAR(restrictMarkersCompat) && {!isServer}) exitWith {}; + if (GVAR(restrictMarkersCompat) && !isServer) exitWith {}; // check for excluded values in marker name. if name contains at least one value, skip sending traffic to server // if value is undefined, then skip @@ -264,7 +264,7 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), { if (!_local) exitWith {}; // If the Restrict Markers mod is loaded and enabled, only the server's markers should be recorded - if (GVAR(restrictMarkersCompat) && {!isServer}) exitWith {}; + if (GVAR(restrictMarkersCompat) && !isServer) exitWith {}; // check for excluded values in marker name. if name contains at least one value, skip sending traffic to server // if value is undefined, then skip