summaryrefslogtreecommitdiffstats
path: root/source/Simulator/FluidSimulator.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-17 14:24:27 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-17 14:24:27 +0100
commit84a6a3d9681dc00bca165e6158ea87c37cd7abe4 (patch)
treea6d68d0952e306572da2b0e3417fa93fd6a97272 /source/Simulator/FluidSimulator.cpp
parentFixed zero-probability height distribution in FluidSprings finisher (diff)
downloadcuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.tar
cuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.tar.gz
cuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.tar.bz2
cuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.tar.lz
cuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.tar.xz
cuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.tar.zst
cuberite-84a6a3d9681dc00bca165e6158ea87c37cd7abe4.zip
Diffstat (limited to 'source/Simulator/FluidSimulator.cpp')
-rw-r--r--source/Simulator/FluidSimulator.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/Simulator/FluidSimulator.cpp b/source/Simulator/FluidSimulator.cpp
index 4648c4cde..df86ef6fc 100644
--- a/source/Simulator/FluidSimulator.cpp
+++ b/source/Simulator/FluidSimulator.cpp
@@ -119,12 +119,15 @@ bool cFluidSimulator::IsHigherMeta(NIBBLETYPE a_Meta1, NIBBLETYPE a_Meta2)
// TODO Not working very well yet :s
Direction cFluidSimulator::GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a_Over)
{
- char BlockID = m_World.GetBlock(a_X, a_Y, a_Z);
+ if ((a_Y < 0) || (a_Y >= cChunkDef::Height))
+ {
+ return NONE;
+ }
+ BLOCKTYPE BlockID = m_World.GetBlock(a_X, a_Y, a_Z);
if (!IsAllowedBlock(BlockID)) // No Fluid -> No Flowing direction :D
{
return NONE;
}
-
/*
Disabled because of causing problems and being useless atm