summaryrefslogtreecommitdiffstats
path: root/src/Simulator/DelayedFluidSimulator.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-08-17 15:48:38 +0200
committerMattes D <github@xoft.cz>2017-08-17 15:48:38 +0200
commit7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9 (patch)
tree59128a57d87d7826de450a71e060bd869e837a4a /src/Simulator/DelayedFluidSimulator.cpp
parentUpdated docs to mention InfoDump for creating README.md, etc. (#3895) (diff)
downloadcuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.gz
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.bz2
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.lz
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.xz
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.zst
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/DelayedFluidSimulator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Simulator/DelayedFluidSimulator.cpp b/src/Simulator/DelayedFluidSimulator.cpp
index d21e8dc6d..c3e262dec 100644
--- a/src/Simulator/DelayedFluidSimulator.cpp
+++ b/src/Simulator/DelayedFluidSimulator.cpp
@@ -78,9 +78,9 @@ cDelayedFluidSimulator::cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Flu
-void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
+void cDelayedFluidSimulator::AddBlock(Vector3i a_Block, cChunk * a_Chunk)
{
- if ((a_BlockY < 0) || (a_BlockY >= cChunkDef::Height))
+ if ((a_Block.y < 0) || (a_Block.y >= cChunkDef::Height))
{
// Not inside the world (may happen when rclk with a full bucket - the client sends Y = -1)
return;
@@ -91,9 +91,9 @@ void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ,
return;
}
- int RelX = a_BlockX - a_Chunk->GetPosX() * cChunkDef::Width;
- int RelZ = a_BlockZ - a_Chunk->GetPosZ() * cChunkDef::Width;
- BLOCKTYPE BlockType = a_Chunk->GetBlock(RelX, a_BlockY, RelZ);
+ int RelX = a_Block.x - a_Chunk->GetPosX() * cChunkDef::Width;
+ int RelZ = a_Block.z - a_Chunk->GetPosZ() * cChunkDef::Width;
+ BLOCKTYPE BlockType = a_Chunk->GetBlock(RelX, a_Block.y, RelZ);
if (BlockType != m_FluidBlock)
{
return;
@@ -104,7 +104,7 @@ void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ,
cDelayedFluidSimulatorChunkData::cSlot & Slot = ChunkData->m_Slots[m_AddSlotNum];
// Add, if not already present:
- if (!Slot.Add(RelX, a_BlockY, RelZ))
+ if (!Slot.Add(RelX, a_Block.y, RelZ))
{
return;
}