From bdedab15c94956cbc74045ab242fd300d25f39e7 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 9 Apr 2020 22:25:20 +0200 Subject: Falling blocks can now be spawned at any position. (#4620) * Falling blocks can now be spawned at any position. * Added a /cake command to Debuggers that throws a cake in a nice slow arc. * Fixed regular falling blocks. --- src/Simulator/SandSimulator.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/Simulator/SandSimulator.cpp') diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp index 42bb521ed..ee2c45520 100644 --- a/src/Simulator/SandSimulator.cpp +++ b/src/Simulator/SandSimulator.cpp @@ -62,12 +62,7 @@ void cSandSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, ); */ - auto FallingBlock = cpp14::make_unique(Pos, BlockType, a_Chunk->GetMeta(itr->x, itr->y, itr->z)); - auto FallingBlockPtr = FallingBlock.get(); - if (!FallingBlockPtr->Initialize(std::move(FallingBlock), m_World)) - { - continue; - } + m_World.SpawnFallingBlock(Pos, BlockType, a_Chunk->GetMeta(itr->x, itr->y, itr->z)); a_Chunk->SetBlock({itr->x, itr->y, itr->z}, E_BLOCK_AIR, 0); } } -- cgit v1.2.3