diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-21 23:14:23 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-21 23:14:23 +0200 |
commit | 7615ed90c020b88db52b0b094f00cd028e326b5a (patch) | |
tree | ca7f647e77195a6346a2333f3d9fe5292cd2ed40 /src/Simulator/FluidSimulator.cpp | |
parent | Fixed invalid iterators (diff) | |
parent | Merge branch 'master' of https://github.com/mc-server/MCServer (diff) | |
download | cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.gz cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.bz2 cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.lz cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.xz cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.zst cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.zip |
Diffstat (limited to 'src/Simulator/FluidSimulator.cpp')
-rw-r--r-- | src/Simulator/FluidSimulator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Simulator/FluidSimulator.cpp b/src/Simulator/FluidSimulator.cpp index 4a84084d2..f64955cb2 100644 --- a/src/Simulator/FluidSimulator.cpp +++ b/src/Simulator/FluidSimulator.cpp @@ -169,7 +169,8 @@ Direction cFluidSimulator::GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a X = Pos->x; Z = Pos->z; } - }else if(BlockID == E_BLOCK_AIR) + } + else if(BlockID == E_BLOCK_AIR) { LowestPoint = 9; //This always dominates X = Pos->x; @@ -177,6 +178,7 @@ Direction cFluidSimulator::GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a } delete Pos; + Pos = NULL; } if (LowestPoint == m_World.GetBlockMeta(a_X, a_Y, a_Z)) |