diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt
index 89e582886..051cebdf0 100644
--- a/CHANGE LOG 1.0.6.2.txt
+++ b/CHANGE LOG 1.0.6.2.txt
@@ -10,6 +10,8 @@
[UPDATED] A new hidden version of the gear menu is now used for force saves so players do not see the dialog flash on screen.
[UPDATED] Anyone can now lock a modular door without knowing the combination or having any special access. #1944 @ndavalos
[UPDATED] Newest version of DayZero enterable buildings, which fixes #1601 - provided by Tansien and Zac https://zombies.nu/
+[UPDATED] Locking and unlocking safes no longer plays the medic animation. #1942 @SmokeyBR
+[UPDATED] Locking and unlocking safes now uses call instead of spawn on the server. This fixes the user input lock and safes appearing to disappear momentarily when server FPS is low.
[FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc
[FIXED] Trees at POIs can be chopped down now. Other trees spawned with createVehicle can be added to dayz_treeTypes in variables.sqf to allow chopping them down.
diff --git a/SQF/dayz_code/compile/player_lockVault.sqf b/SQF/dayz_code/compile/player_lockVault.sqf
index defa983c5..df92e614d 100644
--- a/SQF/dayz_code/compile/player_lockVault.sqf
+++ b/SQF/dayz_code/compile/player_lockVault.sqf
@@ -1,10 +1,11 @@
/*
DayZ Lock Safe
- Usage: [_obj] spawn player_unlockVault;
+ Usage: _obj spawn player_lockVault;
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
-private ["_obj","_ownerID","_alreadyPacking","_text","_playerNear","_ComboMatch","_objType"];
-if (dayz_actionInProgress) exitWith {localize "str_epoch_player_10" call dayz_rollingMessages;};
+private ["_obj","_ownerID","_text","_playerNear","_ComboMatch","_objType"];
+
+if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
player removeAction s_player_lockvault;
@@ -18,11 +19,8 @@ _text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName");
// Silently exit if object no longer exists
if (isNull _obj) exitWith { dayz_actionInProgress = false; };
-player playActionNow "Medic";
-uiSleep 1;
-[player,"tentpack",0,false] call dayz_zombieSpeak;
-uiSleep 5;
+// Server_handleSafeGear is called unscheduled and exits if the object is null, so two players locking at the same time will not work
_playerNear = _obj call dze_isnearest_player;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_11" call dayz_rollingMessages;};
@@ -32,12 +30,7 @@ if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];};
if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {dayz_actionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_115",_text] call dayz_rollingMessages; };
-_alreadyPacking = _obj getVariable["packing",0];
-if (_alreadyPacking == 1) exitWith {dayz_actionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_116",_text] call dayz_rollingMessages;};
-_obj setVariable["packing",1];
-
if (!isNull _obj) then {
- disableUserInput true; // Make sure player can not modify gear while it is being saved
(findDisplay 106) closeDisplay 0; // Close gear
dze_waiting = nil;
@@ -47,7 +40,6 @@ if (!isNull _obj) then {
publicVariableServer "PVDZE_handleSafeGear";
//wait for response from server to verify safe was logged and saved before proceeding
waitUntil {!isNil "dze_waiting"};
- disableUserInput false; // Safe is done saving now
format[localize "str_epoch_player_117",_text] call dayz_rollingMessages;
};
diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf
index 05bc0da38..f7d5cd698 100644
--- a/SQF/dayz_code/compile/player_packVault.sqf
+++ b/SQF/dayz_code/compile/player_packVault.sqf
@@ -3,7 +3,7 @@
*/
private ["_obj","_ownerID","_objectID","_objectUID","_location1","_location2","_packedClass","_text","_playerNear","_finished"];
-if (dayz_actionInProgress) exitWith {localize "str_epoch_player_15" call dayz_rollingMessages;};
+if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
_obj = _this;
@@ -13,7 +13,7 @@ _text = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "displayName");
// Silently exit if object no longer exists
if (isNull _obj || !(alive _obj)) exitWith { dayz_actionInProgress = false; };
-// Server_handleSafeGear runs unscheduled and exits if object is null, so more secure check is not needed
+// Server_handleSafeGear is called unscheduled and exits if the object is null, so two players packing at the same time will not work
_playerNear = _obj call dze_isnearest_player;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_16" call dayz_rollingMessages;};
diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf
index dab4b3c26..ee4da8b7a 100644
--- a/SQF/dayz_code/compile/player_unlockVault.sqf
+++ b/SQF/dayz_code/compile/player_unlockVault.sqf
@@ -1,11 +1,11 @@
/*
DayZ Lock Safe
- Usage: [_obj] spawn player_unlockVault;
+ Usage: _obj spawn player_unlockVault;
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
-private ["_obj","_ownerID","_alreadyPacking","_playerNear","_claimedBy","_text","_objType","_ComboMatch"];
+private ["_obj","_ownerID","_playerNear","_text","_objType","_ComboMatch"];
-if (dayz_actionInProgress) exitWith {localize "str_epoch_player_21" call dayz_rollingMessages;};
+if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
{player removeAction _x} count s_player_combi;
@@ -20,70 +20,38 @@ if !(_objType in DZE_LockedStorage) exitWith {
dayz_actionInProgress = false;
};
+// Server_handleSafeGear is called unscheduled and exits if the object is null, so two players unlocking at the same time will not work
_playerNear = _obj call dze_isnearest_player;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_20" call dayz_rollingMessages;};
-// Silently exit if object no longer exists || alive
+// Silently exit if object no longer exists
if (isNull _obj || !(alive _obj)) exitWith { dayz_actionInProgress = false; };
_unlockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "unlockedClass");
_text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName");
-_alreadyPacking = _obj getVariable["packing",0];
-_claimedBy = _obj getVariable["claimed","0"];
_ownerID = _obj getVariable["CharacterID","0"];
_ComboMatch = (_ownerID == dayz_combination);
if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];};
-if (_alreadyPacking == 1) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_124",_text] call dayz_rollingMessages;};
-
if (_ComboMatch || (_ownerID == dayz_playerUID)) then {
- // Check if any players are nearby if not allow player to claim item.
- _playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
+ (findDisplay 106) closeDisplay 0; // Close gear
+ dze_waiting = nil;
- // Only allow if not already claimed.
- if (_claimedBy == "0" || !_playerNear) then {
- // Since item was not claimed proceed with claiming it.
- _obj setVariable["claimed",dayz_playerUID,true];
- };
-
- _claimedBy = _obj getVariable["claimed","0"];
+ [_unlockedClass,objNull] call fn_waitForObject;
- if (_claimedBy == dayz_playerUID) then {
- if (!isNull _obj && alive _obj) then {
- _obj setVariable["packing",1];
-
- disableUserInput true; // Make sure player can not modify gear while it is filling
- (findDisplay 106) closeDisplay 0; // Close gear
- dze_waiting = nil;
-
- [_unlockedClass,objNull] call fn_waitForObject;
-
- PVDZE_handleSafeGear = [player,_obj,0];
- publicVariableServer "PVDZE_handleSafeGear";
- //wait for response from server to verify safe was logged before proceeding
- waitUntil {!isNil "dze_waiting"};
- disableUserInput false; // Safe is done filling now
-
- player playActionNow "Medic";
- uiSleep 1;
- [player,"tentpack",0,false] call dayz_zombieSpeak;
- uiSleep 5;
- format[localize "STR_BLD_UNLOCKED",_text] call dayz_rollingMessages;
- };
- } else {
- dayz_actionInProgress = false;
- format[localize "str_player_beinglooted",_text] call dayz_rollingMessages;
- };
+ PVDZE_handleSafeGear = [player,_obj,0];
+ publicVariableServer "PVDZE_handleSafeGear";
+ //wait for response from server to verify safe was logged before proceeding
+ waitUntil {!isNil "dze_waiting"};
+
+ format[localize "STR_BLD_UNLOCKED",_text] call dayz_rollingMessages;
} else {
PVDZE_handleSafeGear = [player,_obj,3,dayz_combination];
publicVariableServer "PVDZE_handleSafeGear";
- player playActionNow "Medic";
- uiSleep 1;
[player,"repair",0,false] call dayz_zombieSpeak;
[player,25,true,(getPosATL player)] spawn player_alertZombies;
- uiSleep 5;
format[localize "STR_BLD_WRONG_COMBO",_text] call dayz_rollingMessages;
};
s_player_unlockvault = -1;
diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf
index 4d4f4c012..dfde85b80 100644
--- a/SQF/dayz_code/init/publicEH.sqf
+++ b/SQF/dayz_code/init/publicEH.sqf
@@ -101,7 +101,7 @@ if (isServer) then {
"PVDZE_plr_TradeMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
};
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
- "PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
+ "PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) call server_handleSafeGear};
if (dayz_groupSystem) then {
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) spawn server_updateGroup};
};
diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml
index a1b70c5bd..007e41d67 100644
--- a/SQF/dayz_code/stringtable.xml
+++ b/SQF/dayz_code/stringtable.xml
@@ -11380,14 +11380,6 @@
Vous avez été écrasé entre deux objets.
Byl jste naražen mezi dva objekty.
-
- Lock is already in progress.
- Abschließen bereits im Gange.
- Уже закрывается.
- Wordt al op slot gezet.
- Le verrouillage est déjà en cours.
- Zamykání již probíhá.
-
You cannot lock while another player is nearby.
Abschließen nicht möglich, während ein anderer Spieler in der Nähe ist.
@@ -11404,14 +11396,6 @@
Impossible d'interrompre dans un marché!
Nelze se odpojit, když jste v trader area!
-
- That is already being packed.
- Das ist schon gepackt.
- Это уже упаковано.
- Dit wordt al reeds ingepakt.
- C'est déjà en cours d'empaquetage.
- Toto již bylo zabaleno.
-
You cannot pack while another player is nearby.
Packen nicht möglich, während ein anderer Spieler in der Nähe ist.
@@ -11885,14 +11869,6 @@
Vous ne pouvez pas verrouiller %1, vous n'en connaissez pas la combinaison.
Nemůžete zamknout %1, neznáte správnou kombinaci.
-
- %1 is already being locked.
- Diese(r) %1 wird bereits abgeschlossen.
- %1 уже закрыт.
- Deze %1 wordt al op slot gezet.
- %1 est déjà verrouillé.
- %1 již probíhá.
-
Your %1 has been locked
Dein %1 wurde abgeschlossen.
@@ -11941,14 +11917,6 @@
Votre %1 a été emballé(e).
Vaše %1 bylo/y zabalen/y/o.
-
- That %1 is already being unlocked.
- %1 wird bereits aufgeschlossen.
- %1 уже открыт.
- Deze %1 wordt alreeds van slot gehaald.
- %1 est déjà en cours de déverrouillage.
- %1 se již odemyká.
-
Filling up %1, move to cancel.
Betanken von %1, bewege dich um den Vorgang abzubrechen.