diff --git a/@ExileServer/addons/a3_dms/missions/bauhaus.sqf b/@ExileServer/addons/a3_dms/missions/bauhaus.sqf index 7167315..1faef66 100644 --- a/@ExileServer/addons/a3_dms/missions/bauhaus.sqf +++ b/@ExileServer/addons/a3_dms/missions/bauhaus.sqf @@ -123,8 +123,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -132,7 +131,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf b/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf index fcfdae2..3f48d8f 100644 --- a/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf +++ b/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf @@ -122,8 +122,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -131,7 +130,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/missions/mission1.sqf b/@ExileServer/addons/a3_dms/missions/mission1.sqf index 27596be..40fbe7f 100644 --- a/@ExileServer/addons/a3_dms/missions/mission1.sqf +++ b/@ExileServer/addons/a3_dms/missions/mission1.sqf @@ -121,8 +121,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -130,7 +129,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/missions/mission2.sqf b/@ExileServer/addons/a3_dms/missions/mission2.sqf index 11a139f..82ef7eb 100644 --- a/@ExileServer/addons/a3_dms/missions/mission2.sqf +++ b/@ExileServer/addons/a3_dms/missions/mission2.sqf @@ -118,8 +118,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -127,7 +126,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/missions/mission3.sqf b/@ExileServer/addons/a3_dms/missions/mission3.sqf index 4c2c21f..d79f114 100644 --- a/@ExileServer/addons/a3_dms/missions/mission3.sqf +++ b/@ExileServer/addons/a3_dms/missions/mission3.sqf @@ -118,8 +118,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -127,7 +126,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/missions/mission4.sqf b/@ExileServer/addons/a3_dms/missions/mission4.sqf index ba89533..ef29091 100644 --- a/@ExileServer/addons/a3_dms/missions/mission4.sqf +++ b/@ExileServer/addons/a3_dms/missions/mission4.sqf @@ -118,8 +118,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -127,7 +126,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/missions/mission_init.sqf b/@ExileServer/addons/a3_dms/missions/mission_init.sqf index 47e6f41..accc59a 100644 --- a/@ExileServer/addons/a3_dms/missions/mission_init.sqf +++ b/@ExileServer/addons/a3_dms/missions/mission_init.sqf @@ -27,5 +27,4 @@ DMS_MissionTypesArray = []; for "_i" from 1 to (_x select 1) do { DMS_MissionTypesArray pushBack (_x select 0); }; - false; -} count DMS_MissionTypes; \ No newline at end of file +} forEach DMS_MissionTypes; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/missions/walmart.sqf b/@ExileServer/addons/a3_dms/missions/walmart.sqf index fd89cb8..a5f451f 100644 --- a/@ExileServer/addons/a3_dms/missions/walmart.sqf +++ b/@ExileServer/addons/a3_dms/missions/walmart.sqf @@ -126,8 +126,7 @@ if !(_added) exitWith _cleanup = []; { _cleanup pushBack _x; - false; - } count _missionAIUnits; + } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); @@ -135,7 +134,7 @@ if !(_added) exitWith // Delete the markers directly - {deleteMarker _x;false;} count _markers; + {deleteMarker _x;} forEach _markers; // Reset the mission count diff --git a/@ExileServer/addons/a3_dms/scripts/AILocalityManager.sqf b/@ExileServer/addons/a3_dms/scripts/AILocalityManager.sqf index ae0f22f..e43092b 100644 --- a/@ExileServer/addons/a3_dms/scripts/AILocalityManager.sqf +++ b/@ExileServer/addons/a3_dms/scripts/AILocalityManager.sqf @@ -30,9 +30,7 @@ if !(DMS_ai_offload_to_client) exitWith {}; { _owner = _x; }; - - false; - } count allPlayers; + } forEach allPlayers; if ((isNull _owner) || {(_owner distance2D _leader)>3500}) then { @@ -49,5 +47,4 @@ if !(DMS_ai_offload_to_client) exitWith {}; }; }; }; - false; -} count allGroups; \ No newline at end of file +} forEach allGroups; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf b/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf index 590fdea..0399cdb 100644 --- a/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf +++ b/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf @@ -97,12 +97,10 @@ try { { _units pushBack _x; - false; - } count (units _x); + } forEach (units _x); }; }; - false; - } count _inputUnits; + } forEach _inputUnits; _OK = _missionObjs params [ diff --git a/@ExileServer/addons/a3_dms/scripts/BroadcastMissionStatus.sqf b/@ExileServer/addons/a3_dms/scripts/BroadcastMissionStatus.sqf index 8431556..9cfcf31 100644 --- a/@ExileServer/addons/a3_dms/scripts/BroadcastMissionStatus.sqf +++ b/@ExileServer/addons/a3_dms/scripts/BroadcastMissionStatus.sqf @@ -31,5 +31,4 @@ if ((typeName _this) != "STRING") then ] select (_x == "dynamicTextRequest"); _args call ExileServer_system_network_send_broadcast; - false; -} count DMS_PlayerNotificationTypes; \ No newline at end of file +} forEach DMS_PlayerNotificationTypes; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/scripts/CleanUp.sqf b/@ExileServer/addons/a3_dms/scripts/CleanUp.sqf index a6b3dc1..04b24f6 100644 --- a/@ExileServer/addons/a3_dms/scripts/CleanUp.sqf +++ b/@ExileServer/addons/a3_dms/scripts/CleanUp.sqf @@ -29,14 +29,6 @@ if !((typeName _this) == "ARRAY") then _this = [_this]; }; - -/* -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; -}; -*/ - private ["_skippedObjects","_clean"]; _skippedObjects = []; @@ -85,8 +77,7 @@ _clean = // Group cleanup should only be called when it has to be deleted regardless, so no need to check for nearby players { _x call _clean; - false; - } count (units _x); + } forEach (units _x); if(local _x)then { @@ -108,9 +99,7 @@ _clean = }; diag_log format ["DMS ERROR :: Attempted to call DMS_CleanUp on non- group or object %1 from array %2",_x,_this]; }; - - false; -} count _this; +} forEach _this; if !(_skippedObjects isEqualTo []) then diff --git a/@ExileServer/addons/a3_dms/scripts/CleanUpManager.sqf b/@ExileServer/addons/a3_dms/scripts/CleanUpManager.sqf index fe36b04..98800ba 100644 --- a/@ExileServer/addons/a3_dms/scripts/CleanUpManager.sqf +++ b/@ExileServer/addons/a3_dms/scripts/CleanUpManager.sqf @@ -50,6 +50,4 @@ if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to cl diag_log format ["DMS_DEBUG CleanUpManager :: %1 is not yet ready to clean!",_x]; }; }; - - false; -} count DMS_CleanUpList; \ No newline at end of file +} forEach DMS_CleanUpList; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/scripts/MissionSuccessState.sqf b/@ExileServer/addons/a3_dms/scripts/MissionSuccessState.sqf index b64b90d..4ea22e6 100644 --- a/@ExileServer/addons/a3_dms/scripts/MissionSuccessState.sqf +++ b/@ExileServer/addons/a3_dms/scripts/MissionSuccessState.sqf @@ -58,7 +58,6 @@ _success = true; _success = _completionArgs call ExileServer_util_position_isPlayerNearby; }; }; - false; -} count _this; +} forEach _this; _success; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/scripts/MissionsMonitor.sqf b/@ExileServer/addons/a3_dms/scripts/MissionsMonitor.sqf index e96b850..f463d97 100644 --- a/@ExileServer/addons/a3_dms/scripts/MissionsMonitor.sqf +++ b/@ExileServer/addons/a3_dms/scripts/MissionsMonitor.sqf @@ -113,5 +113,4 @@ _index = 0; }; }; _index = _index + 1; - false; -} count DMS_Mission_Arr; \ No newline at end of file +} forEach DMS_Mission_Arr; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/scripts/OnKilled.sqf b/@ExileServer/addons/a3_dms/scripts/OnKilled.sqf index 8732c10..19cdd9c 100644 --- a/@ExileServer/addons/a3_dms/scripts/OnKilled.sqf +++ b/@ExileServer/addons/a3_dms/scripts/OnKilled.sqf @@ -40,7 +40,7 @@ if (isPlayer _player) then if (((position _x) distance (position _unit)) <= DMS_ai_share_info_distance ) then { _x reveal [_player, 4.0]; }; - } count allUnits; + } forEach allUnits; }; } else @@ -75,8 +75,7 @@ if(DMS_ai_remove_launchers && {_launcher != ""}) then if(_x == _rockets) then { _unit removeMagazine _x; }; - false; - } count magazines _unit; + } forEach magazines _unit; }; if(DMS_RemoveNVG) then diff --git a/@ExileServer/addons/a3_dms/scripts/SetAILocality.sqf b/@ExileServer/addons/a3_dms/scripts/SetAILocality.sqf index 77c364f..89558f4 100644 --- a/@ExileServer/addons/a3_dms/scripts/SetAILocality.sqf +++ b/@ExileServer/addons/a3_dms/scripts/SetAILocality.sqf @@ -43,8 +43,7 @@ _client = objNull; { _client = _x; }; - false; -} count allPlayers; +} forEach allPlayers; if (!isNull _client) then{ ExileServerOwnershipSwapQueue pushBack [_AI,_client]; diff --git a/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf b/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf index 1914f5e..53bd9a8 100644 --- a/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf +++ b/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf @@ -79,7 +79,7 @@ removeGoggles _unit; // Give default items if !(DMS_ai_default_items isEqualTo []) then { - {_unit linkItem _x;false;} count DMS_ai_default_items; + {_unit linkItem _x;} forEach DMS_ai_default_items; }; @@ -100,10 +100,10 @@ if (!_useCustomGear) then };// No more idiot-proofing for the following configs // Equipment (Stuff that goes in the toolbelt slots) - {_unit linkItem _x;false;} count (missionNamespace getVariable [format ["DMS_%1_equipment",_type],[]]); + {_unit linkItem _x;} forEach (missionNamespace getVariable [format ["DMS_%1_equipment",_type],[]]); // Items (Loot stuff that goes in uniform/vest/backpack) - {_unit addItem _x;false;} count (missionNamespace getVariable [format ["DMS_%1_items",_type],[]]); + {_unit addItem _x;} forEach (missionNamespace getVariable [format ["DMS_%1_items",_type],[]]); // Clothes @@ -228,8 +228,7 @@ else _x = [_x,1]; }; _unit addMagazines _x; - false; - } count _magazines; + } forEach _magazines; // Add gun and attachments @@ -239,8 +238,7 @@ else { _unit addPrimaryWeaponItem _x; - false; - } count _weaponAttachments; + } forEach _weaponAttachments; _unit selectWeapon _weapon; }; @@ -253,25 +251,22 @@ else { _unit addPrimaryWeaponItem _x; - false; - } count _pistolAttachments; + } forEach _pistolAttachments; }; // Add items { _unit addItem _x; - false; - } count _items; + } forEach _items; }; { _unit setSkill [(_x select 0),(_x select 1)]; - false; -} count (missionNamespace getVariable [format["DMS_ai_skill_%1",_difficulty],[]]); +} forEach (missionNamespace getVariable [format["DMS_ai_skill_%1",_difficulty],[]]); // Soldier killed event handler -_unit addMPEventHandler ["MPKilled",'[_this, '+str _side+', "soldier"] call DMS_OnKilled;']; +_unit addMPEventHandler ["MPKilled",'if (isServer) then {[_this, '+str _side+', "soldier"] call DMS_OnKilled;};']; _unit enableAI "TARGET"; _unit enableAI "AUTOTARGET"; diff --git a/@ExileServer/addons/a3_dms/scripts/TargetsKilled.sqf b/@ExileServer/addons/a3_dms/scripts/TargetsKilled.sqf index 74ddd07..28aa97c 100644 --- a/@ExileServer/addons/a3_dms/scripts/TargetsKilled.sqf +++ b/@ExileServer/addons/a3_dms/scripts/TargetsKilled.sqf @@ -44,12 +44,9 @@ try { throw _x; }; - false; - } count (units _x); + } forEach (units _x); }; - - false; - } count _this; + } forEach _this; _killed = true; } diff --git a/@ExileServer/addons/a3_dms/scripts/findSafePos.sqf b/@ExileServer/addons/a3_dms/scripts/findSafePos.sqf index 55cc60c..4b124eb 100644 --- a/@ExileServer/addons/a3_dms/scripts/findSafePos.sqf +++ b/@ExileServer/addons/a3_dms/scripts/findSafePos.sqf @@ -61,8 +61,7 @@ while{!_validspot} do { { throw ("another mission"); }; - false; - } count allMapMarkers; + } forEach allMapMarkers; // No exceptions found _validspot = true; diff --git a/@ExileServer/addons/a3_dms/scripts/isPlayerNearbyARRAY.sqf b/@ExileServer/addons/a3_dms/scripts/isPlayerNearbyARRAY.sqf index 7a50d4a..4162acd 100644 --- a/@ExileServer/addons/a3_dms/scripts/isPlayerNearbyARRAY.sqf +++ b/@ExileServer/addons/a3_dms/scripts/isPlayerNearbyARRAY.sqf @@ -38,9 +38,7 @@ _result = false; diag_log format["DMS_DEBUG IsPlayerNearbyARRAY :: %1 is within %2m of %3!",_plyr,_radius,_x]; }; }; - false; - } count _posArray; + } forEach _posArray; }; - false; -} count allPlayers; +} forEach allPlayers; _result \ No newline at end of file