Dungeons: Fix duplication of y limit parameters (#7359)

This commit is contained in:
Paramat 2018-05-20 23:45:53 +01:00 committed by GitHub
parent 22df02d25b
commit 53d5b3ea40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 11 deletions

@ -71,8 +71,6 @@ DungeonGen::DungeonGen(const NodeDefManager *ndef,
dp.room_size_large_max = v3s16(16, 16, 16); dp.room_size_large_max = v3s16(16, 16, 16);
dp.rooms_min = 2; dp.rooms_min = 2;
dp.rooms_max = 16; dp.rooms_max = 16;
dp.y_min = -MAX_MAP_GENERATION_LIMIT;
dp.y_max = MAX_MAP_GENERATION_LIMIT;
dp.notifytype = GENNOTIFY_DUNGEON; dp.notifytype = GENNOTIFY_DUNGEON;
dp.np_density = nparams_dungeon_density; dp.np_density = nparams_dungeon_density;
@ -86,8 +84,6 @@ void DungeonGen::generate(MMVManip *vm, u32 bseed, v3s16 nmin, v3s16 nmax)
assert(vm); assert(vm);
//TimeTaker t("gen dungeons"); //TimeTaker t("gen dungeons");
if (nmin.Y < dp.y_min || nmax.Y > dp.y_max)
return;
float nval_density = NoisePerlin3D(&dp.np_density, nmin.X, nmin.Y, nmin.Z, dp.seed); float nval_density = NoisePerlin3D(&dp.np_density, nmin.X, nmin.Y, nmin.Z, dp.seed);
if (nval_density < 1.0f) if (nval_density < 1.0f)

@ -56,8 +56,6 @@ struct DungeonParams {
v3s16 room_size_large_max; v3s16 room_size_large_max;
u16 rooms_min; u16 rooms_min;
u16 rooms_max; u16 rooms_max;
s16 y_min;
s16 y_max;
GenNotifyType notifytype; GenNotifyType notifytype;
NoiseParams np_density; NoiseParams np_density;

@ -883,8 +883,6 @@ void MapgenBasic::generateDungeons(s16 max_stone_y)
dp.corridor_len_max = 13; dp.corridor_len_max = 13;
dp.rooms_min = 2; dp.rooms_min = 2;
dp.rooms_max = 16; dp.rooms_max = 16;
dp.y_min = -MAX_MAP_GENERATION_LIMIT;
dp.y_max = MAX_MAP_GENERATION_LIMIT;
dp.np_density = nparams_dungeon_density; dp.np_density = nparams_dungeon_density;
dp.np_alt_wall = nparams_dungeon_alt_wall; dp.np_alt_wall = nparams_dungeon_alt_wall;

@ -564,14 +564,11 @@ void MapgenV6::makeChunk(BlockMakeData *data)
DungeonParams dp; DungeonParams dp;
dp.seed = seed; dp.seed = seed;
dp.only_in_ground = true; dp.only_in_ground = true;
dp.corridor_len_min = 1; dp.corridor_len_min = 1;
dp.corridor_len_max = 13; dp.corridor_len_max = 13;
dp.rooms_min = 2; dp.rooms_min = 2;
dp.rooms_max = 16; dp.rooms_max = 16;
dp.y_min = -MAX_MAP_GENERATION_LIMIT;
dp.y_max = MAX_MAP_GENERATION_LIMIT;
dp.np_density dp.np_density
= NoiseParams(0.9, 0.5, v3f(500.0, 500.0, 500.0), 0, 2, 0.8, 2.0); = NoiseParams(0.9, 0.5, v3f(500.0, 500.0, 500.0), 0, 2, 0.8, 2.0);