From d2090a32d84106815b3422bbbab5e6c9c681c152 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 29 Nov 2010 14:17:46 +0200 Subject: plant amount fix and ravine amount setting --- src/map.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3