From fd5191854df621402cfe1203daceb68851c88af7 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 28 Jul 2020 23:39:55 +0100 Subject: Delegate simulator wakeup to cChunk --- src/Chunk.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index fb37ce3b3..9544899f7 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -1314,6 +1314,10 @@ void cChunk::SetBlock(Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_Blo m_ToTickBlocks.push_back(a_RelPos); QueueTickBlockNeighbors(a_RelPos); + // TODO: use relative coordinates, cChunk reference + // Wake up the simulators for this block: + GetWorld()->GetSimulatorManager()->WakeUp(RelativeToAbsolute(a_RelPos), this); + // If there was a block entity, remove it: cBlockEntity * BlockEntity = GetBlockEntityRel(a_RelPos); if (BlockEntity != nullptr) -- cgit v1.2.3