diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-05-29 11:08:32 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-05-29 11:08:32 +0200 |
commit | 1e6f02437e88495d57249f742526526ee5865777 (patch) | |
tree | af200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/Simulator/SandSimulator.cpp | |
parent | Merge pull request #2157 from beeduck/Issue2106 (diff) | |
parent | Merge branch 'master' into PreventNewWarnings (diff) | |
download | cuberite-1e6f02437e88495d57249f742526526ee5865777.tar cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2 cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst cuberite-1e6f02437e88495d57249f742526526ee5865777.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Simulator/SandSimulator.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp index 497f81999..70dde8cc0 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,13 @@ 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 + ); } |