summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-12-18 21:41:37 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2016-12-18 21:41:37 +0100
commitb5b119ca750a1790848b514bb00831b050f25fac (patch)
treee7a145a856676d248da5050b57da1cee4d005815 /src/Simulator
parenttest (diff)
downloadcuberite-b5b119ca750a1790848b514bb00831b050f25fac.tar
cuberite-b5b119ca750a1790848b514bb00831b050f25fac.tar.gz
cuberite-b5b119ca750a1790848b514bb00831b050f25fac.tar.bz2
cuberite-b5b119ca750a1790848b514bb00831b050f25fac.tar.lz
cuberite-b5b119ca750a1790848b514bb00831b050f25fac.tar.xz
cuberite-b5b119ca750a1790848b514bb00831b050f25fac.tar.zst
cuberite-b5b119ca750a1790848b514bb00831b050f25fac.zip
Diffstat (limited to 'src/Simulator')
-rw-r--r--src/Simulator/SandSimulator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp
index d3773ee41..e1d1f9c2b 100644
--- a/src/Simulator/SandSimulator.cpp
+++ b/src/Simulator/SandSimulator.cpp
@@ -61,8 +61,8 @@ void cSandSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
Pos.x, Pos.y, Pos.z, ItemTypeToString(BlockType).c_str(), ItemTypeToString(BlockBelow).c_str()
);
*/
- cFallingBlock * FallingBlock = new cFallingBlock(Pos, BlockType, a_Chunk->GetMeta(itr->x, itr->y, itr->z));
- FallingBlock->Initialize(m_World);
+ auto FallingBlock = cpp14::make_unique<cFallingBlock>(Pos, BlockType, a_Chunk->GetMeta(itr->x, itr->y, itr->z));
+ FallingBlock->Initialize(std::move(FallingBlock), m_World);
a_Chunk->SetBlock(itr->x, itr->y, itr->z, E_BLOCK_AIR, 0);
}
}