diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf index 6ba7a4928e..140021419d 100644 --- a/addons/refuel/functions/fnc_checkFuel.sqf +++ b/addons/refuel/functions/fnc_checkFuel.sqf @@ -27,9 +27,9 @@ private _fuel = [_target] call FUNC(getFuel); params ["_args"]; _args params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_fuel", 0, [0]]]; if (_fuel > 0 ) then { - ["displayTextStructured", [_unit], [[LSTRING(Hint_RemainingFuel), _fuel], 2, _unit]] call EFUNC(common,targetEvent); + ["displayTextStructured", _unit, [[LSTRING(Hint_RemainingFuel), _fuel], 2, _unit]] call EFUNC(common,objectEvent); } else { - ["displayTextStructured", [_unit], [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,targetEvent); + ["displayTextStructured", _unit, [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,objectEvent); }; true }, diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index ae707a5718..1df5f1e208 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -119,7 +119,7 @@ _endPosTestOffset set [2, (_startingOffset select 2)]; }; }; }; - ["setVectorDirAndUp", _nozzle, [_nozzle, _dirAndUp]] call EFUNC(common,targetEvent); + ["setVectorDirAndUp", _nozzle, [_nozzle, _dirAndUp]] call EFUNC(common,objectEvent); _nozzle setVariable [QGVAR(sink), _target, true]; _nozzle setVariable [QGVAR(isConnected), true, true]; _target setVariable [QGVAR(nozzle), _nozzle, true]; diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index 9db305526c..5ee3bf3794 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -76,11 +76,7 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> }; _unit setVariable [QGVAR(tempFuel), _fuelInSink]; - if !(local _sink) then { - ["setFuel", _sink, [_sink, _fuelInSink]] call EFUNC(common,targetEvent); - } else { - _sink setFuel _fuelInSink; - }; + ["setFuel", _sink, [_sink, _fuelInSink]] call EFUNC(common,objectEvent); [_source, _fuelInSource] call FUNC(setFuel); } else { _unit setVariable [QGVAR(tempFuel), fuel _sink]; diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf index da983e6492..ff04ed13e3 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -17,11 +17,8 @@ params [["_target", objNull, [objNull]]]; -if (local _target) then { - _target setHitPointDamage ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]; -} else { - ["setHitPointDamage", _target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]] call EFUNC(common,targetEvent); -}; +["setHitPointDamage", _target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]] call EFUNC(common,objectEvent); + _target setVariable [QGVAR(engineHit), nil, true]; _target setVariable [QGVAR(isConnected), false, true]; @@ -38,11 +35,7 @@ if !(isNil "_nozzle") then { }; { - if (local _x) then { - [_x, _nozzle] call FUNC(resetLocal); - } else { - [QGVAR(resetLocal), _x, [_x, _nozzle]] call EFUNC(common,targetEvent); - }; + [QGVAR(resetLocal), _x, [_x, _nozzle]] call EFUNC(common,objectEvent); } count allPlayers; deleteVehicle _nozzle; }; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 179785f863..af3e8c6d4e 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -48,11 +48,7 @@ if (isNull _nozzle || {_source != _target}) exitWith {false}; }; deleteVehicle _nozzle; - if !(local _target) then { - ["setHitPointDamage", _target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]] call EFUNC(common,targetEvent); - } else { - _target setHitPointDamage ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]; - }; + ["setHitPointDamage", _target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]] call EFUNC(common,objectEvent); _target setVariable [QGVAR(engineHit), nil, true]; }, "", diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 08f9e152c0..d862aa16b5 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -27,11 +27,7 @@ REFUEL_HOLSTER_WEAPON private _endPosOffset = [0, 0, 0]; if (isNull _nozzle) then { // func is called on fuel truck _target setVariable [QGVAR(engineHit), _target getHitPointDamage "HitEngine", true]; - if !(local _target) then { - ["setHitPointDamage", _target, ["HitEngine", 1]] call EFUNC(common,targetEvent); - } else { - _target setHitPointDamage ["HitEngine", 1]; - }; + ["setHitPointDamage", _target, ["HitEngine", 1]] call EFUNC(common,objectEvent); _target setVariable [QGVAR(isConnected), true, true]; _endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks));