mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add waitUntil in lockVault and unlockVault
Wait for response from server to verify safe was saved and logged before proceeding with deleting safe object. Tested and confirmed this solves #1413. Most likely helps with #1503 too.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user