summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-28 13:29:26 +0200
committertycho <work.tycho@gmail.com>2015-05-28 13:54:04 +0200
commitb2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0 (patch)
treeff9846d0ffa558e237ea148762f67b5ebf71a47d /src/Simulator
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.gz
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.bz2
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.lz
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.xz
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.zst
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/DelayedFluidSimulator.cpp4
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp8
-rw-r--r--src/Simulator/SandSimulator.cpp9
-rw-r--r--src/Simulator/VaporizeFluidSimulator.cpp4
4 files changed, 16 insertions, 9 deletions
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<cDelayedFluidSimulatorChunkData *>(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<cDelayedFluidSimulatorChunkData *>(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<double>(BlockX),
static_cast<double>(a_RelY),
static_cast<double>(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<double>(BlockX),
static_cast<double>(a_RelY),
static_cast<double>(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<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);
+ Pickups,
+ static_cast<double>(a_BlockX) + 0.5,
+ static_cast<double>(a_BlockY) + 0.5,
+ static_cast<double>(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<double>(a_BlockX),
static_cast<double>(a_BlockY),
static_cast<double>(a_BlockZ),
- 1.0f, 0.6f);
+ 1.0f,
+ 0.6f
+ );
}
}