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:
ebayShopper
2017-06-06 18:53:44 -04:00
parent 48858b2e6c
commit 72df07bdf2
6 changed files with 24 additions and 94 deletions

View File

@@ -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;};