summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockFluid.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Blocks/BlockFluid.h')
-rw-r--r--source/Blocks/BlockFluid.h21
1 files changed, 20 insertions, 1 deletions
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);
+ }
} ;