mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
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:
@@ -31,20 +31,7 @@ if (local _animalbody) then {
|
||||
};
|
||||
hideBody _body;
|
||||
|
||||
//No need to let everyone on the server know.
|
||||
//PVCDZ_obj_HideBody = _body;
|
||||
//publicVariable "PVCDZ_obj_HideBody"; // remote player
|
||||
|
||||
//Send to server let everyone in 100 meters of the body know its just been hidden.
|
||||
_inRange = _pos nearEntities ["CAManBase",100];
|
||||
{
|
||||
if ((isPlayer _x) && {_x != player}) then {
|
||||
PVDZ_send = [_x,"HideBody",[_body]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
};
|
||||
} count _inRange;
|
||||
|
||||
uiSleep 5;
|
||||
uiSleep 10;
|
||||
deleteVehicle _body;
|
||||
true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user