Hopefully fixed msvc "'sqrt' : ambiguous call to overloaded function"
authorPerttu Ahola <celeron55@gmail.com>
Mon, 15 Aug 2011 12:11:00 +0000 (15:11 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 15 Aug 2011 12:11:00 +0000 (15:11 +0300)
src/mapgen.cpp

index aac2fc2282005c001a11b1d19b0b28e0d7055420..0018b9919355a065cef2ca5270a96bbc3d075eee 100644 (file)
@@ -1818,7 +1818,7 @@ void make_block(BlockMakeData *data)
                                                        vmanip.m_data[i] = MapNode(CONTENT_GRAVEL);
                                        }
                                        else if(noisebuf_ground_crumbleness.get(x,y,z) <
-                                                       -3.0 + MYMIN(0.1 * sqrt(MYMAX(0, -y)), 1.5))
+                                                       -3.0 + MYMIN(0.1 * sqrt((float)MYMAX(0, -y)), 1.5))
                                        {
                                                vmanip.m_data[i] = MapNode(CONTENT_LAVASOURCE);
                                                for(s16 x1=-1; x1<=1; x1++)