diff options
author | tycho <work.tycho@gmail.com> | 2015-05-24 13:56:56 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-24 13:56:56 +0200 |
commit | dae9e5792a4f030ae9e748548a16a89790fbd311 (patch) | |
tree | 2142b8c4deb9f2c7ad096b8b0ec93fefccd8d8f1 /src/Simulator/SandSimulator.cpp | |
parent | Merge branch 'master' into PreventNewWarnings (diff) | |
download | cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.gz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.bz2 cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.lz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.xz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.zst cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.zip |
Diffstat (limited to 'src/Simulator/SandSimulator.cpp')
-rw-r--r-- | src/Simulator/SandSimulator.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp index 497f81999..e11bc714a 100644 --- a/src/Simulator/SandSimulator.cpp +++ b/src/Simulator/SandSimulator.cpp @@ -65,7 +65,7 @@ void cSandSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, a_Chunk->SetBlock(itr->x, itr->y, itr->z, E_BLOCK_AIR, 0); } } - m_TotalBlocks -= (int)ChunkData.size(); + m_TotalBlocks -= static_cast<int>(ChunkData.size()); ChunkData.clear(); } @@ -265,8 +265,12 @@ void cSandSimulator::FinishFalling( // Create a pickup instead: cItems Pickups; - Pickups.Add((ENUM_ITEM_ID)a_FallingBlockType, 1, a_FallingBlockMeta); - a_World->SpawnItemPickups(Pickups, (double)a_BlockX + 0.5, (double)a_BlockY + 0.5, (double)a_BlockZ + 0.5); + Pickups.Add(static_cast<ENUM_ITEM_ID>(a_FallingBlockType), 1, a_FallingBlockMeta); + a_World->SpawnItemPickups( + Pickups, + static_cast<double>(a_BlockX) + 0.5, + static_cast<double>(a_BlockY) + 0.5, + static_cast<double>(a_BlockZ) + 0.5); } |