Use blockeEngine status effect in refuel

This commit is contained in:
BaerMitUmlaut 2016-05-03 21:08:22 +02:00
parent e125911c3b
commit 304f1a22b4
3 changed files with 3 additions and 7 deletions

View File

@ -17,9 +17,7 @@
params [["_target", objNull, [objNull]]];
["setVanillaHitPointDamage", _target, [_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]] ] ] call EFUNC(common,objectEvent);
_target setVariable [QGVAR(engineHit), nil, true];
[_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set);
_target setVariable [QGVAR(isConnected), false, true];
private _nozzle = _target getVariable [QGVAR(ownedNozzle), nil];

View File

@ -48,8 +48,7 @@ if (isNull _nozzle || {_source != _target}) exitWith {false};
};
deleteVehicle _nozzle;
["setVanillaHitPointDamage", _target, [_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]] ] ] call EFUNC(common,objectEvent);
_target setVariable [QGVAR(engineHit), nil, true];
[_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set);
},
"",
localize LSTRING(ReturnAction),

View File

@ -26,8 +26,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];
["setVanillaHitPointDamage", _target, [_target, ["HitEngine", 1]] ] call EFUNC(common,objectEvent);
[_target, "blockEngine", "ACE_Refuel", true] call EFUNC(common,statusEffect_set);
_target setVariable [QGVAR(isConnected), true, true];
_endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks));