mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -307,11 +307,7 @@ if (!isNull _cursorTarget && {!_inVehicle && !_isPZombie && _canDo && player dis
|
||||
player removeAction s_player_fillfuel5;
|
||||
s_player_fillfuel5 = -1;
|
||||
};
|
||||
/*
|
||||
Vanilla generator is currently not functional.
|
||||
Vanilla generator refuel actions removed for now.
|
||||
Epoch generator fill action is below.
|
||||
*/
|
||||
|
||||
//Allow player to siphon vehicles
|
||||
if (_hasEmptyFuelCan && !_isBicycle && {fuel _cursorTarget > 0}) then {
|
||||
if (s_player_siphonfuel < 0) then {
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -61,11 +61,6 @@ call {
|
||||
_owner publicVariableClient "PVCDZ_obj_GutBody";
|
||||
};
|
||||
|
||||
if (_variable == "HideBody") exitWith {
|
||||
PVCDZ_obj_HideBody = _arraytosend select 0;
|
||||
_owner publicVariableClient "PVCDZ_obj_HideBody";
|
||||
};
|
||||
|
||||
if (_variable == "Humanity") exitWith {
|
||||
PVCDZ_plr_Humanity = _arraytosend select 0;
|
||||
_owner publicVariableClient "PVCDZ_plr_Humanity";
|
||||
|
||||
Reference in New Issue
Block a user