summaryrefslogtreecommitdiffstats
path: root/source/Simulator/FloodyFluidSimulator.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-04 06:21:07 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-04 06:21:07 +0100
commit412c21a22cd67971bc27ee3fd022e1565eb48e69 (patch)
treec4f5d99c7016f26f3c6de39c21c269c0c2dadd58 /source/Simulator/FloodyFluidSimulator.h
parentcBlockArea now has a GetBlockTypeMeta() and GetRelBlockTypeMeta() methods (diff)
downloadcuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.tar
cuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.tar.gz
cuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.tar.bz2
cuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.tar.lz
cuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.tar.xz
cuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.tar.zst
cuberite-412c21a22cd67971bc27ee3fd022e1565eb48e69.zip
Diffstat (limited to '')
-rw-r--r--source/Simulator/FloodyFluidSimulator.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/Simulator/FloodyFluidSimulator.h b/source/Simulator/FloodyFluidSimulator.h
index d3fa85fce..dc9ff2557 100644
--- a/source/Simulator/FloodyFluidSimulator.h
+++ b/source/Simulator/FloodyFluidSimulator.h
@@ -29,10 +29,11 @@ class cFloodyFluidSimulator :
typedef cDelayedFluidSimulator super;
public:
- cFloodyFluidSimulator(cWorld * a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, NIBBLETYPE a_Falloff, int a_TickDelay);
+ cFloodyFluidSimulator(cWorld * a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, NIBBLETYPE a_Falloff, int a_TickDelay, int a_NumNeighborsForSource);
protected:
NIBBLETYPE m_Falloff;
+ int m_NumNeighborsForSource;
// cDelayedFluidSimulator overrides:
virtual void SimulateBlock(int a_BlockX, int a_BlockY, int a_BlockZ) override;
@@ -40,8 +41,11 @@ protected:
/// Checks tributaries, if not fed, decreases the block's level and returns true
bool CheckTributaries(int a_BlockX, int a_BlockY, int a_BlockZ, const cBlockArea & a_Area, NIBBLETYPE a_MyMeta);
- /// Spreads into the specified block, if the block there allows. a_Area is for checking.
+ /// Spreads into the specified block, if the blocktype there allows. a_Area is for checking.
void SpreadToNeighbor(int a_BlockX, int a_BlockY, int a_BlockZ, const cBlockArea & a_Area, NIBBLETYPE a_NewMeta);
+
+ /// Checks if there are enough neighbors to create a source at the coords specified; turns into source and returns true if so
+ bool CheckNeighborsForSource(int a_BlockX, int a_BlockY, int a_BlockZ, const cBlockArea & a_Area);
} ;