aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-17 16:26:01 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-17 16:28:28 -0500
commit67063ed59f91d2feae5011ca0c3767dc182bf38d (patch)
tree27081d43f9ed6c31c66067d28dc72b79d4209d75
parent082256a9f8ef5e490a10c8040e8e85813a2a410b (diff)
downloadminetest-67063ed59f91d2feae5011ca0c3767dc182bf38d.tar.gz
minetest-67063ed59f91d2feae5011ca0c3767dc182bf38d.tar.bz2
minetest-67063ed59f91d2feae5011ca0c3767dc182bf38d.zip
Remove manual biome noise translation
-rw-r--r--src/mg_biome.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mg_biome.cpp b/src/mg_biome.cpp
index 96fe443ab..afe84e6d8 100644
--- a/src/mg_biome.cpp
+++ b/src/mg_biome.cpp
@@ -72,14 +72,8 @@ BiomeManager::~BiomeManager()
void BiomeManager::calcBiomes(s16 sx, s16 sy, float *heat_map,
float *humidity_map, s16 *height_map, u8 *biomeid_map)
{
- int i = 0;
- for (int y = 0; y != sy; y++) {
- for (int x = 0; x != sx; x++, i++) {
- float heat = (heat_map[i] + 1) * 50;
- float humidity = (humidity_map[i] + 1) * 50;
- biomeid_map[i] = getBiome(heat, humidity, height_map[i])->id;
- }
- }
+ for (size_t i = 0; i != sx * sy; i++)
+ biomeid_map[i] = getBiome(heat_map[i], humidity_map[i], height_map[i])->id;
}