From 6248addc3f7fa3bfc28340f3090c65ef0fe29597 Mon Sep 17 00:00:00 2001 From: oiad Date: Sat, 30 Dec 2017 22:03:31 +1300 Subject: [PATCH] Make Safe Zone Zombie and Loot spawning a toggle As requested by a few admins that didn't realise it was now hard coded to disable loot/zombie spawning This requires the check since we're also using DZE_SafeZonePosCheck for DZE_buildChecks with a forced radius. --- CHANGE LOG 1.0.6.2.txt | 2 +- CHANGE LOG 1.0.6.3.txt | 4 +++- SQF/dayz_code/configVariables.sqf | 7 +++++-- SQF/dayz_code/init/compiles.sqf | 8 +++++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 5d48eabb4..1eca7df6d 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -16,7 +16,7 @@ [NEW] Admins can now define a maximum build height, see configVariables.sqf/DZE_BuildHeightLimit. @BigEgg17 [NEW] Admins can now change the lootRefreshTimer for each building type from the default 15 minutes. CfgLoot.hpp must be updated if using custom loot tables. -[UPDATED] Loot and zed spawn is now disabled in trader cities by default. This is configurable in mission\init.sqf via DZE_SafeZonePosArray. Added function to check positions against DZE_SafeZonePosArray "_PosInSafeZone = _positionToCheck call DZE_SafeZonePosCheck;" +[UPDATED] Loot and zed spawn is now disabled in trader cities by default. This is configurable in mission\init.sqf via DZE_SafeZonePosArray. Added function to check positions against DZE_SafeZonePosArray "_PosInSafeZone = [_positionOrObjectToCheck] call DZE_SafeZonePosCheck;" An optional radius can be supplied as a second argument i.e: [_positionOrObjectToCheck,500] [UPDATED] Zombie pathing. Zeds should now run more direct to players and no longer get stuck at the position where a player entered a vehicle. [UPDATED] The RIS attachment can be removed from the SA58_RIS_DZ now. @LunaCB [UPDATED] The player now auto rejoins their group after dropping a radio and picking it back up when dayz_requireRadio=true. @SmokeyBR diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index a5c8d6cb9..04ddc81e8 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -1,2 +1,4 @@ [FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2) -[FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed #2009 @TheFirstNoob \ No newline at end of file +[FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed #2009 @TheFirstNoob + +[UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot @oiad @_Lance_ \ No newline at end of file diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 3e5edcc01..0ec650554 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -25,8 +25,6 @@ DZE_UI = "vanilla"; //"vanilla","epoch","dark" UI status icons style. Dark acco DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect. timezoneswitch = 0; // Changes murderMenu times with this offset in hours. DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage to objects by ramming. Doesn't work with amphibious pook which should not be used due to FPS issues. -DZE_SafeZoneNoBuildItems = []; // Array of object class names not allowed to be built near the zones in DZE_SafeZonePosArray (see mission\init.sqf). Can be nested arrays for custom distances. i.e ["VaultStorageLocked","LockboxStorageLocked",["Plastic_Pole_EP1_DZ",1300]] etc. -DZE_SafeZoneNoBuildDistance = 150; // Distance from zones in DZE_SafeZonePosArray (see mission\init.sqf) to disallow building near. DZE_NoBuildNear = []; //Array of object class names that are blacklisted to build near. i.e ["Land_Mil_ControlTower","Land_SS_hangar"] etc. DZE_NoBuildNearDistance = 150; // Distance from blacklisted objects to disallow building near. DZE_BuildHeightLimit = 0; // 0 = No building height limit | >0 = Height limit in meters | Changing this to 30 would limit the maximum built height to 30 meters. @@ -36,6 +34,11 @@ 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) +// SafeZone +DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray? +DZE_SafeZoneNoBuildItems = []; // Array of object class names not allowed to be built near the zones in DZE_SafeZonePosArray (see mission\init.sqf). Can be nested arrays for custom distances. i.e ["VaultStorageLocked","LockboxStorageLocked",["Plastic_Pole_EP1_DZ",1300]] etc. +DZE_SafeZoneNoBuildDistance = 150; // Distance from zones in DZE_SafeZonePosArray (see mission\init.sqf) to disallow building near. + // Death Messages DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel. DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the top left with weapon icons. diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 4ca208bbb..f064ad629 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -853,8 +853,10 @@ DZE_SafeZonePosCheck = { _position = _this select 0; _skipPos = false; - { - if ((_position distance (_x select 0)) < (if (count _this > 1) then {_this select 1} else {_x select 1})) exitWith {_skipPos = true;}; - } forEach DZE_SafeZonePosArray; + if (DZE_SafeZoneZombieLoot || count _this > 1) then { + { + if ((_position distance (_x select 0)) < (if (count _this > 1) then {_this select 1} else {_x select 1})) exitWith {_skipPos = true;}; + } forEach DZE_SafeZonePosArray; + }; _skipPos; };