Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- AUTHOR: aeroson
- NAME: cleanup
- VERSION: 1
- DESCRIPTION:
- delete everything that is not really needed
- dead bodies, dropped items, smokes, chemlights, explosives, empty groups
- */
- private ["_start","_obj","_canDelete"];
- _start = diag_tickTime;
- {
- deleteVehicle _x;
- } forEach allDead;
- {
- _canDelete = true;
- {
- if (alive _x) then {
- _canDelete = false;
- };
- } forEach units _x;
- if(_canDelete) then {
- deleteGroup _x;
- };
- } forEach allGroups;
- {
- {
- deleteVehicle _x;
- } forEach ([10000, 10000] nearObjects [_x, 10000]);
- } forEach ["WeaponHolder","GroundWeaponHolder","WeaponHolderSimulated","TimeBombCore","SmokeShell"];
- hint format ["Server cleanup took %1 seconds",diag_tickTime - _start];
Advertisement
Add Comment
Please, Sign In to add comment