summaryrefslogtreecommitdiffstats
path: root/source/FallingBlock.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 13:21:20 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-21 13:21:20 +0100
commit033af999ba419afadfa1830d288b021e7d9bc1f5 (patch)
treefff5cd27b629a03d5161d872ca9e41ec2de1a80b /source/FallingBlock.cpp
parentAdded TakeDamage logging to the Debuggers plugin. (diff)
downloadcuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.tar
cuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.tar.gz
cuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.tar.bz2
cuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.tar.lz
cuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.tar.xz
cuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.tar.zst
cuberite-033af999ba419afadfa1830d288b021e7d9bc1f5.zip
Diffstat (limited to 'source/FallingBlock.cpp')
-rw-r--r--source/FallingBlock.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/source/FallingBlock.cpp b/source/FallingBlock.cpp
index 1ed9cd5ed..93eac0815 100644
--- a/source/FallingBlock.cpp
+++ b/source/FallingBlock.cpp
@@ -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 );
}
-} \ No newline at end of file
+}
+
+
+
+