Make Hide Body customizable

Do not use hideBody as command without the action. It just hides the body but it still can be geared. If using hideBody in correlation with deleteVehicle it breaks the allDead command.

player action ["hideBody", body] deletes the body and the marker from the map but it stays inside allDead.

This fixes the issue that hided players were still shown on the map and still searched for their body.

Needs additional testing for a new release.
This commit is contained in:
A Man
2019-10-20 07:26:51 +02:00
parent cc85067f1f
commit c0e9fe62e1
6 changed files with 44 additions and 14 deletions

View File

@@ -712,6 +712,15 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_lockUnlock_crtl = -1;
};
if (DZE_Hide_Body && {_isMan} && {!_isAlive}) then {
if (s_player_hide_body < 0) then {
s_player_hide_body = player addAction [localize "str_action_hide_body", "\z\addons\dayz_code\actions\hide_body.sqf",_cursorTarget, 1, true, true];
};
} else {
player removeAction s_player_hide_body;
s_player_hide_body = -1;
};
// gear access on surrendered player
if (isPlayer _cursorTarget && {_isAlive} && {_cursorTarget getVariable ["DZE_Surrendered",false]}) then {
if (s_player_SurrenderedGear < 0) then {