1
0

Added neighbor specification in the OnNeighborChanged() block callback.

Fixes the OnNeighborChanged endless recursion with large melon / pumpkin fields.
Fixes #2213.
This commit is contained in:
Mattes D
2015-07-01 10:40:16 +02:00
parent b0bd1e3907
commit 66a164a9a7
7 changed files with 63 additions and 44 deletions

View File

@@ -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;
}
}