Group diag output for serverlog
This commit is contained in:
parent
20c7f5c8d3
commit
87bb73a816
|
@ -80,6 +80,9 @@ execVM "scripts\server\civinformant\init_module.sqf";
|
|||
// Asymmetric Threats
|
||||
execVM "scripts\server\asymmetric\init_module.sqf";
|
||||
|
||||
// Groupcheck for deletion when empty
|
||||
execVM "scripts\server\offloading\group_diag.sqf";
|
||||
|
||||
{
|
||||
if ( (_x != player) && (_x distance (getmarkerpos GRLIB_respawn_marker) < 200 ) ) then {
|
||||
deleteVehicle _x;
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
waitUntil {sleep 1; !isNil "active_sectors"};
|
||||
|
||||
while {true} do {
|
||||
uiSleep 600;
|
||||
|
||||
diag_log format ["[KP LIBERATION] [GROUPCHECK] ----- Groupcheck started at %1 -----", time];
|
||||
diag_log "[KP LIBERATION] [GROUPCHECK] Groups which aren't marked for deletion when empty:";
|
||||
|
||||
private _markedgroups = 0;
|
||||
|
||||
{
|
||||
private _groupOwner = groupOwner _x;
|
||||
private _owner = "Server";
|
||||
|
||||
if (_groupOwner != 2) then {
|
||||
_owner = name ((allPlayers select {_groupOwner == (owner _x)}) select 0);
|
||||
};
|
||||
|
||||
if !(isGroupDeletedWhenEmpty _x) then {
|
||||
if (local _x) then {
|
||||
_x deleteGroupWhenEmpty true;
|
||||
} else {
|
||||
[_x, true] remoteExec ["deleteGroupWhenEmpty", groupOwner _x];
|
||||
};
|
||||
_markedgroups = _markedgroups + 1;
|
||||
|
||||
diag_log format ["[KP LIBERATION] [GROUPCHECK] %1 - Owner: %2 - Units: %3 - Marked now: %4 - Side: %5",
|
||||
groupId _x,
|
||||
_owner,
|
||||
count (units _x),
|
||||
isGroupDeletedWhenEmpty _x,
|
||||
side _x];
|
||||
};
|
||||
} forEach allGroups;
|
||||
|
||||
if (_markedgroups == 0) then {
|
||||
diag_log "[KP LIBERATION] [GROUPCHECK] No groups found.";
|
||||
};
|
||||
|
||||
diag_log format ["[KP LIBERATION] [GROUPCHECK] ----- Groupcheck finished at %1 - Groups marked: %2 -----", time, _markedgroups];
|
||||
};
|
|
@ -160,6 +160,9 @@ class Missions
|
|||
* Added: Presets for: RDS Civilians, Project OPFOR SLA and Project OPFOR RACS. Thanks to [PSYKO-nz](https://github.com/PSYKO-nz)
|
||||
* Added: Automatic mission pbo build tool (available on GitHub). Thanks to [Dahlgren](https://github.com/Dahlgren) and [veteran29](https://github.com/veteran29)
|
||||
* Added: Tanks DLC classnames for presets.
|
||||
* Added: Group diag output for serverlog.
|
||||
* Tweaked: All `spawn compilefinal preprocessfilelinenumber` replaced with `execVM`.
|
||||
* Tweaked: All `createGroup` now with activated `deleteWhenEmpty`.
|
||||
* Fixed: Placement of buildings after save/load. Thanks to [Cre8or](https://github.com/Cre8or)
|
||||
|
||||
### 0.963 (05th January 2018)
|
||||
|
|
Loading…
Reference in New Issue