+ Fix for duplicate unlock/crack vault bug.
This commit is contained in:
vbawol
2013-02-08 19:15:47 -06:00
parent 5c0f7d84f6
commit 3166e2e5f5
3 changed files with 5 additions and 1 deletions

View File

@@ -213,7 +213,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
};
//Allow owner to unlock vault
if(cursorTarget isKindOf "VaultStorageLocked" and _canDo and _ownerID != "0") then {
if(cursorTarget isKindOf "VaultStorageLocked" and _canDo and _ownerID != "0" and !UnlockInprogress) then {
if (_ownerID == dayz_playerUID) then {
if (s_player_unlockvault < 0 and (player distance cursorTarget < 3)) then {
s_player_unlockvault = player addAction ["Unlock Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];

View File

@@ -11,6 +11,8 @@ player playActionNow "Medic";
player removeAction s_player_unlockvault;
s_player_unlockvault = 1;
UnlockInprogress = true;
_item = "ItemToolbox";
_hasToolbox = _item in items player;
@@ -140,3 +142,4 @@ if(_allowunlock) then {
};
s_player_unlockvault = -1;
UnlockInprogress = false;

View File

@@ -351,6 +351,7 @@ if(!isDedicated) then {
dayz_Magazines = [];
dayzGearSave = false;
dayz_unsaved = false;
UnlockInprogress = false;
dayz_scaleLight = 0;
dayzDebug = false;
dayzState = -1;