Open Avirex-Mai opened 4 years ago
CONFIRMED!
Also: Already found the issue: When comparing fn_jerryRefuel and fn_jerryCanRefuel it's easy to spot the mistake:
fn_jerryRefuel
if (!alive player) exitWith {};
if (life_interrupted) exitWith {};
fn_jerryCanRefuel
if (!alive player) exitWith {life_action_inUse = false;};
if (life_interrupted) exitWith {life_interrupted = false; life_action_inUse = false;};
By setting life_action_inUse and life_interrupted to false directly within the exitWith the check after the loop fails:
if (!alive player || life_istazed || life_isknocked) exitWith {life_action_inUse = false;};
if (player getVariable ["restrained",false]) exitWith {life_action_inUse = false;};
if (!isNil "_badDistance") exitWith {titleText[localize "STR_ISTR_Lock_TooFar","PLAIN"]; life_action_inUse = false;};
if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
The if-condition is not met and hence it goes straight to call fn_handleInv and hence giving you full fuel canister even if action is cancled.
Solution: Simple copy'n'paste of the fn_jerrRefuel: Remove life_action_inUse and life_interrupted set to false within the exitWith to correctly trigger the if() condition.
fixed with merge of #686 - can be closed (I guess?)
fixed with merge of #686 - can be closed (I guess?)
Will need to duplicate this commit onto v5.X.X, then can close :)
Will need to duplicate this commit onto v5.X.X, then can close :)
File: fn_jerryCanRefuel If you cancel the action while filling the canister, you will still get a full canister back.