diff --git a/addons/mission/functions/fnc_reinforcementWaves.sqf b/addons/mission/functions/fnc_reinforcementWaves.sqf index 2a57e201..b861e8d0 100644 --- a/addons/mission/functions/fnc_reinforcementWaves.sqf +++ b/addons/mission/functions/fnc_reinforcementWaves.sqf @@ -20,13 +20,6 @@ params ["_groups", "_time"]; if (!isServer) exitWith {}; -if (is3DENPreview) then { - private _typeCheck = _groups findIf {_x isEqualType "OBJECT"}; - if (_typeCheck != -1) exitWith { - ERROR_MSG_1("Input only allows groups, detected unit at index (%1)",_typeCheck); - }; -}; - { [{ [_this, false] call FUNC(reinforcements); diff --git a/addons/mission/functions/fnc_reinforcements.sqf b/addons/mission/functions/fnc_reinforcements.sqf index 1b27e319..4b50abce 100644 --- a/addons/mission/functions/fnc_reinforcements.sqf +++ b/addons/mission/functions/fnc_reinforcements.sqf @@ -20,16 +20,23 @@ params [["_groups", []], ["_state", true]]; if (!isServer) exitWith {}; +// Backward compatibility / Forces reinforcementWaves to utilise an array instead of group. +if (_groups isEqualType grpNull) then { + _groups = [_groups]; +}; + +if (is3DENPreview) then { + private _typeCheck = _groups findIf {_x isEqualType "OBJECT"}; + if (_typeCheck != -1) exitWith { + ERROR_MSG_1("Input only allows groups, detected unit at index (%1)",_typeCheck); + }; +}; + // Handle trying to cause lagspikes. if (!_state && count _groups > 2) exitWith { [_groups, 1.5] call FUNC(reinforcementWaves); }; -// Backward compatibility -if (_groups isEqualType grpNull) then { - _groups = [_groups]; -}; - { { _x enableSimulationGlobal !_state;