2015-08-27 07:44:23 +00:00
|
|
|
if (DMS_DEBUG) then
|
|
|
|
{
|
|
|
|
diag_log ("DMS:: CLEANING UP: "+str _this);
|
|
|
|
};
|
|
|
|
if !((typeName _this) isEqualTo "ARRAY") then
|
|
|
|
{
|
|
|
|
_this = [_this];
|
|
|
|
};
|
2015-08-28 05:27:02 +00:00
|
|
|
/*
|
|
|
|
if ([_this,20] call DMS_isPlayerNearbyARRAY) exitWith //<-----Not sure if it's more/less efficient
|
2015-08-27 07:44:23 +00:00
|
|
|
{
|
|
|
|
[30, DMS_CleanUp, _this, false] call ExileServer_system_thread_addTask;
|
|
|
|
};
|
2015-08-28 05:27:02 +00:00
|
|
|
*/
|
2015-08-27 07:44:23 +00:00
|
|
|
{
|
2015-08-28 05:27:02 +00:00
|
|
|
if !([_this,20] call ExileServer_util_position_isPlayerNearby) then {
|
|
|
|
_x enableSimulationGlobal false;
|
|
|
|
_x removeAllMPEventHandlers "mpkilled";
|
|
|
|
_x removeAllMPEventHandlers "mphit";
|
|
|
|
_x removeAllMPEventHandlers "mprespawn";
|
|
|
|
_x removeAllEventHandlers "FiredNear";
|
|
|
|
_x removeAllEventHandlers "HandleDamage";
|
|
|
|
_x removeAllEventHandlers "Killed";
|
|
|
|
_x removeAllEventHandlers "Fired";
|
|
|
|
_x removeAllEventHandlers "GetOut";
|
|
|
|
_x removeAllEventHandlers "GetIn";
|
|
|
|
_x removeAllEventHandlers "Local";
|
|
|
|
deleteVehicle _x;
|
|
|
|
};
|
2015-08-27 07:44:23 +00:00
|
|
|
false;
|
|
|
|
} count _this;
|