From 3cb8b2e1a065fb3389cebd71c647d65e02e2027b Mon Sep 17 00:00:00 2001 From: BangL Date: Thu, 18 Dec 2014 03:46:18 +0100 Subject: [PATCH 1/3] fixed dupe glitch, described here: http://epochmod.com/forum/index.php?/topic/28493-alpha-release-single-currency-30-storage-default-hive-no-global-banking/page-15#entry182128 --- DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf b/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf index c400156..699c6ff 100644 --- a/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf +++ b/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf @@ -11,6 +11,11 @@ DZE_ActionInProgress = true; player removeAction s_player_lockvault; s_player_lockvault = 1; +if (s_bank_dialog >= 0) then { + player removeAction s_bank_dialog; + s_bank_dialog = -1; +}; + _obj = _this; _objType = typeOf _obj; From 8f104f50a2b3834552a4932a7c7f8e9f64aa2f53 Mon Sep 17 00:00:00 2001 From: BangL Date: Thu, 18 Dec 2014 04:02:47 +0100 Subject: [PATCH 2/3] also prevent dupe glitching by a second player. the first commit basically just fixed it the player which is actually packing the vault, but not for others which might be around. --- DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf b/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf index 699c6ff..7b429a4 100644 --- a/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf +++ b/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf @@ -43,6 +43,9 @@ _alreadyPacking = _obj getVariable["packing",0]; if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_116"),_text], "PLAIN DOWN"]}; _obj setVariable["packing",1]; +// Set the bank money of the old vault to zero early, to prevent dupe glitching by a second player +_obj setVariable ["bankMoney", 0, true]; + _dir = direction _obj; _pos = _obj getVariable["OEMPos",(getposATL _obj)]; From 00fdc1801166008d30031c3b38d58f1be1a8a2d2 Mon Sep 17 00:00:00 2001 From: BangL Date: Thu, 18 Dec 2014 04:32:13 +0100 Subject: [PATCH 3/3] this is actaully a better place for the action removal, cause the locking might still be cancelled before --- .../ZSC/compiles/player_lockVault.sqf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf b/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf index 7b429a4..11941cb 100644 --- a/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf +++ b/DayZ_Epoch_11.Chernarus/ZSC/compiles/player_lockVault.sqf @@ -11,11 +11,6 @@ DZE_ActionInProgress = true; player removeAction s_player_lockvault; s_player_lockvault = 1; -if (s_bank_dialog >= 0) then { - player removeAction s_bank_dialog; - s_bank_dialog = -1; -}; - _obj = _this; _objType = typeOf _obj; @@ -45,6 +40,10 @@ _obj setVariable["packing",1]; // Set the bank money of the old vault to zero early, to prevent dupe glitching by a second player _obj setVariable ["bankMoney", 0, true]; +if (s_bank_dialog >= 0) then { + player removeAction s_bank_dialog; + s_bank_dialog = -1; +}; _dir = direction _obj; _pos = _obj getVariable["OEMPos",(getposATL _obj)];