mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Vein ore: Fix bug caused by changing perlinmap Y size (#7371)
Because vein ore uses 3D noise (all the other ores use 2D noise) the perlinmap Y size can be different in different mapchunks when close to the ore Y limits. Previously this caused bugs in the vein structure because changes in perlinmap Y size did not recreate the noise objects. Delete and recreate the noise objects with the new Y size if Y size has changed.
This commit is contained in:
parent
d6a6d3176e
commit
5c1edc58ab
2 changed files with 16 additions and 9 deletions
|
@ -126,6 +126,7 @@ public:
|
|||
|
||||
float random_factor;
|
||||
Noise *noise2 = nullptr;
|
||||
int sizey_prev = 0;
|
||||
|
||||
OreVein() = default;
|
||||
virtual ~OreVein();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue