diff --git a/addons/recorder/XEH_preInit.sqf b/addons/recorder/XEH_preInit.sqf index 4f6616d..4631e4f 100644 --- a/addons/recorder/XEH_preInit.sqf +++ b/addons/recorder/XEH_preInit.sqf @@ -211,7 +211,33 @@ GVAR(allSettings) = [ false // requires restart to apply ], + /* + CBA Setting: OCAP_settings_excludeVarNameFromRecord + Description: + Array of vehicle variable names (vehicleVarName) that should be excluded from recording. Use single quotes! Default: [] + Setting Name: + Variable Names to Exclude + + Value Type: + Stringified Array + + Example: + > "['hideout_1','cache_west']" + */ + [ + QEGVAR(settings,excludeVarNameFromRecord), + "EDITBOX", // setting type + [ + "Variable Names to Exclude", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. + "Array of vehicle variable names (vehicleVarName) to exclude from recording. Use single quotes! Default: []" + ], + [COMPONENT_NAME, "Exclusions"], // Pretty name of the category where the setting can be found. Can be stringtable entry. + "[]", // default string value + true, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer + {}, // function that will be executed once on mission start and every time the setting is changed. + false // requires restart to apply + ], // Section: Extra Tracking diff --git a/addons/recorder/fnc_captureLoop.sqf b/addons/recorder/fnc_captureLoop.sqf index 9346a92..794544a 100644 --- a/addons/recorder/fnc_captureLoop.sqf +++ b/addons/recorder/fnc_captureLoop.sqf @@ -89,9 +89,16 @@ GVAR(PFHObject) = [ { private _justInitialized = false; if !(_x getVariable [QGVARMAIN(isInitialized), false]) then { - if ( - _x isKindOf "Logic" - ) exitWith { + if (_x isKindOf "Logic") exitWith { + _x setVariable [QGVARMAIN(exclude), true, true]; + _x setVariable [QGVARMAIN(isInitialized), true, true]; + }; + // Check pre-set OCAP_main_exclude variable for per-object exclusion via editor init field + if (_x getVariable [QGVARMAIN(exclude), false]) exitWith { + _x setVariable [QGVARMAIN(isInitialized), true, true]; + }; + // Check vehicleVarName against centralized exclude list + if (GVAR(excludeVarNameList) isNotEqualTo [] && {vehicleVarName _x in GVAR(excludeVarNameList)}) exitWith { _x setVariable [QGVARMAIN(exclude), true, true]; _x setVariable [QGVARMAIN(isInitialized), true, true]; }; @@ -204,6 +211,15 @@ GVAR(PFHObject) = [ { private _justInitialized = false; if !(_x getVariable [QGVARMAIN(isInitialized), false]) then { + // Check pre-set OCAP_main_exclude variable for per-object exclusion via editor init field + if (_x getVariable [QGVARMAIN(exclude), false]) exitWith { + _x setVariable [QGVARMAIN(isInitialized), true, true]; + }; + // Check vehicleVarName against centralized exclude list + if (GVAR(excludeVarNameList) isNotEqualTo [] && {vehicleVarName _x in GVAR(excludeVarNameList)}) exitWith { + _x setVariable [QGVARMAIN(exclude), true, true]; + _x setVariable [QGVARMAIN(isInitialized), true, true]; + }; _vehType = typeOf _x; _class = _vehType call FUNC(getClass); private _vic = _x; diff --git a/addons/recorder/fnc_init.sqf b/addons/recorder/fnc_init.sqf index 44457f8..8ba4705 100644 --- a/addons/recorder/fnc_init.sqf +++ b/addons/recorder/fnc_init.sqf @@ -86,6 +86,12 @@ GVAR(excludeMarkerList) = if (!isNil QEGVAR(settings,excludeMarkerFromRecord)) t [] }; +GVAR(excludeVarNameList) = if (!isNil QEGVAR(settings,excludeVarNameFromRecord)) then { + parseSimpleArray EGVAR(settings,excludeVarNameFromRecord) +} else { + [] +}; + INFO_4("Settings snapshot — frameCaptureDelay: %1 | autoStart: %2 | minPlayerCount: %3 | minMissionTime: %4",GVAR(frameCaptureDelay),GVAR(autoStart),EGVAR(settings,minPlayerCount),GVAR(minMissionTime)); GVAR(hasACEIsAwake) = !isNil "ace_common_fnc_isAwake";