2012-10-01 14:08:15 -07:00
|
|
|
|
2012-07-15 13:36:34 -07:00
|
|
|
#pragma once
|
2012-10-01 14:08:15 -07:00
|
|
|
|
2012-09-23 15:09:57 -07:00
|
|
|
#include "BlockHandler.h"
|
2012-07-15 13:36:34 -07:00
|
|
|
|
|
|
|
|
2012-10-01 14:08:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cBlockFluidHandler :
|
|
|
|
public cBlockHandler
|
2012-07-15 13:36:34 -07:00
|
|
|
{
|
2012-10-14 11:30:16 -07:00
|
|
|
typedef cBlockHandler super;
|
|
|
|
|
2012-07-15 13:36:34 -07:00
|
|
|
public:
|
2012-10-03 01:52:11 -07:00
|
|
|
cBlockFluidHandler(BLOCKTYPE a_BlockType)
|
|
|
|
: cBlockHandler(a_BlockType)
|
2012-07-15 13:36:34 -07:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-10-01 14:08:15 -07:00
|
|
|
|
|
|
|
virtual bool DoesIgnoreBuildCollision(void) override
|
2012-07-15 13:36:34 -07:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-10-14 11:30:16 -07:00
|
|
|
|
2013-03-15 13:18:11 -07:00
|
|
|
virtual void Check(int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) override
|
2012-10-14 11:30:16 -07:00
|
|
|
{
|
|
|
|
switch (m_BlockType)
|
|
|
|
{
|
|
|
|
case E_BLOCK_STATIONARY_LAVA:
|
|
|
|
{
|
2013-03-15 13:18:11 -07:00
|
|
|
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_LAVA, a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ));
|
2012-10-14 11:30:16 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case E_BLOCK_STATIONARY_WATER:
|
|
|
|
{
|
2013-03-15 13:18:11 -07:00
|
|
|
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_WATER, a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ));
|
2012-10-14 11:30:16 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2013-03-15 13:18:11 -07:00
|
|
|
super::Check(a_RelX, a_RelY, a_RelZ, a_Chunk);
|
2012-10-14 11:30:16 -07:00
|
|
|
}
|
2012-10-01 14:08:15 -07:00
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|