Remove manual biome noise translation
authorkwolekr <kwolekr@minetest.net>
Wed, 17 Dec 2014 21:26:01 +0000 (16:26 -0500)
committerkwolekr <kwolekr@minetest.net>
Wed, 17 Dec 2014 21:28:28 +0000 (16:28 -0500)
src/mg_biome.cpp

index 96fe443abf9a540bca41b7b7fdd3cbc2e132fd5d..afe84e6d86fa7ffe311f0f217e79c12eef4677a9 100644 (file)
@@ -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;
 }