Compare commits

..

2 Commits

Author SHA1 Message Date
hizumi
7c6130891a update custom remainsCollector event handlers
All checks were successful
Generate testing snapshot / Create testing release (push) Successful in 39s
add extra verbose debug logging to determine owner, time, and whether or not the custom garbage collector is who processed the body
2024-06-19 20:55:12 -05:00
hizumi
eee4ac1b83 Update fn_initClient.sqf
temporarily remove pilot ability to check re-insertion queue
2024-06-19 20:53:19 -05:00
3 changed files with 25 additions and 11 deletions

View File

@@ -27,16 +27,30 @@ addMissionEventHandler ["EntityKilled", {
if not (_unit isKindOf "CAManBase") exitWith {}; if not (_unit isKindOf "CAManBase") exitWith {};
if not (isInRemainsCollector _unit) exitWith {};
// format["%1 from group %2 died at %3", _unit, group _unit, [datetime] call BIS_fnc_timeToString] remoteExec ["systemChat"];
_unit setVariable["milsim_death_time", time]; _unit setVariable["milsim_death_time", time];
// _unit addEventHandler ["Deleted", {
// params ["_entity"]; _unit addEventHandler ["Deleted", {
// isGC = _entity getVariable["milsim_garbage_collected", false]; params ["_entity"];
// format["%1 from was deleted by custom gc: %2", _entity, str isGC ] remoteExec ["systemChat"]; _remainsCollector = _entity getVariable["milsim_garbage_collected", false];
// }]; _decayTime = time - (_entity getVariable ["milsim_death_time", time]);
_i = allUsers select { (getUserInfo _x)#1 isEqualTo _ownerId;};
_owner = if ( _i isEqualTo []) then [ { "server" }, { (getUserInfo (_i#0))#3 }];
diag_log format["isServer: %5, deleted object owned by: %1 via remainsCollector: %2 after %3 seconds of type: %4", _owner, str (not _remainsCollector), _decayTime, _entity, isServer];
}]; }];
}];
// add zeus deletion logging to curator objects
{
_x addEventHandler ["CuratorObjectDeleted", {
params ["_curator", "_entity"];
_decayTime = time - (_entity getVariable ["milsim_death_time", time]);
diag_log format["deleted object: %1 via curator: %2 after %3 seconds", _entity, name _curator, _decayTime];
}];
} foreach _curators;
// declare init complete to other modules // declare init complete to other modules
missionNamespace setVariable [QGVARMAIN(complete), true, true]; missionNamespace setVariable [QGVARMAIN(complete), true, true];

View File

@@ -27,11 +27,11 @@ GVAR(deadUnitCleanupPFH) = [
_dead = _dead select [0, _toDelete]; _dead = _dead select [0, _toDelete];
{ {
_unit = _x#1; _unit = _x#1;
// _unit setVariable ["milsim_garbage_collected", true]; _unit setVariable ["milsim_garbage_collected", true];
deleteVehicle (_unit); deleteVehicle (_unit);
} foreach _dead; } foreach _dead;
}, },
180, 450,
[], [],
{ // on creation { // on creation
[ [

View File

@@ -14,7 +14,7 @@ localNamespace setVariable [QGVAR(checkReinsertQueueClassesAdded), []];
localNamespace setVariable [QGVAR(lastReinsertQueueCheck), diag_tickTime]; localNamespace setVariable [QGVAR(lastReinsertQueueCheck), diag_tickTime];
// add actions to pilot classes, and don't apply to child classes // add actions to pilot classes, and don't apply to child classes
[["B_Helipilot_F", "B_helicrew_F"], false] call FUNC(addCheckQueueSelfAction); // [["B_Helipilot_F", "B_helicrew_F"], false] call FUNC(addCheckQueueSelfAction);
///////////////////////////////////////////////////// /////////////////////////////////////////////////////