2012-09-30 12:37:44 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
#include "Defines.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cPlayer;
|
|
|
|
class cItem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 07:21:20 -05:00
|
|
|
class cFallingBlock :
|
|
|
|
public cEntity
|
2012-09-30 12:37:44 -04:00
|
|
|
{
|
|
|
|
typedef cEntity super;
|
2012-12-21 07:21:20 -05:00
|
|
|
|
2012-09-30 12:37:44 -04:00
|
|
|
public:
|
2012-12-21 07:21:20 -05:00
|
|
|
CLASS_PROTODEF(cFallingBlock);
|
2012-09-30 12:37:44 -04:00
|
|
|
|
2013-03-02 14:57:09 -05:00
|
|
|
cFallingBlock(const Vector3i & a_BlockPosition, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
|
2012-09-30 12:37:44 -04:00
|
|
|
|
2013-03-02 14:57:09 -05:00
|
|
|
BLOCKTYPE GetBlockType(void) const { return m_BlockType; }
|
|
|
|
NIBBLETYPE GetBlockMeta(void) const { return m_BlockMeta; }
|
2012-12-26 04:12:00 -05:00
|
|
|
|
|
|
|
// cEntity overrides:
|
2012-09-30 12:37:44 -04:00
|
|
|
virtual void Initialize(cWorld * a_World) override;
|
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
2013-04-13 17:02:10 -04:00
|
|
|
virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
|
2012-12-21 07:21:20 -05:00
|
|
|
|
2012-09-30 12:37:44 -04:00
|
|
|
private:
|
2013-03-02 14:57:09 -05:00
|
|
|
BLOCKTYPE m_BlockType;
|
|
|
|
NIBBLETYPE m_BlockMeta;
|
|
|
|
Vector3i m_OriginalPosition;
|
2012-12-21 07:21:20 -05:00
|
|
|
} ;
|
2012-09-30 12:37:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|