Prevent taking nozzle if already carried (#5352)

This commit is contained in:
jonpas 2017-07-10 21:41:23 +02:00 committed by GitHub
parent c28628aed2
commit 6253ec0915

View File

@ -23,6 +23,7 @@ if (isNull _unit ||
{!local _unit} ||
{!alive _target} ||
{!isNull (_unit getVariable [QGVAR(nozzle), objNull])} ||
{typeOf _target == QGVAR(fuelNozzle) && {!isNull (attachedTo _target)}} || // Not carried by someone else
{([_unit, _target] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE}) exitWith {false};
!(_target getVariable [QGVAR(isConnected), false]) && {!(_unit getVariable [QGVAR(isRefueling), false])}