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

@@ -1,6 +1,7 @@
[NEW] Time between unlocking safes/lockboxes after a failed code will be exponentially higher, see configVariables.sqf\DZE_lockablesHarderPenalty @oiad
[NEW] Added 93 new zombie models with loot groups and strings for Server Admins @Airwavesman
[NEW] Zombie Loot supports backpacks now @Airwavesman
[NEW] Hide Body can be edited and toggled now. Enabled by default, configVariables.sqf/DZE_Hide_Body @AirwavesMan
[FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2, 048caa5)
[FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed (e89eebc) #2009 @TheFirstNoob
@@ -15,6 +16,7 @@
[FIXED] DistanceFoot database stat was incorrect. @dihan48
[FIXED] Wrong cargo count of Refuel Trucks after last Corepatch. @AirwavesMan
[FIXED] Vehicles jumping into the air after flipping. @AirwavesMan
[FIXED] Crafting wooden arrows from wood piles and razors was not possible. @AirwavesMan
[UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_
[UPDATED] Added notification when status icons are disabled

View File

@@ -27,6 +27,7 @@ class CfgActions {
class PutMagazine : None { show = 0; };
class DeactivateMine : None { show = 0; };
class RepairVehicle: None { show = 0; };
class HideBody: None { show = 0; }; //Moved to fn_selfactions to allow editing
/*
"None"
"GetInCommander"

View File

@@ -0,0 +1,16 @@
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;};
player action ["hideBody", _body];
dayz_actionInProgress = false;

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 {

View File

@@ -34,6 +34,7 @@ DZE_DisabledChannels = [(localize "str_channel_side"),(localize "str_channel_glo
DZE_NutritionDivisor = [1, 1, 1, 1]; //array of DIVISORS that regulate the rate of [calories, thirst, hunger, temperature] use when "working" (keep in mind that temperature raises with actions) - min values 0.1 - Larger values slow the effect, smaller values accelerate it
DZE_ZombieSpeed = [0,0]; //Default agro speed is 6 per zombie config, set array elements 0 and 1 the same for non-variable speed, set to 0 to disable. array format = [min, max]; Ex: [2, 6]; results in a range of speed between 2 and 6 (2 is the old DZE_slowZombies hard-coded speed)
DZE_lockablesHarderPenalty = true; // Enforce an exponential wait on attempts between unlocking a safe/lockbox from a failed code.
DZE_Hide_Body = true; //Enable hide dead bodies. Hiding a dead body removes the corps marker from the map too. Default = true
// SafeZone
DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray?

View File

@@ -247,6 +247,7 @@ dayz_resetSelfActions = {
s_player_toggleVectors=[];
vectorActions = -1;
s_player_manageDoor = -1;
s_player_hide_body = -1;
};
call dayz_resetSelfActions;