Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clean_nullobj = {
- diag_log ("DW_DEBUG: dw_clean_nullobj FNC starts correctly!!! ");
- _countNullObj = 0;
- _countNullObjDeleted = 0;
- try
- {
- {
- if(isNull _x) then
- {
- _countNullObj = _countNullObj + 1;
- if (_countNullObj > 32) then
- {
- _myGroupX = group _x;
- _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 "Local";
- clearVehicleInit _x; //let's clear all PICs
- deleteVehicle _x;
- deleteGroup _myGroupX;
- _countNullObjDeleted = _countNullObjDeleted+1;
- _x = nil; //this seems clean even more :) thx Tansien
- };
- };
- } forEach allMissionObjects "all";
- }
- catch
- {
- diag_log("DEBUGLOG: EXCEPTION: clean_nullobj: " + _exception);
- };
- diag_log ("DEBUG: clean_nullobj FNC ends correctly!!! found _countNullObj: " + str(_countNullObj) + " _countNullObjDeleted: " + str(_countNullObjDeleted) );
- };
Add Comment
Please, Sign In to add comment