Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions addons/mission/functions/fnc_reinforcementWaves.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
17 changes: 12 additions & 5 deletions addons/mission/functions/fnc_reinforcements.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading