diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index e8de0ac0b..6941d4f5a 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -31,7 +31,6 @@ [FIXED] NearestObjects position error in server_playerSync.sqf #1425 @ebaydayz [FIXED] Corrected ClassName type for CH53_DZE and BAF_Merlin_DZE. @Cinjun [FIXED] Some counts reverted to forEach. Count loops can not be nested inside other count loops #1491-#1495 @ebaydayz -[FIXED] Safes empty when opening after restart #1467 @ebaydayz [FIXED] Dynamic_vehicle spawning non-upgradable classes of hilux1 & datsun1. @Uro1 [FIXED] Eating while inside a vehicle did not drop empty can @deadeye2 [FIXED] Zombie loot error when using loot tables in mission file @deadeye2 @@ -49,6 +48,7 @@ [FIXED] Smoke countermeasures are now visible @Markokil321 @icomrade #1440 [FIXED] Keyboard input is now disabled properly while unconscious @skynetdev @ebaydayz #1613 [FIXED] Toilet paper dupe exploit when building outhouse @Markokil321 @ebaydayz #1599 +[FIXED] Safes and lockboxes wiped when opening after restart and locking not being logged to RPT @ebaydayz #1413 #1503 [UPDATED] .hpp files updated in dayz_epoch_b CfgLootPos > CfgBuildingPos. @Uro1 [UPDATED] .bat files updated in Config-Examples @Raziel23x diff --git a/SQF/dayz_code/compile/player_lockVault.sqf b/SQF/dayz_code/compile/player_lockVault.sqf index b5e3941f1..333eba082 100644 --- a/SQF/dayz_code/compile/player_lockVault.sqf +++ b/SQF/dayz_code/compile/player_lockVault.sqf @@ -42,9 +42,11 @@ _dir = direction _obj; _pos = _obj getVariable["OEMPos",(getposATL _obj)]; if(!isNull _obj) then { - + dze_waiting = nil; PVDZE_log_lockUnlock = [player, _obj,true]; - publicVariableServer "PVDZE_log_lockUnlock"; + publicVariableServer "PVDZE_log_lockUnlock"; + //wait for response from server to verify safe was logged and saved before proceeding + waitUntil {!isNil "dze_waiting"}; //place vault _holder = createVehicle [_lockedClass,_pos,[], 0, "CAN_COLLIDE"]; diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf index 680fb84df..1db203127 100644 --- a/SQF/dayz_code/compile/player_unlockVault.sqf +++ b/SQF/dayz_code/compile/player_unlockVault.sqf @@ -57,9 +57,12 @@ if ((_ownerID == dayz_combination) || (_ownerID == dayz_playerUID)) then { if (_claimedBy == _playerID) then { if(!isNull _obj && alive _obj) then { - + + dze_waiting = nil; PVDZE_log_lockUnlock = [player, _obj, false]; publicVariableServer "PVDZE_log_lockUnlock"; + //wait for response from server to verify safe was logged before proceeding + waitUntil {!isNil "dze_waiting"}; _obj setVariable["packing",1]; [1,1] call dayz_HungerThirst; diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 6ca990814..e3adac5be 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -902,19 +902,27 @@ server_spawnCleanAnimals = { }; server_logUnlockLockEvent = { - private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_PUID", "_status"]; + private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_PUID", "_status", "_clientID", "_type"]; _player = _this select 0; _obj = _this select 1; _status = _this select 2; - if (!isNull(_obj)) then { + _type = typeOf _obj; + if (isNull _player) then {diag_log "ERROR: server_logUnlockLockEvent called with Null player object";}; + _clientID = owner _player; + _PUID = [_player] call FNC_GetPlayerUID; + _statusText = if (_status) then {"LOCKED"} else {"UNLOCKED"}; + + if (!isNull _obj) then { _objectID = _obj getVariable["ObjectID", "0"]; _objectUID = _obj getVariable["ObjectUID", "0"]; - _statusText = "UNLOCKED"; - if (_status) then { - [_obj, "gear"] call server_updateObject; - _statusText = "LOCKED"; - }; - _PUID = [_player] call FNC_GetPlayerUID; - diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), _PUID, _statusText]; + + if (_status) then {[_obj, "gear"] call server_updateObject;}; + diag_log format["%6 %5: ID:%1 UID:%2 BY %3(%4)",_objectID,_objectUID,name _player,_PUID,_statusText,_type]; + dze_waiting = "success"; + _clientID publicVariableClient "dze_waiting"; + } else { + diag_log format["ERROR: %4 BY %1(%2) IS NULL AND COULD NOT BE %3 (THIS SHOULD NOT HAPPEN)",name _player,_PUID,_statusText,_type]; + dze_waiting = "fail"; + _clientID publicVariableClient "dze_waiting"; }; };