mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Minor fixes
This commit is contained in:
parent
f54beb5c86
commit
2816e8863a
@ -85,6 +85,7 @@ _unit setVariable [QGVAR(isRefueling), false];
|
||||
_nozzle attachTo [_target, _endPosTestOffset];
|
||||
_nozzle setVariable [QGVAR(sink), _target, true];
|
||||
_nozzle setVariable [QGVAR(isRefueling), true, true];
|
||||
_nozzle setVariable [QGVAR(isConnected), true, true];
|
||||
_target setVariable [QGVAR(nozzle), _nozzle, true];
|
||||
|
||||
[_unit, _target, _nozzle] call FUNC(refuel);
|
||||
|
@ -33,11 +33,16 @@ _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(f
|
||||
|
||||
_source = _nozzle getVariable [QGVAR(source), objNull];
|
||||
_sink = _nozzle getVariable [QGVAR(sink), objNull];
|
||||
if (isNull _source || {isNull _sink} || {(_sink distance (_source modelToWorld (_nozzle getVariable [QGVAR(attachPos), [0,0,0]]))) > 10}) exitWith {
|
||||
if (isNull _source ||
|
||||
{isNull _sink} ||
|
||||
{(_sink distance (_source modelToWorld (_nozzle getVariable [QGVAR(attachPos), [0,0,0]]))) > 10} ||
|
||||
{!alive _source} ||
|
||||
{!alive _sink}) exitWith {
|
||||
[LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured);
|
||||
detach _nozzle;
|
||||
_nozzle setPosATL [(getPosATL _nozzle) select 0,(getPosATL _nozzle) select 1, 0];
|
||||
_nozzle setVelocity [0, 0, 0];
|
||||
_nozzle setVariable [QGVAR(isConnected), false, true];
|
||||
_nozzle setVariable [QGVAR(isRefueling), false, true];
|
||||
_nozzle setVariable [QGVAR(sink), objNull, true];
|
||||
_sink setVariable [QGVAR(nozzle), objNull, true];
|
||||
@ -77,7 +82,6 @@ _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(f
|
||||
[LSTRING(Hint_Stopped), 2, _unit] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
_nozzle setVariable [QGVAR(isRefueling), false, true];
|
||||
[_pfID] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// display flickers even at 1 second intervals
|
||||
|
Loading…
Reference in New Issue
Block a user