From 41a38e8d9098d6627cd26351577cf032e6996c87 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 14 Oct 2012 18:30:16 +0000 Subject: Floody fluid simulator now dries up correctly, too. git-svn-id: http://mc-server.googlecode.com/svn/trunk@964 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Blocks/BlockFluid.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'source/Blocks/BlockFluid.h') diff --git a/source/Blocks/BlockFluid.h b/source/Blocks/BlockFluid.h index 40ff621e4..a8cd9c497 100644 --- a/source/Blocks/BlockFluid.h +++ b/source/Blocks/BlockFluid.h @@ -10,6 +10,8 @@ class cBlockFluidHandler : public cBlockHandler { + typedef cBlockHandler super; + public: cBlockFluidHandler(BLOCKTYPE a_BlockType) : cBlockHandler(a_BlockType) @@ -23,7 +25,24 @@ public: return true; } - // TODO: Implement proper fluid physics here + + virtual void Check(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override + { + switch (m_BlockType) + { + case E_BLOCK_STATIONARY_LAVA: + { + a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_LAVA, a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ)); + break; + } + case E_BLOCK_STATIONARY_WATER: + { + a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_WATER, a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ)); + break; + } + } + super::Check(a_World, a_BlockX, a_BlockY, a_BlockZ); + } } ; -- cgit v1.2.3