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:54:39 +0100
commitfd325e3990e168c2cf1838b770b019086765080d (patch)
tree2bc9c8679e5548d30fe89f09ab02d126dd74c421 /src/Simulator/FloodyFluidSimulator.cpp
parentUpdated Core. (diff)
downloadcuberite-fd325e3990e168c2cf1838b770b019086765080d.tar
cuberite-fd325e3990e168c2cf1838b770b019086765080d.tar.gz
cuberite-fd325e3990e168c2cf1838b770b019086765080d.tar.bz2
cuberite-fd325e3990e168c2cf1838b770b019086765080d.tar.lz
cuberite-fd325e3990e168c2cf1838b770b019086765080d.tar.xz
cuberite-fd325e3990e168c2cf1838b770b019086765080d.tar.zst
cuberite-fd325e3990e168c2cf1838b770b019086765080d.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index e95ef216d..53eb98c2a 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
@@ -115,14 +120,13 @@ 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;
}
+
+
}
- 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);
}