Fix refuel PFH not exiting on nozzle disconnect

This commit is contained in:
jonpas
2015-12-11 22:45:28 +01:00
parent 8e6a057f52
commit e5f64bcdc1
2 changed files with 6 additions and 2 deletions

View File

@ -29,6 +29,10 @@ _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(f
params ["_args", "_pfID"]; params ["_args", "_pfID"];
_args params ["_source", "_sink", "_unit", "_nozzle", "_rate", "_startFuel", "_maxFuel", "_connectFromPoint", "_connectToPoint"]; _args params ["_source", "_sink", "_unit", "_nozzle", "_rate", "_startFuel", "_maxFuel", "_connectFromPoint", "_connectToPoint"];
if (_nozzle getVariable [QGVAR(isConnected), false]) exitWith {
[_pfID] call cba_fnc_removePerFrameHandler;
};
_fueling = _nozzle getVariable [QGVAR(isRefueling), false]; _fueling = _nozzle getVariable [QGVAR(isRefueling), false];
if (!alive _source || {!alive _sink}) exitWith { if (!alive _source || {!alive _sink}) exitWith {
[objNull, _nozzle] call FUNC(dropNozzle); [objNull, _nozzle] call FUNC(dropNozzle);