plant amount fix and ravine amount setting
authorPerttu Ahola <celeron55@gmail.com>
Mon, 29 Nov 2010 12:17:46 +0000 (14:17 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 29 Nov 2010 12:17:46 +0000 (14:17 +0200)
minetest.conf.example
src/map.cpp

index 6aa16917ef284211ed2604ca5111a5b4f45dc29a..16d9ba4e1da588f3007067fac338675a255f741a 100644 (file)
@@ -3,24 +3,27 @@
 # ../../minetest.conf
 # Any other path can be chosen by passing the path as a parameter
 # to the program, eg. "minetest.exe ../minetest.conf.example"
+#
+# By default, all the settings are commented and not functional.
+# Uncomment settings by removing the preceding #.
 
-dedicated_server =
+#dedicated_server =
 
 # Client side stuff
 
-wanted_fps = 30
-fps_max = 60
-viewing_range_nodes_max = 300
-viewing_range_nodes_min = 20
-screenW = 
-screenH = 
-host_game = 
-port = 30000
-address = celer.oni.biz
-name = 
+#wanted_fps = 30
+#fps_max = 60
+#viewing_range_nodes_max = 300
+#viewing_range_nodes_min = 20
+#screenW = 
+#screenH = 
+#host_game = 
+#port = 30000
+#address = kray.dy.fi
+#name = 
 
-random_input = false
-client_delete_unused_sectors_timeout = 1200
+#random_input = false
+#client_delete_unused_sectors_timeout = 1200
 
 # Server side stuff
 
@@ -33,19 +36,20 @@ client_delete_unused_sectors_timeout = 1200
 # H=slope.dot(pos^power):
 #     power <height> <slope.X> <slope.Y> <power>
 
-mapgen_heightmap_blocksize = 64
-mapgen_height_randmax = constant 70.0
-mapgen_height_randfactor = constant 0.6
-mapgen_height_base = linear 0 80 0
-mapgen_plants_amount = 1.0
+#mapgen_heightmap_blocksize = 64
+#height_randmax = constant 70.0
+#height_randfactor = constant 0.6
+#height_base = linear 0 35 0
+#plants_amount = 1.0
+#ravines_amount = 1.0
 
 # Set to true to enable creative mode (unlimited inventory)
-creative_mode = false
+#creative_mode = false
 # Player and object positions are sent at intervals specified by this
-objectdata_inverval = 0.2
+#objectdata_inverval = 0.2
 
-active_object_range = 2
+#active_object_range = 2
 
-max_simultaneous_block_sends_per_client = 2
-max_simultaneous_block_sends_server_total = 4
+#max_simultaneous_block_sends_per_client = 2
+#max_simultaneous_block_sends_server_total = 4
 
index 2b11b7a4850ce3e02b2c13917fac3eb24a73b933..a51113c2d52e8351ad1f1369486579481b8a944f 100644 (file)
@@ -1475,7 +1475,7 @@ MapSector * ServerMap::emergeSector(v2s16 p2d)
        {
                // Avgslope is the derivative of a hill
                float t = avgslope * avgslope;
-               float a = MAP_BLOCKSIZE * 2 * m_params.plants_amount;
+               float a = MAP_BLOCKSIZE * m_params.plants_amount;
                u32 tree_max;
                if(t > 0.03)
                        tree_max = a / (t/0.03);
@@ -1520,8 +1520,9 @@ MapSector * ServerMap::emergeSector(v2s16 p2d)
        /*
                Add ravine (randomly)
        */
+       if(m_params.ravines_amount != 0)
        {
-               if(rand()%(s32)(10.0 * m_params.ravines_amount) == 0)
+               if(rand()%(s32)(10.0 / m_params.ravines_amount) == 0)
                {
                        s16 s = 6;
                        s16 x = rand()%(MAP_BLOCKSIZE-s*2-1)+s;