summaryrefslogtreecommitdiff
path: root/src/mapgen/mg_ore.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-05-24 22:20:06 +0100
committerGitHub <noreply@github.com>2018-05-24 22:20:06 +0100
commit5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968 (patch)
treeec509bb0da77bc5d3f769950e3ce40e4d6f37969 /src/mapgen/mg_ore.h
parentd6a6d3176e8ea9be4224c9f1f059654e3d36ea37 (diff)
downloadminetest-5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968.tar.gz
minetest-5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968.tar.bz2
minetest-5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968.zip
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.
Diffstat (limited to 'src/mapgen/mg_ore.h')
-rw-r--r--src/mapgen/mg_ore.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mapgen/mg_ore.h b/src/mapgen/mg_ore.h
index 30104ee50..d89360c3c 100644
--- a/src/mapgen/mg_ore.h
+++ b/src/mapgen/mg_ore.h
@@ -126,6 +126,7 @@ public:
float random_factor;
Noise *noise2 = nullptr;
+ int sizey_prev = 0;
OreVein() = default;
virtual ~OreVein();