mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Remove medic animation from lock and unlock safe
Closes #1942 in combination with 48858b2
The "packing" variable was made redundant by dayz_actionInProgress
because it was only set locally.
DisableUserInput is unnecessary now because server_handleSafeGear is
called unscheduled. Getting the cargo, creating the new safe and
deleting the old one should complete in the same frame with no window
for players to remove gear:
https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_handleSafeGear.sqf#L51-L67
The "claimed" check is also no longer needed because
server_handleSafeGear is called unscheduled and exits if the object is
null, so two players attempting to unlock at the same time will not
work.
This commit is contained in:
@@ -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;};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user