diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-29 21:15:09 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-04 19:15:18 +0200 |
commit | adb86a75dac91a210149fc28b1dbf5225896f66c (patch) | |
tree | b62bcb6cba06726081c598879d84018f7a39c824 /src/Simulator/DelayedFluidSimulator.cpp | |
parent | Use std::queue for the block tick queue (diff) | |
download | cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.tar cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.tar.gz cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.tar.bz2 cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.tar.lz cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.tar.xz cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.tar.zst cuberite-adb86a75dac91a210149fc28b1dbf5225896f66c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Simulator/DelayedFluidSimulator.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Simulator/DelayedFluidSimulator.cpp b/src/Simulator/DelayedFluidSimulator.cpp index b27e34e5f..ec1918617 100644 --- a/src/Simulator/DelayedFluidSimulator.cpp +++ b/src/Simulator/DelayedFluidSimulator.cpp @@ -78,21 +78,6 @@ cDelayedFluidSimulator::cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Flu -void cDelayedFluidSimulator::WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) -{ - if (!cChunkDef::IsValidHeight(a_Position.y)) - { - // Not inside the world (may happen when rclk with a full bucket - the client sends Y = -1) - return; - } - - Super::WakeUp(a_Chunk, a_Position, a_Block); -} - - - - - void cDelayedFluidSimulator::Simulate(float a_Dt) { m_AddSlotNum = m_SimSlotNum; @@ -153,3 +138,18 @@ void cDelayedFluidSimulator::AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLO ++m_TotalBlocks; } + + + + + +void cDelayedFluidSimulator::WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) +{ + if (!cChunkDef::IsValidHeight(a_Position.y)) + { + // Not inside the world (may happen when rclk with a full bucket - the client sends Y = -1) + return; + } + + AddBlock(a_Chunk, a_Position, a_Block); +} |