diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-11-29 14:17:46 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-11-29 14:17:46 +0200 |
commit | d2090a32d84106815b3422bbbab5e6c9c681c152 (patch) | |
tree | 3eb6cbbf20baca14a02ebd01bbfa88f6d581b2a0 /src | |
parent | a18525a14eca664dc93be01e55b0efd1ce08b0fa (diff) | |
download | minetest-d2090a32d84106815b3422bbbab5e6c9c681c152.tar.gz minetest-d2090a32d84106815b3422bbbab5e6c9c681c152.tar.bz2 minetest-d2090a32d84106815b3422bbbab5e6c9c681c152.zip |
plant amount fix and ravine amount setting
Diffstat (limited to 'src')
-rw-r--r-- | src/map.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp index 2b11b7a48..a51113c2d 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -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; |