diff --git a/addons/recorder/fnc_handleMarkers.sqf b/addons/recorder/fnc_handleMarkers.sqf index 23ef001..550f186 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..58a1be7 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. +*/ +GVAR(restrictMarkersCompat) = isClass (configFile >> "CfgPatches" >> "restrict_markers") && {missionNamespace getVariable ["restrict_markers_main_enabled", false]}; +publicVariable QGVAR(restrictMarkersCompat); + // Add mission event handlers call FUNC(addEventMission);