Skip to content

Commit

Permalink
Merge pull request #13 from gruppe-adler/fix-sp
Browse files Browse the repository at this point in the history
fix playableUnits usages for singleplayer
  • Loading branch information
Fusselwurm authored Apr 29, 2018
2 parents 01db824 + 10fc717 commit 0ed814c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions functions/endings/fn_presetElimination.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "component.hpp"
#define PLAYABLE_UNITS (playableUnits + switchableUnits)

params ["_winName","_sides"];
_sides = _sides apply {call compile _x};
Expand Down Expand Up @@ -26,11 +27,11 @@ _taskDesc = _taskDesc + ".";
params ["_args","_handle"];
_args params ["_winName","_sides","_taskID"];

if ({_side = _x; ({side _x == _side} count playableUnits) > 0} count _sides == 0) exitWith {
if ({_side = _x; ({side _x == _side} count PLAYABLE_UNITS) > 0} count _sides == 0) exitWith {

[{
params ["_winName","_sides","_taskID"];
if ({_side = _x; ({side _x == _side} count playableUnits) > 0} count _sides == 0) then {
if ({_side = _x; ({side _x == _side} count PLAYABLE_UNITS) > 0} count _sides == 0) then {

[_taskID,"SUCCEEDED",true] call BIS_fnc_taskSetState;
[_winName] call grad_endings_fnc_endMissionServer;
Expand Down
3 changes: 2 additions & 1 deletion functions/groupSettings/fn_findPlayableGroups.sqf
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "component.hpp"
#define PLAYABLE_UNITS (playableUnits + switchableUnits)

_blugroups = [];
_opfgroups = [];
_indgroups = [];

{
if ((leader _x) in playableUnits) then {
if ((leader _x) in PLAYABLE_UNITS) then {
switch (side _x) do {
case west: {_blugroups pushBack _x};
case east: {_opfgroups pushBack _x};
Expand Down

0 comments on commit 0ed814c

Please sign in to comment.