mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Fix group cleanup
This commit is contained in:
@@ -146,7 +146,9 @@ eh_localCleanup = {
|
||||
_unit removeAllEventHandlers "Local";
|
||||
clearVehicleInit _unit;
|
||||
deleteVehicle _unit;
|
||||
deleteGroup _myGroupUnit;
|
||||
if ((count (units _myGroupUnit) == 0) && (_myGroupUnit != grpNull)) then {
|
||||
deleteGroup _myGroupUnit;
|
||||
};
|
||||
//_unit = nil;
|
||||
// diag_log ("CLEANUP: DELETED A " + str(_type) );
|
||||
};
|
||||
@@ -622,6 +624,7 @@ dayz_recordLogin = {
|
||||
|
||||
dayz_perform_purge = {
|
||||
if(!isNull(_this)) then {
|
||||
_group = group _this;
|
||||
_this removeAllMPEventHandlers "mpkilled";
|
||||
_this removeAllMPEventHandlers "mphit";
|
||||
_this removeAllMPEventHandlers "mprespawn";
|
||||
@@ -634,7 +637,9 @@ dayz_perform_purge = {
|
||||
_this removeAllEventHandlers "Local";
|
||||
clearVehicleInit _this;
|
||||
deleteVehicle _this;
|
||||
deleteGroup (group _this);
|
||||
if ((count (units _group) == 0) && (_group != grpNull)) then {
|
||||
deleteGroup _group;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -695,7 +700,7 @@ dayz_perform_purge_player = {
|
||||
{
|
||||
_holder addMagazineCargoGlobal [_x, 1];
|
||||
} count _magazines;
|
||||
|
||||
_group = group _this;
|
||||
_this removeAllMPEventHandlers "mpkilled";
|
||||
_this removeAllMPEventHandlers "mphit";
|
||||
_this removeAllMPEventHandlers "mprespawn";
|
||||
@@ -708,13 +713,16 @@ dayz_perform_purge_player = {
|
||||
_this removeAllEventHandlers "Local";
|
||||
clearVehicleInit _this;
|
||||
deleteVehicle _this;
|
||||
deleteGroup (group _this);
|
||||
if ((count (units _group) == 0) && (_group != grpNull)) then {
|
||||
deleteGroup _group;
|
||||
};
|
||||
// _this = nil;
|
||||
};
|
||||
|
||||
|
||||
dayz_removePlayerOnDisconnect = {
|
||||
if(!isNull(_this)) then {
|
||||
_group = group _this;
|
||||
_this removeAllMPEventHandlers "mphit";
|
||||
deleteVehicle _this;
|
||||
deleteGroup (group _this);
|
||||
@@ -780,7 +788,7 @@ server_cleanupGroups = {
|
||||
if(!isNil "DZE_DYN_GroupCleanup") exitWith { DZE_DYN_AntiStuck3rd = DZE_DYN_AntiStuck3rd + 1;};
|
||||
DZE_DYN_GroupCleanup = true;
|
||||
{
|
||||
if (count units _x == 0) then {
|
||||
if ((count (units _x) == 0) && (_x != grpNull)) then {
|
||||
deleteGroup _x;
|
||||
};
|
||||
sleep 0.001;
|
||||
|
||||
Reference in New Issue
Block a user