From ed3cd2219c185f9f8e8834025fb42487ee7eb183 Mon Sep 17 00:00:00 2001 From: Skaronator Date: Sun, 15 Dec 2013 18:22:34 +0100 Subject: [PATCH] Thats now a correctly Fix for the exitWith thing --- SQF/dayz_code/actions/remove.sqf | 1 + SQF/dayz_code/compile/fn_selfActions.sqf | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index b70ac753f..ef42ea897 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -17,6 +17,7 @@ _activatingPlayer = player; _objOwnerID = _obj getVariable["CharacterID","0"]; _isOwnerOfObj = (_objOwnerID == dayz_characterID); +if (_obj in DZE_DoorsLocked) exitWith { DZE_ActionInProgress = false; cutText ["You must remove the lock to delete this item!", "PLAIN DOWN"]; }; if(_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_89"), "PLAIN DOWN"];}; _objectID = _obj getVariable ["ObjectID","0"]; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 8f63b9ebd..ee3f61113 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -238,14 +238,11 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu }; - if(_player_deleteBuild && !(_cursorTarget in DZE_DoorsLocked)) then { + if(_player_deleteBuild) then { if (s_player_deleteBuild < 0) then { s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",_cursorTarget, 1, true, true, "", ""]; }; } else { - if (_cursorTarget in DZE_DoorsLocked) then { - cutText ["You must remove the lock to delete this item!", "PLAIN DOWN"]; - }; player removeAction s_player_deleteBuild; s_player_deleteBuild = -1; };