1
0
Fork 0
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:
Paramat 2018-05-24 22:20:06 +01:00 committed by GitHub
parent d6a6d3176e
commit 5c1edc58ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 9 deletions

View file

@ -126,6 +126,7 @@ public:
float random_factor;
Noise *noise2 = nullptr;
int sizey_prev = 0;
OreVein() = default;
virtual ~OreVein();