Fixed rare rpt issue output when owner leaves short before

This commit is contained in:
Wyqer 2019-07-26 09:35:30 +02:00
parent 7aae019115
commit 1439225579
No known key found for this signature in database
GPG Key ID: D7E2F8BD7F1E48FA
1 changed files with 17 additions and 13 deletions

View File

@ -16,20 +16,24 @@ while {true} do {
_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;
if !(isNil "_owner") then {
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];
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;