Skip to content

Commit df991ed

Browse files
authoredMay 31, 2018
Mgv7: Avoid rivergen removing mod-placed nodes when overgenerating (#7388)
Only allow river generation to replace c_stone. This also acts as an optimisation by being placed before canyon shape calculation.
1 parent ddd03c3 commit df991ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/mapgen/mapgen_v7.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@ void MapgenV7::generateRidgeTerrain()
591591
float uwatern = noise_ridge_uwater->result[index2d] * 2.0f;
592592
if (std::fabs(uwatern) > width)
593593
continue;
594+
// Optimises, but also avoids removing nodes placed by mods in
595+
// 'on-generated', when generating outside mapchunk.
596+
content_t c = vm->m_data[vi].getContent();
597+
if (c != c_stone)
598+
continue;
594599

595600
float altitude = y - water_level;
596601
float height_mod = (altitude + 17.0f) / 2.5f;

0 commit comments

Comments
 (0)
Please sign in to comment.