Add support for loading unconscious into boats, refs #1729

This commit is contained in:
ViperMaul 2015-07-26 18:33:25 -07:00
parent 6142d99626
commit 9a98530392

View File

@ -12,7 +12,7 @@
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank","_loadboat"];
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_vehicle = ObjNull;
@ -30,6 +30,11 @@ if (_unit distance _loadcar <= 10) then {
_loadtank = nearestObject [_unit, "tank"];
if (_unit distance _loadtank <= 10) then {
_vehicle = _loadtank;
} else {
_loadboat = nearestObject [_unit, "ship"];
if (_unit distance _loadboat <= 10) then {
_vehicle = _loadboat;
};
};
};
};