mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Cleanup Logic Change
Don't use isPlayerNearbyArray, so each object gets its own check (so that all objects don't get skipped just because a player is near one object)
This commit is contained in:
parent
cf6ca81c68
commit
f0f5132867
@ -6,11 +6,14 @@ if !((typeName _this) isEqualTo "ARRAY") then
|
|||||||
{
|
{
|
||||||
_this = [_this];
|
_this = [_this];
|
||||||
};
|
};
|
||||||
if ([_this,20] call DMS_isPlayerNearbyARRAY) exitWith //<---TODO: Improve/Replace?
|
/*
|
||||||
|
if ([_this,20] call DMS_isPlayerNearbyARRAY) exitWith //<-----Not sure if it's more/less efficient
|
||||||
{
|
{
|
||||||
[30, DMS_CleanUp, _this, false] call ExileServer_system_thread_addTask;
|
[30, DMS_CleanUp, _this, false] call ExileServer_system_thread_addTask;
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
|
if !([_this,20] call ExileServer_util_position_isPlayerNearby) then {
|
||||||
_x enableSimulationGlobal false;
|
_x enableSimulationGlobal false;
|
||||||
_x removeAllMPEventHandlers "mpkilled";
|
_x removeAllMPEventHandlers "mpkilled";
|
||||||
_x removeAllMPEventHandlers "mphit";
|
_x removeAllMPEventHandlers "mphit";
|
||||||
@ -23,5 +26,6 @@ if ([_this,20] call DMS_isPlayerNearbyARRAY) exitWith //<---TODO: Improve/
|
|||||||
_x removeAllEventHandlers "GetIn";
|
_x removeAllEventHandlers "GetIn";
|
||||||
_x removeAllEventHandlers "Local";
|
_x removeAllEventHandlers "Local";
|
||||||
deleteVehicle _x;
|
deleteVehicle _x;
|
||||||
|
};
|
||||||
false;
|
false;
|
||||||
} count _this;
|
} count _this;
|
Loading…
Reference in New Issue
Block a user