summaryrefslogtreecommitdiff
path: root/src/mapgen_v6.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-08-19 09:12:54 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2017-08-19 09:12:54 +0200
commitb5f7249a7edc25077d84b27b38552228b92ff763 (patch)
tree26770c25680cc0aebb9d252f8b9d91f5e07ba78a /src/mapgen_v6.cpp
parente53d8a75360944a494a56269fc328871cb0a60cc (diff)
downloadminetest-b5f7249a7edc25077d84b27b38552228b92ff763.tar.gz
minetest-b5f7249a7edc25077d84b27b38552228b92ff763.tar.bz2
minetest-b5f7249a7edc25077d84b27b38552228b92ff763.zip
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
Diffstat (limited to 'src/mapgen_v6.cpp')
-rw-r--r--src/mapgen_v6.cpp21
1 files changed, 11 insertions, 10 deletions
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;
- }
}