Skip to content

Commit

Permalink
initialmarkers, zeus fired, ace_bft exclude, fix gren dupe
Browse files Browse the repository at this point in the history
- initial markers exclusion
- tbd for remote control firedman
- exclude ACE_BFT markers by default
- fixes grenades moving to 0,0,0 in playback due to misattribution to liveMissiles PFH
  • Loading branch information
indig0fox committed Apr 8, 2022
1 parent fbef91a commit e55ac6d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions x/ocap2/addons/recorder/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ GVAR(allSettings) = [
"EDITBOX", // setting type
[
"Marker Prefixes to Exclude", // Pretty name shown inside the ingame settings menu. Can be stringtable entry.
"Array of prefixes - any markers matching these prefixes will be excluded from recording. Use single quotes! Default: ['SystemMarker_']"
"Array of prefixes - any markers matching these prefixes will be excluded from recording. Use single quotes! Default: ['SystemMarker_','ACE_BFT_']"
],
[COMPONENT_NAME, "Recording Settings"], // Pretty name of the category where the setting can be found. Can be stringtable entry.
"['SystemMarker_']", // default string value
"['SystemMarker_','ACE_BFT_']", // 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
Expand Down
8 changes: 8 additions & 0 deletions x/ocap2/addons/recorder/fnc_eh_firedMan.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ if (!SHOULDSAVEEVENTS) exitWith {};

params ["_firer", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"];

private "_who";
{
if (_firer == _x getVariable ["BIS_fnc_moduleRemoteControl_owner", objNull]) then {
_who = _x;
};
} forEach (allUnits select {!isNull (_firer getVariable ["BIS_fnc_moduleRemoteControl_owner", objNull])});
if (!isNil "_who") then {_firer = _who};

// not sent in ACE Throwing events
if (isNil "_vehicle") then {_vehicle = objNull};

Expand Down
16 changes: 16 additions & 0 deletions x/ocap2/addons/recorder/fnc_handleMarkers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,20 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), {
{
{
private _marker = _x;

// 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;
if (!isNil QEGVAR(settings,excludeMarkerFromRecord)) then {
{
if ((_marker) find _x >= 0) exitWith {
_isExcluded = true;
};
} forEach (parseSimpleArray EGVAR(settings,excludeMarkerFromRecord));
};
if (_isExcluded) then {continue};


// "Started polling starting markers" remoteExec ["hint", 0];
// get intro object markers
_pos = ATLToASL (markerPos [_marker, true]);
Expand All @@ -266,6 +280,8 @@ EGVAR(listener,markers) = [QGVARMAIN(handleMarker), {
_pos = _polyline;
};



if (isNil "_dir") then {
_dir = 0;
} else {if (_dir isEqualTo "") then {_dir = 0}};
Expand Down
4 changes: 2 additions & 2 deletions x/ocap2/addons/recorder/fnc_projectileMonitors.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ GVAR(liveMissiles) = [];
// PFH to track grenades, flares, thrown charges
GVAR(liveGrenades) = [];
[{
private _processNow = GVAR(liveMissiles) select {isNull (_x#0)};
GVAR(liveMissiles) = GVAR(liveMissiles) select {!isNull (_x#0)};
private _processNow = GVAR(liveGrenades) select {isNull (_x#0)};
GVAR(liveGrenades) = GVAR(liveGrenades) select {!isNull (_x#0)};

// _processNow
// for grenades that have hit something and become null, trigger FIRED events in timeline and add to clients for debug draw
Expand Down

0 comments on commit e55ac6d

Please sign in to comment.