check if unit is in a vehicle before checking the vehicle

This commit is contained in:
Glowbal 2015-03-21 10:55:27 +01:00
parent b5c6e52416
commit bc082783c9

View File

@ -32,7 +32,7 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
};
_return = false;
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {(vehicle _medic != _medic)}) then {
if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then {
_crew = crew vehicle _medic;
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {