Don't spawn epoch dynamic debris if town generator is on

Vanilla town generator debris can end up spawning inside of epoch
dynamic debris if both are enabled.
This commit is contained in:
ebaydayz
2016-09-15 17:07:11 -04:00
parent 6e57bc6f6f
commit 0ab46abd52
2 changed files with 9 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ dayz_matchboxCount = false; // Enable match stick count. After five uses matches
dayz_toolBreaking = false; //Sledgehammer, crowbar and pickaxe have a chance to break when used.
dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix
dayz_tameDogs = false; // Allow taming dogs with raw meat
dayz_townGenerator = false; // Spawn vanilla map junk in addition to Epoch DynamicDebris. Currently only compatible with Chernarus. Need to add coordinates for other maps.
dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. Need to add coordinates for other maps.
dayz_townGeneratorBlackList = []; // Town generator will not spawn junk within 150m of these positions. Example for Chernarus trader cities: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]
DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with

View File

@@ -474,8 +474,14 @@ if (_hiveLoaded) then {
_vehLimit = 0;
};
diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
for "_x" from 1 to MaxDynamicDebris do {call spawn_roadblocks;};
if (dayz_townGenerator) then {
// Vanilla town generator spawns debris locally on each client
MaxDynamicDebris = 0;
} else {
// Epoch global dynamic debris
diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
for "_x" from 1 to MaxDynamicDebris do {call spawn_roadblocks;};
};
diag_log ("HIVE: Spawning # of Ammo Boxes: " + str(MaxAmmoBoxes));
for "_x" from 1 to MaxAmmoBoxes do {call spawn_ammosupply;};