41a38e8d90
git-svn-id: http://mc-server.googlecode.com/svn/trunk@964 0a769ca7-a7f5-676a-18bf-c427514a06d6
51 lines
898 B
C++
51 lines
898 B
C++
|
|
#pragma once
|
|
|
|
#include "BlockHandler.h"
|
|
|
|
|
|
|
|
|
|
|
|
class cBlockFluidHandler :
|
|
public cBlockHandler
|
|
{
|
|
typedef cBlockHandler super;
|
|
|
|
public:
|
|
cBlockFluidHandler(BLOCKTYPE a_BlockType)
|
|
: cBlockHandler(a_BlockType)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
virtual bool DoesIgnoreBuildCollision(void) override
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
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);
|
|
}
|
|
} ;
|
|
|
|
|
|
|
|
|