Ensuring a proper return value and removing unnecessary code.

#1375
This commit is contained in:
ViperMaul 2015-05-25 10:32:52 -07:00
parent 3bdb27386c
commit 789e92d8ef

View File

@ -15,16 +15,17 @@
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_vehicle", "_loaded","_caller"];
private ["_vehicle","_emptyPos"];
PARAMS_1(_unit);
_vehicle = vehicle _unit;
_caller = ACE_Player;
if (_vehicle == _unit) exitwith {false;};
if !(speed _vehicle <1 && (((getpos _vehicle) select 2) < 2)) exitwith {false;};
_emptyPos = ((getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]);
if (count _emptyPos == 0) exitwith {false};
if (!isNull _vehicle) then {
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
[[_unit], QUOTE(FUNC(unloadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
};