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

@@ -194,7 +194,7 @@ dayz_resetSelfActions = {
s_player_setCode = -1;
s_player_BuildUnLock = -1;
s_player_BuildLock = -1;*/
// EPOCH ADDITIONS
s_player_packvault = -1;
s_player_lockvault = -1;
@@ -217,7 +217,7 @@ dayz_resetSelfActions = {
s_player_barkdog = -1;
s_player_warndog = -1;
s_player_followdog = -1;
s_player_information = -1;
s_player_information = -1;
s_player_fuelauto = -1;
s_player_fuelauto2 = -1;
s_player_fillgen = -1;
@@ -247,6 +247,7 @@ dayz_resetSelfActions = {
s_player_toggleVectors=[];
vectorActions = -1;
s_player_manageDoor = -1;
s_player_hide_body = -1;
};
call dayz_resetSelfActions;
@@ -311,13 +312,13 @@ gear_done = false;
//player warming up vars
//heatpack
r_player_warming_heatpack = [false, 0];
r_player_warming_heatpack_time = 600;
r_player_warming_heatpack_time = 600;
//displays temp progress
r_player_temp_factor = 0; //to be used for temp(up/down) indicators
r_player_temp_min_factor = -0.04; //(lvl3 down arrow)
r_player_temp_max_factor = 0.04; //(lvl3 up arrow)
//INT Nutrition Info
r_player_Nutrition = 0; // Calories
r_player_nutritionMuilpty = 2;
@@ -376,10 +377,10 @@ dayz_traps_active = [];
dayz_traps_trigger = [];
//Settings Not under dayz_settings
if(isNil "dayz_attackRange") then {
if(isNil "dayz_attackRange") then {
dayz_attackRange = 3;
};
if(isNil "dayz_DamageMultiplier") then {
if(isNil "dayz_DamageMultiplier") then {
dayz_DamageMultiplier = 1;
};
if(isNil "dayz_quickSwitch") then {
@@ -416,7 +417,7 @@ if (toLower worldName != "chernarus") then {
if(isNil "dayz_presets") then { dayz_presets = "Vanilla"; };
switch (dayz_presets) do {
case "Custom": { //Custom
case "Custom": { //Custom
if(isNil "dayz_enableGhosting") then { dayz_enableGhosting = false; };
if(isNil "dayz_ghostTimer") then { dayz_ghostTimer = 120; };
if(isNil "dayz_spawnselection") then { dayz_spawnselection = 0; };
@@ -436,7 +437,7 @@ switch (dayz_presets) do {
dayz_spawnselection = 0; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits
dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_bleedingeffect = 2; //1= blood on the ground, 2= partical effect, 3 = both.
dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked.
dayz_temperature_override = true; // Set to true to disable all temperature changes.
@@ -450,7 +451,7 @@ switch (dayz_presets) do {
dayz_spawnselection = 0; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits
dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_bleedingeffect = 3; //1= blood on the ground, 2= partical effect, 3 = both.
dayz_OpenTarget_TimerTicks = 60 * 25; //how long can a player be freely attacked for after attacking someone unprovoked.
dayz_temperature_override = false; // Set to true to disable all temperature changes.
@@ -464,7 +465,7 @@ switch (dayz_presets) do {
dayz_spawnselection = 1; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits
dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_bleedingeffect = 3; //1= blood on the ground, 2= partical effect, 3 = both.
dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked.
dayz_temperature_override = false; // Set to true to disable all temperature changes.
@@ -554,8 +555,8 @@ if (isServer) then {
dead_bodyCleanup = [];
needUpdate_objects = [];
needUpdate_FenceObjects = [];
//dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
//dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
//dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
//dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
//Objects to remove when killed.
DayZ_nonCollide = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3", "StashMedium4", "DomeTentStorage", "DomeTentStorage0", "DomeTentStorage1", "DomeTentStorage2", "DomeTentStorage3", "DomeTentStorage4", "CamoNet_DZ", "DesertTentStorage", "DesertTentStorage0", "DesertTentStorage1", "DesertTentStorage2", "DomeTentStorage3", "DesertTentStorage4"];
DayZ_WoodenFence = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7"];
@@ -589,7 +590,7 @@ if (!isDedicated) then {
dayz_plantTypes = ["","MAP_pumpkin","MAP_p_Helianthus","fiberplant"];
//Needed for trees spawned with createVehicle like POI (typeOf returns class instead of "")
dayz_treeTypes = ["","MAP_t_picea1s","MAP_t_picea2s","MAP_t_picea3f","MAP_t_pinusN2s","MAP_t_pinusS2f","MAP_t_populus3s","MAP_t_betula2s","MAP_t_fagus2s","MAP_t_fagus2W","MAP_t_malus1s"];
//temperature variables
dayz_temperatur = 36; //TeeChange
dayz_temperaturnormal = 36; //TeeChange
@@ -649,7 +650,7 @@ if (!isDedicated) then {
//Animals
dayz_currentGlobalAnimals = 0;
dayz_maxGlobalAnimals = 50;
//Plants
//Plants
dayz_currentGlobalPlants = 0;
dayz_maxGlobalPlants = 500;
//Loot