summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-17 14:53:41 +0100
committerMattes D <github@xoft.cz>2014-12-17 14:53:41 +0100
commita7e115ee3e6922bf46df806758e415898023ef1d (patch)
treed0f5729f81cebc29c1f0a29911012c2d58943e6d /src/Simulator
parentMerge pull request #1581 from mc-server/redstone (diff)
parentRemoved unneeded newlines (diff)
downloadcuberite-a7e115ee3e6922bf46df806758e415898023ef1d.tar
cuberite-a7e115ee3e6922bf46df806758e415898023ef1d.tar.gz
cuberite-a7e115ee3e6922bf46df806758e415898023ef1d.tar.bz2
cuberite-a7e115ee3e6922bf46df806758e415898023ef1d.tar.lz
cuberite-a7e115ee3e6922bf46df806758e415898023ef1d.tar.xz
cuberite-a7e115ee3e6922bf46df806758e415898023ef1d.tar.zst
cuberite-a7e115ee3e6922bf46df806758e415898023ef1d.zip
Diffstat (limited to 'src/Simulator')
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index e95ef216d..37d58307b 100644
--- a/src/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
@@ -83,7 +83,7 @@ void cFloodyFluidSimulator::SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_Re
return;
}
}
-
+
// New meta for the spreading to neighbors:
// If this is a source block or was falling, the new meta is just the falloff
// Otherwise it is the current meta plus falloff (may be larger than max height, will be checked later)
@@ -103,6 +103,11 @@ void cFloodyFluidSimulator::SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_Re
SpreadFurther = false;
}
}
+ // Spread to the neighbors:
+ if (SpreadFurther && (NewMeta < 8))
+ {
+ SpreadXZ(a_Chunk, a_RelX, a_RelY, a_RelZ, NewMeta);
+ }
// If source creation is on, check for it here:
else if (
(m_NumNeighborsForSource > 0) && // Source creation is on
@@ -116,13 +121,7 @@ void cFloodyFluidSimulator::SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_Re
return;
}
}
-
- 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);
}