From cf8421fc1c2f38f914337b6dd37b1a5e09da14ac Mon Sep 17 00:00:00 2001 From: Tim Beswick Date: Wed, 10 May 2017 22:36:18 +0100 Subject: [PATCH 1/7] Enabled refuel for non-AllVehicles objects. Un-magic'd refuel progress timer. --- addons/refuel/CfgVehicles.hpp | 10 ++++++++++ addons/refuel/data/helper.p3d | Bin 0 -> 4036 bytes addons/refuel/functions/fnc_checkFuel.sqf | 2 +- .../functions/fnc_connectNozzleAction.sqf | 2 +- .../functions/fnc_maxDistanceDropNozzle.sqf | 4 ++++ addons/refuel/functions/fnc_readFuelCounter.sqf | 2 +- addons/refuel/functions/fnc_reset.sqf | 4 ++++ addons/refuel/functions/fnc_returnNozzle.sqf | 6 +++++- addons/refuel/functions/fnc_takeNozzle.sqf | 16 ++++++++++------ addons/refuel/functions/fnc_turnOff.sqf | 2 +- addons/refuel/functions/fnc_turnOn.sqf | 2 +- addons/refuel/script_component.hpp | 1 + 12 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 addons/refuel/data/helper.p3d diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index 4859cd883f9..14b9fa8874b 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -512,6 +512,16 @@ class CfgVehicles { GVAR(fuelCargo) = REFUEL_INFINITE_FUEL; }; + // Helper object for non-AllVehicles objects + class GVAR(helper): Helicopter_Base_F { + author = "Beswick.T"; + scope = 1; + model = QPATHTOF(data\helper.p3d); + class ACE_Actions {}; + class Turrets {}; + class TransportItems {}; + }; + /* // Barrels found in config \ BarrelHelper: Misc_thing 100 BarrelBase: BarrelHelper 100 diff --git a/addons/refuel/data/helper.p3d b/addons/refuel/data/helper.p3d new file mode 100644 index 0000000000000000000000000000000000000000..e8b05a450436e14ecf580ef0c18425d74d19933a GIT binary patch literal 4036 zcmeHKJ8u&~5Z)sY9tLCc41yxk@dJ1?fMV@hB&3NIB$Eg#6U7Hu3XVnGqMVd8X%PPa zDCr~7*n%n*3JnwiQc>gw&{479&dz!7V#8TfNH@~n&bPDk?d;Cpja`|Uo%B2*4hbRd zUZ1R7(!J0)Dfi0L)1E&!Uk%#6IB2b&Kh>>+fLWKXb9sas3@^{C9U&-@ksBGiwjh zKklr`?awr4TkD_t=!iv#P*Oiwzp<6;e$i`U#?1k`<}r5S>aSZKv!1J4PKmv|viox5 zx13R&ZanU~%sE01u_rDAT?pFm0gcf}LJ57pA4W!FmQWtnn63_(LJ1xBjs+NV;sPdE zz-C3ki)Nab6vlDaNGQ%6!>9)nJdZ{rLV@L&!Ni1}_B=xgeA3w62bkc=_gbq8@tx2O zJJSz^Ie9=Mp#(l{QLn=&Je@TZc3Uu0hzTcLG#C#$@$(U81x(3YVeFKd04DNGmpkkZ zali`==SI<+n2ar5?vlAejAuY>nW3f2T{2hL-C4L>ru4Z><_c$W&S3&`y4)pm1ro|l z@5KL}JNmj-pDa9UP1PRA_f|V6eeyRD|;l;*F z%>s-$alz++KLOUF_)|bk^rEHv2*WcgpmdIZ`tg&@70xXyp!WXRj&G*>V+W@Hrhxj@ zU@2H^2X%jN{T#l?Zt5b7Hm<0}aaLr9EXw_g?7UlK@o{wJ*IK@-YA-u`yLt0Zk?}_U jg87#@`l48J?Tp!;?!WTe+K>Bg6mA62)3I#++j&O* literal 0 HcmV?d00001 diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf index 49d62b1e448..8acecccfd64 100644 --- a/addons/refuel/functions/fnc_checkFuel.sqf +++ b/addons/refuel/functions/fnc_checkFuel.sqf @@ -21,7 +21,7 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; private _fuel = [_target] call FUNC(getFuel); [ - 5, + REFUEL_PROGRESS_DURATION * 2.5, [_unit, _target, _fuel], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 250da51e211..b1328636725 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -72,7 +72,7 @@ _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _endPosTestOffset set [2, (_startingOffset select 2)]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle, _target, _endPosTestOffset], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf index 2a23b5eb997..69e012290a5 100644 --- a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf +++ b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf @@ -49,6 +49,10 @@ if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; if !(isNull _rope) then { ropeDestroy _rope; }; + private _helper = _target getVariable [QGVAR(helper), objNull]; + if !(isNull _helper) then { + deleteVehicle _helper; + }; deleteVehicle _nozzle; } else { [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured); diff --git a/addons/refuel/functions/fnc_readFuelCounter.sqf b/addons/refuel/functions/fnc_readFuelCounter.sqf index 519b07897d6..1b1fb78e81b 100644 --- a/addons/refuel/functions/fnc_readFuelCounter.sqf +++ b/addons/refuel/functions/fnc_readFuelCounter.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _target], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf index d58f0a48ad2..48425895961 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -31,6 +31,10 @@ if !(isNil "_nozzle") then { if !(isNull _rope) then { ropeDestroy _rope; }; + private _helper = _target getVariable [QGVAR(helper), objNull]; + if !(isNull _helper) then { + deleteVehicle _helper; + }; { [QGVAR(resetLocal), [_x, _nozzle], _x] call CBA_fnc_targetEvent; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 1bd364eafb6..657d09b7d4d 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -24,7 +24,7 @@ private _source = _nozzle getVariable QGVAR(source); if (isNull _nozzle || {_source != _target}) exitWith {false}; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle, _target], { params ["_args"]; @@ -46,6 +46,10 @@ if (isNull _nozzle || {_source != _target}) exitWith {false}; if !(isNull _rope) then { ropeDestroy _rope; }; + private _helper = _target getVariable [QGVAR(helper), objNull]; + if !(isNull _helper) then { + deleteVehicle _helper; + }; deleteVehicle _nozzle; [_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set); diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 006c5e09429..c0b99732b24 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -39,7 +39,7 @@ if (isNull _nozzle) then { // func is called on fuel truck _endPosOffset = _endPosOffset select 0; }; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _target, _endPosOffset], { params ["_args"]; @@ -53,11 +53,15 @@ if (isNull _nozzle) then { // func is called on fuel truck _newNozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; _unit setVariable [QGVAR(nozzle), _newNozzle, true]; - if (_target isKindOf "AllVehicles") then { - // Currently ropeCreate requires its first parameter to be a real vehicle - private _rope = ropeCreate [_target, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH]; - _newNozzle setVariable [QGVAR(rope), _rope, true]; + private _ropeTarget = _target; + if (!(_target isKindOf "AllVehicles")) then { + private _helper = QGVAR(helper) createVehicle [0,0,0]; + _helper attachTo [_target, _endPosOffset]; + _target setVariable [QGVAR(helper), _helper, true]; + _ropeTarget = _helper; }; + private _rope = ropeCreate [_ropeTarget, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH]; + _newNozzle setVariable [QGVAR(rope), _rope, true]; _newNozzle setVariable [QGVAR(attachPos), _endPosOffset, true]; _newNozzle setVariable [QGVAR(source), _target, true]; @@ -93,7 +97,7 @@ if (isNull _nozzle) then { // func is called on fuel truck ] call EFUNC(common,progressBar); } else { // func is called on muzzle either connected or on ground [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_turnOff.sqf b/addons/refuel/functions/fnc_turnOff.sqf index 7ce3d9c874e..31308607bb1 100644 --- a/addons/refuel/functions/fnc_turnOff.sqf +++ b/addons/refuel/functions/fnc_turnOff.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_turnOn.sqf b/addons/refuel/functions/fnc_turnOn.sqf index 7a69de9b6f8..b7a4cf1bc98 100644 --- a/addons/refuel/functions/fnc_turnOn.sqf +++ b/addons/refuel/functions/fnc_turnOn.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp index 37b9502510b..a62e14048cd 100644 --- a/addons/refuel/script_component.hpp +++ b/addons/refuel/script_component.hpp @@ -19,6 +19,7 @@ #define REFUEL_INFINITE_FUEL -10 #define REFUEL_ACTION_DISTANCE 7 #define REFUEL_HOSE_LENGTH 12 +#define REFUEL_PROGRESS_DURATION 2 #define REFUEL_HOLSTER_WEAPON \ _unit setVariable [QGVAR(selectedWeaponOnRefuel), currentWeapon _unit]; \ From 1104a597b5d0d2b01f84e504eeb14d47c3530f66 Mon Sep 17 00:00:00 2001 From: Tim Beswick Date: Wed, 10 May 2017 22:43:37 +0100 Subject: [PATCH 2/7] Changed helper attach position to centre of object. Offset applied when rope attached. --- addons/refuel/functions/fnc_takeNozzle.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index c0b99732b24..12ad690d74a 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -56,7 +56,7 @@ if (isNull _nozzle) then { // func is called on fuel truck private _ropeTarget = _target; if (!(_target isKindOf "AllVehicles")) then { private _helper = QGVAR(helper) createVehicle [0,0,0]; - _helper attachTo [_target, _endPosOffset]; + _helper attachTo [_target, [0,0,0]]; _target setVariable [QGVAR(helper), _helper, true]; _ropeTarget = _helper; }; From 89bcca3ed0f7e314243eabbcd248835351dd0eb8 Mon Sep 17 00:00:00 2001 From: Tim Beswick Date: Thu, 11 May 2017 02:13:47 +0100 Subject: [PATCH 3/7] Made fully compatible with non-thingX simulation types. Removed destruction effects of helper object. --- addons/refuel/CfgVehicles.hpp | 3 +++ addons/refuel/functions/fnc_takeNozzle.sqf | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index 14b9fa8874b..c4df318612c 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -518,6 +518,9 @@ class CfgVehicles { scope = 1; model = QPATHTOF(data\helper.p3d); class ACE_Actions {}; + damageEffect = ""; + destrType = ""; + class HitPoints {}; class Turrets {}; class TransportItems {}; }; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 12ad690d74a..66d71c2cb9f 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -56,7 +56,14 @@ if (isNull _nozzle) then { // func is called on fuel truck private _ropeTarget = _target; if (!(_target isKindOf "AllVehicles")) then { private _helper = QGVAR(helper) createVehicle [0,0,0]; - _helper attachTo [_target, [0,0,0]]; + hideObjectGlobal _helper; + if ((getText (configFile >> "CfgVehicles" >> typeOf _target >> "simulation")) isEqualTo "thingX") then { + _helper attachTo [_target, [0,0,0]]; + } else { + _helper setPosWorld (getPosWorld _target); + _helper setDir (getDir _target); + _helper setVectorUp (vectorUp _target); + }; _target setVariable [QGVAR(helper), _helper, true]; _ropeTarget = _helper; }; From d8a7ef47b61bc1950d94a514b4751ce4bd76b380 Mon Sep 17 00:00:00 2001 From: Tim Beswick Date: Thu, 11 May 2017 02:30:46 +0100 Subject: [PATCH 4/7] Using arma model. Removed ACE_Actions from helper object. --- addons/refuel/CfgVehicles.hpp | 6 +++--- addons/refuel/data/helper.p3d | Bin 4036 -> 0 bytes 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 addons/refuel/data/helper.p3d diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index c4df318612c..dd8e33862e2 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -514,10 +514,10 @@ class CfgVehicles { // Helper object for non-AllVehicles objects class GVAR(helper): Helicopter_Base_F { - author = "Beswick.T"; scope = 1; - model = QPATHTOF(data\helper.p3d); - class ACE_Actions {}; + displayName = "Refuel Helper"; + model = "\A3\Weapons_f\empty"; + delete ACE_Actions; damageEffect = ""; destrType = ""; class HitPoints {}; diff --git a/addons/refuel/data/helper.p3d b/addons/refuel/data/helper.p3d deleted file mode 100644 index e8b05a450436e14ecf580ef0c18425d74d19933a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4036 zcmeHKJ8u&~5Z)sY9tLCc41yxk@dJ1?fMV@hB&3NIB$Eg#6U7Hu3XVnGqMVd8X%PPa zDCr~7*n%n*3JnwiQc>gw&{479&dz!7V#8TfNH@~n&bPDk?d;Cpja`|Uo%B2*4hbRd zUZ1R7(!J0)Dfi0L)1E&!Uk%#6IB2b&Kh>>+fLWKXb9sas3@^{C9U&-@ksBGiwjh zKklr`?awr4TkD_t=!iv#P*Oiwzp<6;e$i`U#?1k`<}r5S>aSZKv!1J4PKmv|viox5 zx13R&ZanU~%sE01u_rDAT?pFm0gcf}LJ57pA4W!FmQWtnn63_(LJ1xBjs+NV;sPdE zz-C3ki)Nab6vlDaNGQ%6!>9)nJdZ{rLV@L&!Ni1}_B=xgeA3w62bkc=_gbq8@tx2O zJJSz^Ie9=Mp#(l{QLn=&Je@TZc3Uu0hzTcLG#C#$@$(U81x(3YVeFKd04DNGmpkkZ zali`==SI<+n2ar5?vlAejAuY>nW3f2T{2hL-C4L>ru4Z><_c$W&S3&`y4)pm1ro|l z@5KL}JNmj-pDa9UP1PRA_f|V6eeyRD|;l;*F z%>s-$alz++KLOUF_)|bk^rEHv2*WcgpmdIZ`tg&@70xXyp!WXRj&G*>V+W@Hrhxj@ zU@2H^2X%jN{T#l?Zt5b7Hm<0}aaLr9EXw_g?7UlK@o{wJ*IK@-YA-u`yLt0Zk?}_U jg87#@`l48J?Tp!;?!WTe+K>Bg6mA62)3I#++j&O* From 08440d320a8af2084a21068f898eb65158c3ab6c Mon Sep 17 00:00:00 2001 From: Tim Beswick Date: Thu, 11 May 2017 15:07:20 +0100 Subject: [PATCH 5/7] Correct use of hideObjectGlobal --- addons/refuel/functions/fnc_takeNozzle.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 66d71c2cb9f..6a8dec78566 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -56,7 +56,7 @@ if (isNull _nozzle) then { // func is called on fuel truck private _ropeTarget = _target; if (!(_target isKindOf "AllVehicles")) then { private _helper = QGVAR(helper) createVehicle [0,0,0]; - hideObjectGlobal _helper; + [QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent; if ((getText (configFile >> "CfgVehicles" >> typeOf _target >> "simulation")) isEqualTo "thingX") then { _helper attachTo [_target, [0,0,0]]; } else { From d0298d95275ce48b964ca009f1c37b170baa55ac Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 11 May 2017 15:45:39 -0500 Subject: [PATCH 6/7] Remove actions, cargo, repair on helper --- addons/refuel/CfgVehicles.hpp | 5 ++++- addons/repair/CfgEventHandlers.hpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index dd8e33862e2..6fc5ddae086 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -517,7 +517,10 @@ class CfgVehicles { scope = 1; displayName = "Refuel Helper"; model = "\A3\Weapons_f\empty"; - delete ACE_Actions; + class ACE_Actions {}; + class ACE_SelfActions {}; + EGVAR(cargo,hasCargo) = 0; + EGVAR(cargo,space) = 0; damageEffect = ""; destrType = ""; class HitPoints {}; diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index 559d2d4d7e4..3e47f9f96f1 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -37,7 +37,7 @@ class Extended_InitPost_EventHandlers { class Helicopter { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"}; + exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase", QEGVAR(refuel,helper)}; }; }; class Plane { From e18fe02c992e1014163b028c8f3323bbe4c7239e Mon Sep 17 00:00:00 2001 From: Tim Beswick Date: Fri, 12 May 2017 15:51:53 +0100 Subject: [PATCH 7/7] Switched helper to be setVar'd on the nozzle object --- addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf | 2 +- addons/refuel/functions/fnc_reset.sqf | 2 +- addons/refuel/functions/fnc_returnNozzle.sqf | 2 +- addons/refuel/functions/fnc_takeNozzle.sqf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf index 69e012290a5..81ce6ccd2fc 100644 --- a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf +++ b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf @@ -49,7 +49,7 @@ if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; if !(isNull _rope) then { ropeDestroy _rope; }; - private _helper = _target getVariable [QGVAR(helper), objNull]; + private _helper = _nozzle getVariable [QGVAR(helper), objNull]; if !(isNull _helper) then { deleteVehicle _helper; }; diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf index 48425895961..480beb6ca0f 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -31,7 +31,7 @@ if !(isNil "_nozzle") then { if !(isNull _rope) then { ropeDestroy _rope; }; - private _helper = _target getVariable [QGVAR(helper), objNull]; + private _helper = _nozzle getVariable [QGVAR(helper), objNull]; if !(isNull _helper) then { deleteVehicle _helper; }; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 657d09b7d4d..752be90d238 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -46,7 +46,7 @@ if (isNull _nozzle || {_source != _target}) exitWith {false}; if !(isNull _rope) then { ropeDestroy _rope; }; - private _helper = _target getVariable [QGVAR(helper), objNull]; + private _helper = _nozzle getVariable [QGVAR(helper), objNull]; if !(isNull _helper) then { deleteVehicle _helper; }; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 6a8dec78566..3012cdc860e 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -64,7 +64,7 @@ if (isNull _nozzle) then { // func is called on fuel truck _helper setDir (getDir _target); _helper setVectorUp (vectorUp _target); }; - _target setVariable [QGVAR(helper), _helper, true]; + _newNozzle setVariable [QGVAR(helper), _helper, true]; _ropeTarget = _helper; }; private _rope = ropeCreate [_ropeTarget, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH];