forked from Mirrorlandia_minetest/minetest
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.
This commit is contained in:
parent
ddd03c38a4
commit
df991edaa8
@ -591,6 +591,11 @@ void MapgenV7::generateRidgeTerrain()
|
|||||||
float uwatern = noise_ridge_uwater->result[index2d] * 2.0f;
|
float uwatern = noise_ridge_uwater->result[index2d] * 2.0f;
|
||||||
if (std::fabs(uwatern) > width)
|
if (std::fabs(uwatern) > width)
|
||||||
continue;
|
continue;
|
||||||
|
// Optimises, but also avoids removing nodes placed by mods in
|
||||||
|
// 'on-generated', when generating outside mapchunk.
|
||||||
|
content_t c = vm->m_data[vi].getContent();
|
||||||
|
if (c != c_stone)
|
||||||
|
continue;
|
||||||
|
|
||||||
float altitude = y - water_level;
|
float altitude = y - water_level;
|
||||||
float height_mod = (altitude + 17.0f) / 2.5f;
|
float height_mod = (altitude + 17.0f) / 2.5f;
|
||||||
|
Loading…
Reference in New Issue
Block a user