From 66a164a9a75a2d48763520aab3aeb8eeda85c92d Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 1 Jul 2015 10:40:16 +0200 Subject: Added neighbor specification in the OnNeighborChanged() block callback. Fixes the OnNeighborChanged endless recursion with large melon / pumpkin fields. Fixes #2213. --- src/Chunk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index d9410dc8d..9dc453079 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -1037,7 +1037,7 @@ void cChunk::GrowMelonPumpkin(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_Bl VERIFY(UnboundedRelFastSetBlock(a_RelX + x, a_RelY, a_RelZ + z, ProduceType, Meta)); auto Absolute = RelativeToAbsolute(Vector3i{a_RelX + x, a_RelY, a_RelZ + z}, m_PosX, m_PosZ); cChunkInterface ChunkInterface(this->GetWorld()->GetChunkMap()); - cBlockHandler::NeighborChanged(ChunkInterface, Absolute.x, Absolute.y, Absolute.z); + cBlockHandler::NeighborChanged(ChunkInterface, Absolute.x, Absolute.y - 1, Absolute.z, BLOCK_FACE_YP); break; } } -- cgit v1.2.3