Skip cleanup if players near
This commit is contained in:
parent
371d462bb3
commit
03e68a7f3c
@ -21,11 +21,14 @@ _aiList = +blck_deadAI;
|
||||
if ( diag_tickTime > _x getVariable ["blck_cleanupAt",0] ) then // DBD_DeleteAITimer
|
||||
{
|
||||
_ai = _x;
|
||||
{
|
||||
deleteVehicle _x;
|
||||
}forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
|
||||
blck_deadAI = blck_deadAI - [_ai];
|
||||
deleteVehicle _ai;
|
||||
_nearplayer = (_ai nearEntities 1500) select {isplayer _x};
|
||||
if (_nearplayer isequalto []) then {
|
||||
{
|
||||
deleteVehicle _x;
|
||||
}forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
|
||||
blck_deadAI = blck_deadAI - [_ai];
|
||||
deleteVehicle _ai;
|
||||
};
|
||||
};
|
||||
} forEach _aiList;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user