From 49f01a0facabf7abc616510190502a11bf334981 Mon Sep 17 00:00:00 2001 From: bux578 Date: Tue, 13 Jan 2015 10:53:04 +0100 Subject: [PATCH] fix switchUntis forgot that little bugger --- addons/switchunits/XEH_postInit.sqf | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/addons/switchunits/XEH_postInit.sqf b/addons/switchunits/XEH_postInit.sqf index 6c769a5903..3ce84ef838 100644 --- a/addons/switchunits/XEH_postInit.sqf +++ b/addons/switchunits/XEH_postInit.sqf @@ -3,21 +3,25 @@ bux578 */ -0 spawn { - private ["_side"]; - - waitUntil {sleep 0.5; AGM_SwitchUnits_EnableSwitchUnits}; - - //_side = [west, east, independent, civilian] select AGM_SwitchUnits_SwitchUnitsAllowedForSide; - - _sides = []; - - if(AGM_SwitchUnits_SwitchToWest) then {_sides pushBack west}; - if(AGM_SwitchUnits_SwitchToEast) then {_sides pushBack east}; - if(AGM_SwitchUnits_SwitchToIndependent) then {_sides pushBack independent}; - if(AGM_SwitchUnits_SwitchToCivilian) then {_sides pushBack civilian}; - - if (player getVariable ["AGM_CanSwitchUnits", false]) then { - [player, _sides] call AGM_SwitchUnits_fnc_initPlayer; - }; +#include "script_component.hpp" + +//0 spawn { + +private ["_sides"]; + +//waitUntil {sleep 0.5; AGM_SwitchUnits_EnableSwitchUnits}; + +//_side = [west, east, independent, civilian] select AGM_SwitchUnits_SwitchUnitsAllowedForSide; + +_sides = []; + +if(GVAR(SwitchToWest)) then {_sides pushBack west}; +if(GVAR(SwitchToEast)) then {_sides pushBack east}; +if(GVAR(SwitchToIndependent)) then {_sides pushBack independent}; +if(GVAR(SwitchToCivilian)) then {_sides pushBack civilian}; + +if (player getVariable ["ACE_CanSwitchUnits", false]) then { +[player, _sides] call FUNC(initPlayer); }; + +//};