From b5f7249a7edc25077d84b27b38552228b92ff763 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 19 Aug 2017 09:12:54 +0200 Subject: Code modernization: src/m* (part 2) * empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function --- src/mapgen_v6.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/mapgen_v6.cpp') diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp index ec33fee08..e67e78f6c 100644 --- a/src/mapgen_v6.cpp +++ b/src/mapgen_v6.cpp @@ -455,19 +455,20 @@ BiomeV6Type MapgenV6::getBiome(int index, v2s16 p) } return BT_NORMAL; - } else { - if (d > freq_desert) - return BT_DESERT; + } - if ((spflags & MGV6_BIOMEBLEND) && (d > freq_desert - 0.10) && - ((noise2d(p.X, p.Y, seed) + 1.0) > (freq_desert - d) * 20.0)) - return BT_DESERT; + if (d > freq_desert) + return BT_DESERT; - if ((spflags & MGV6_JUNGLES) && h > 0.75) - return BT_JUNGLE; + if ((spflags & MGV6_BIOMEBLEND) && (d > freq_desert - 0.10) && + ((noise2d(p.X, p.Y, seed) + 1.0) > (freq_desert - d) * 20.0)) + return BT_DESERT; + + if ((spflags & MGV6_JUNGLES) && h > 0.75) + return BT_JUNGLE; + + return BT_NORMAL; - return BT_NORMAL; - } } -- cgit v1.2.3