1
0

Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1090 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-12-21 12:21:20 +00:00
parent 999014170d
commit 033af999ba
60 changed files with 312 additions and 385 deletions

View File

@@ -5,7 +5,7 @@
#include "ClientHandle.h"
CLASS_DEFINITION( cFallingBlock, cEntity )
cFallingBlock::cFallingBlock(const Vector3i & a_BlockPosition, BLOCKTYPE a_BlockType)
@@ -20,14 +20,6 @@ cFallingBlock::cFallingBlock(const Vector3i & a_BlockPosition, BLOCKTYPE a_Block
cFallingBlock::~cFallingBlock()
{
}
void cFallingBlock::Initialize(cWorld * a_World)
{
super::Initialize( a_World );
@@ -55,10 +47,14 @@ void cFallingBlock::Tick(float a_Dt)
//GetWorld()->BroadcastTeleportEntity(*this); // Testing position
Vector3i BlockPos( m_OriginalPosition.x, (int)(m_Pos.y-0.5), m_OriginalPosition.z );
if( !IsPassable( GetWorld()->GetBlock( BlockPos ) ) )
Vector3i BlockPos( m_OriginalPosition.x, (int)(m_Pos.y - 0.5), m_OriginalPosition.z );
if (!IsPassable(GetWorld()->GetBlock(BlockPos)))
{
Destroy();
GetWorld()->SetBlock( BlockPos.x, BlockPos.y+1, BlockPos.z, m_BlockType, 0 );
GetWorld()->SetBlock( BlockPos.x, BlockPos.y + 1, BlockPos.z, m_BlockType, 0 );
}
}
}