1
0

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.
This commit is contained in:
Mattes D
2020-04-09 22:25:20 +02:00
committed by GitHub
parent 23219c4738
commit bdedab15c9
8 changed files with 117 additions and 38 deletions

View File

@@ -62,12 +62,7 @@ void cSandSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
);
*/
auto FallingBlock = cpp14::make_unique<cFallingBlock>(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);
}
}