From 5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968 Mon Sep 17 00:00:00 2001 From: Paramat Date: Thu, 24 May 2018 22:20:06 +0100 Subject: 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. --- src/mapgen/mg_ore.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mapgen/mg_ore.h') 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(); -- cgit v1.2.3