Hide body changes

Remove the PVCDZ_obj_HideBody eventhandler. Players next to a hided animal see the hiding process too and after 10s the body will be deleted anyways. So there is no need to send a publicVariableServer first then back to all near clients if the body gets deleted within 10s.
Also updates the normal hide body. The hided player model gets deleted by the server now.
This commit is contained in:
AirwavesMan
2020-11-19 15:10:10 +01:00
parent 72650aa7ca
commit 86d52c907d
5 changed files with 11 additions and 33 deletions

View File

@@ -55,8 +55,6 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
} else {
PVCDZ_obj_GutBody =[_item,_qty];
publicVariable "PVCDZ_obj_GutBody";
//if (!achievement_Gut) then {achievement_Gut = true;};
};
["knives",0.2] call fn_dynamicTool;

View File

@@ -1,21 +1,23 @@
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
private "_body";
player removeAction s_player_hide_body;
s_player_hide_body = -1;
closeDialog 0;
_body = _this select 3;
if (isNull _body) exitWith { dayz_actionInProgress = false;};
local _body = _this select 3;
if (isNull _body) exitWith {systemChat localize "str_cursorTargetNotFound"; dayz_actionInProgress = false;};
player action ["hideBody", _body];
dayz_actionInProgress = false;
if (_body isKindOf "zZombie_base" || {_body isKindOf "Animal"}) then {
uisleep 5;
uisleep 10;
if ((_body getVariable ["bodyName","unknown"]) != "unknown") then {
PVDZ_plr_Delete = _body;
publicVariableServer "PVDZ_plr_Delete";
} else {
deleteVehicle _body;
};
};