@@ -99,8 +99,8 @@ MapgenValleys::MapgenValleys(int mapgenid, MapgenParams *params, EmergeManager *
99
99
this ->water_features_lim = rangelim (sp->water_features , 0 , 10 );
100
100
101
101
// a small chance of overflows if the settings are very high
102
- this ->cave_water_max_height = water_level + MYMAX (0 , water_features_lim - 6 ) * 50 ;
103
- this ->lava_max_height = water_level + MYMAX (0 , lava_features_lim - 6 ) * 50 ;
102
+ this ->cave_water_max_height = water_level + MYMAX (0 , water_features_lim - 4 ) * 50 ;
103
+ this ->lava_max_height = water_level + MYMAX (0 , lava_features_lim - 4 ) * 50 ;
104
104
105
105
tcave_cache = new float [csize.Y + 2 ];
106
106
@@ -482,7 +482,8 @@ float MapgenValleys::terrainLevelFromNoise(TerrainNoise *tn)
482
482
483
483
// base - depth : height of the bottom of the river
484
484
// water_level - 6 : don't make rivers below 6 nodes under the surface
485
- mount = rangelim (base - depth, (float ) (water_level - 6 ), mount);
485
+ // There is no logical equivalent to this using rangelim.
486
+ mount = MYMIN (MYMAX (base - depth, (float ) (water_level - 6 )), mount);
486
487
487
488
// Slope has no influence on rivers.
488
489
*tn->slope = 0 .f ;
@@ -846,8 +847,8 @@ void MapgenValleys::generateCaves(s16 max_stone_y)
846
847
847
848
// Reduce the odds of overflows even further.
848
849
if (node_max.Y > water_level) {
849
- lava_chance /= 5 ;
850
- water_chance /= 5 ;
850
+ lava_chance /= 3 ;
851
+ water_chance /= 3 ;
851
852
}
852
853
853
854
u32 index_2d = 0 ;
0 commit comments