summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FloodyFluidSimulator.cpp
diff options
context:
space:
mode:
authorgushromp <blashyrk92@gmail.com>2014-12-16 22:38:57 +0100
committergushromp <blashyrk92@gmail.com>2014-12-16 22:38:57 +0100
commit6cf3aa70f1d7291136a25c2b289113fb15ba68dc (patch)
treebacedb3d100a81f52015a5657c31cf9744b4d93d /src/Simulator/FloodyFluidSimulator.cpp
parentUpdated Core. (diff)
downloadcuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.tar
cuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.tar.gz
cuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.tar.bz2
cuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.tar.lz
cuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.tar.xz
cuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.tar.zst
cuberite-6cf3aa70f1d7291136a25c2b289113fb15ba68dc.zip
Diffstat (limited to 'src/Simulator/FloodyFluidSimulator.cpp')
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index e95ef216d..5e0f88ab6 100644
--- a/src/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
@@ -58,6 +58,7 @@ void cFloodyFluidSimulator::SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_Re
BLOCKTYPE MyBlock; NIBBLETYPE MyMeta;
a_Chunk->GetBlockTypeMeta(a_RelX, a_RelY, a_RelZ, MyBlock, MyMeta);
+
if (!IsAnyFluidBlock(MyBlock))
{
// Can happen - if a block is scheduled for simulating and gets replaced in the meantime.
@@ -115,13 +116,15 @@ void cFloodyFluidSimulator::SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_Re
// Also has been re-scheduled for ticking in the next wave, so no marking is needed
return;
}
+
+ else if (SpreadFurther && (NewMeta < 8))
+ {
+ // Spread to the neighbors:
+ SpreadXZ(a_Chunk, a_RelX, a_RelY, a_RelZ, NewMeta);
+ }
}
- if (SpreadFurther && (NewMeta < 8))
- {
- // Spread to the neighbors:
- SpreadXZ(a_Chunk, a_RelX, a_RelY, a_RelZ, NewMeta);
- }
+
// Mark as processed:
a_Chunk->FastSetBlock(a_RelX, a_RelY, a_RelZ, m_StationaryFluidBlock, MyMeta);