Dungeons: Fix duplication of y limit parameters (#7359)
authorParamat <paramat@users.noreply.github.com>
Sun, 20 May 2018 22:45:53 +0000 (23:45 +0100)
committerGitHub <noreply@github.com>
Sun, 20 May 2018 22:45:53 +0000 (23:45 +0100)
src/mapgen/dungeongen.cpp
src/mapgen/dungeongen.h
src/mapgen/mapgen.cpp
src/mapgen/mapgen_v6.cpp

index df51c4a1eb2f191b66a5cccbbd1f6752cc5bded9..32bea4caa4aadf5e35d60c284f158b788ea6889a 100644 (file)
@@ -71,8 +71,6 @@ DungeonGen::DungeonGen(const NodeDefManager *ndef,
                dp.room_size_large_max = v3s16(16, 16, 16);
                dp.rooms_min           = 2;
                dp.rooms_max           = 16;
-               dp.y_min               = -MAX_MAP_GENERATION_LIMIT;
-               dp.y_max               = MAX_MAP_GENERATION_LIMIT;
                dp.notifytype          = GENNOTIFY_DUNGEON;
 
                dp.np_density  = nparams_dungeon_density;
@@ -86,8 +84,6 @@ void DungeonGen::generate(MMVManip *vm, u32 bseed, v3s16 nmin, v3s16 nmax)
        assert(vm);
 
        //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);
        if (nval_density < 1.0f)
index 1e3d8375db53fc9911b3aeef779dbc42ecc76e89..ad32cf192e6f1b469376fffc1c5710bc3e86fb51 100644 (file)
@@ -56,8 +56,6 @@ struct DungeonParams {
        v3s16 room_size_large_max;
        u16 rooms_min;
        u16 rooms_max;
-       s16 y_min;
-       s16 y_max;
        GenNotifyType notifytype;
 
        NoiseParams np_density;
index eb562e76902a49359197c5d939a52b312e79d608..6ffe0ec1e1a7ebc40f6a5fffa31cfa67e9bec7dd 100644 (file)
@@ -883,8 +883,6 @@ void MapgenBasic::generateDungeons(s16 max_stone_y)
        dp.corridor_len_max = 13;
        dp.rooms_min        = 2;
        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_alt_wall      = nparams_dungeon_alt_wall;
index ae6c2ad9b41278409eab5e024de866089b72a78b..fdfebe575bd0b5a624a4a39dedbc1a7e82dd60fa 100644 (file)
@@ -564,14 +564,11 @@ void MapgenV6::makeChunk(BlockMakeData *data)
                DungeonParams dp;
 
                dp.seed             = seed;
-
                dp.only_in_ground   = true;
                dp.corridor_len_min = 1;
                dp.corridor_len_max = 13;
                dp.rooms_min        = 2;
                dp.rooms_max        = 16;
-               dp.y_min            = -MAX_MAP_GENERATION_LIMIT;
-               dp.y_max            = MAX_MAP_GENERATION_LIMIT;
 
                dp.np_density
                        = NoiseParams(0.9, 0.5, v3f(500.0, 500.0, 500.0), 0, 2, 0.8, 2.0);