From b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0 Mon Sep 17 00:00:00 2001 From: tycho Date: Thu, 28 May 2015 12:29:26 +0100 Subject: Fix comments --- src/Simulator/DelayedFluidSimulator.cpp | 4 ++-- src/Simulator/FloodyFluidSimulator.cpp | 8 ++++++-- src/Simulator/SandSimulator.cpp | 9 +++++---- src/Simulator/VaporizeFluidSimulator.cpp | 4 +++- 4 files changed, 16 insertions(+), 9 deletions(-) (limited to 'src/Simulator') diff --git a/src/Simulator/DelayedFluidSimulator.cpp b/src/Simulator/DelayedFluidSimulator.cpp index cbf70bf05..e0da3ff61 100644 --- a/src/Simulator/DelayedFluidSimulator.cpp +++ b/src/Simulator/DelayedFluidSimulator.cpp @@ -99,7 +99,7 @@ void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, return; } - void * ChunkDataRaw = (m_FluidBlock == E_BLOCK_WATER) ? a_Chunk->GetWaterSimulatorData() : a_Chunk->GetLavaSimulatorData(); + auto ChunkDataRaw = (m_FluidBlock == E_BLOCK_WATER) ? a_Chunk->GetWaterSimulatorData() : a_Chunk->GetLavaSimulatorData(); cDelayedFluidSimulatorChunkData * ChunkData = static_cast(ChunkDataRaw); cDelayedFluidSimulatorChunkData::cSlot & Slot = ChunkData->m_Slots[m_AddSlotNum]; @@ -132,7 +132,7 @@ void cDelayedFluidSimulator::Simulate(float a_Dt) void cDelayedFluidSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) { - void * ChunkDataRaw = (m_FluidBlock == E_BLOCK_WATER) ? a_Chunk->GetWaterSimulatorData() : a_Chunk->GetLavaSimulatorData(); + auto ChunkDataRaw = (m_FluidBlock == E_BLOCK_WATER) ? a_Chunk->GetWaterSimulatorData() : a_Chunk->GetLavaSimulatorData(); cDelayedFluidSimulatorChunkData * ChunkData = static_cast(ChunkDataRaw); cDelayedFluidSimulatorChunkData::cSlot & Slot = ChunkData->m_Slots[m_SimSlotNum]; diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp index e7082d9ab..69c46f090 100644 --- a/src/Simulator/FloodyFluidSimulator.cpp +++ b/src/Simulator/FloodyFluidSimulator.cpp @@ -260,7 +260,9 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i static_cast(BlockX), static_cast(a_RelY), static_cast(BlockZ), - 0.5f, 1.5f); + 0.5f, + 1.5f + ); return; } } @@ -280,7 +282,9 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i static_cast(BlockX), static_cast(a_RelY), static_cast(BlockZ), - 0.5f, 1.5f); + 0.5f, + 1.5f + ); return; } } diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp index e11bc714a..70dde8cc0 100644 --- a/src/Simulator/SandSimulator.cpp +++ b/src/Simulator/SandSimulator.cpp @@ -267,10 +267,11 @@ void cSandSimulator::FinishFalling( cItems Pickups; Pickups.Add(static_cast(a_FallingBlockType), 1, a_FallingBlockMeta); a_World->SpawnItemPickups( - Pickups, - static_cast(a_BlockX) + 0.5, - static_cast(a_BlockY) + 0.5, - static_cast(a_BlockZ) + 0.5); + Pickups, + static_cast(a_BlockX) + 0.5, + static_cast(a_BlockY) + 0.5, + static_cast(a_BlockZ) + 0.5 + ); } diff --git a/src/Simulator/VaporizeFluidSimulator.cpp b/src/Simulator/VaporizeFluidSimulator.cpp index 7bca6c580..d766b069f 100644 --- a/src/Simulator/VaporizeFluidSimulator.cpp +++ b/src/Simulator/VaporizeFluidSimulator.cpp @@ -40,7 +40,9 @@ void cVaporizeFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, static_cast(a_BlockX), static_cast(a_BlockY), static_cast(a_BlockZ), - 1.0f, 0.6f); + 1.0f, + 0.6f + ); } } -- cgit v1.2.3