summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 2140bf7f1..21261e828 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -820,7 +820,7 @@ void cChunk::CheckBlocks()
while (Count != 0)
{
- Vector3i Pos = m_ToTickBlocks.front();
+ const auto Pos = m_ToTickBlocks.front();
m_ToTickBlocks.pop();
Count--;
@@ -1263,8 +1263,8 @@ void cChunk::SetBlock(Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_Blo
{
FastSetBlock(a_RelPos, a_BlockType, a_BlockMeta);
- // Tick this block and its neighbors:
- QueueTickBlockNeighbors(a_RelPos);
+ // Tick this block's neighbors via cBlockHandler::Check:
+ m_ToTickBlocks.push(a_RelPos);
// Wake up the simulators for this block:
GetWorld()->GetSimulatorManager()->WakeUp(*this, a_RelPos);
@@ -1311,33 +1311,6 @@ void cChunk::SetBlock(Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_Blo
-void cChunk::QueueTickBlockNeighbors(Vector3i a_Position)
-{
- m_ToTickBlocks.push(a_Position);
-
- for (const auto & Offset : cSimulator::AdjacentOffsets)
- {
- auto Relative = a_Position + Offset;
-
- if (!cChunkDef::IsValidHeight(Relative.y))
- {
- continue;
- }
-
- auto Chunk = GetRelNeighborChunkAdjustCoords(Relative);
- if ((Chunk == nullptr) || !Chunk->IsValid())
- {
- continue;
- }
-
- Chunk->m_ToTickBlocks.push(Relative);
- }
-}
-
-
-
-
-
void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, bool a_SendToClients)
{
ASSERT(!((a_RelX < 0) || (a_RelX >= Width) || (a_RelY < 0) || (a_RelY >= Height) || (a_RelZ < 0) || (a_RelZ >= Width)));