summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-16 20:31:06 +0100
committermadmaxoft <github@xoft.cz>2014-01-16 20:31:06 +0100
commitde4ac553984c01f2aa94d42637c05ec75dc6680c (patch)
tree26c4f6d31c968ee57980365da7f55acf525cbc03 /src/Entities/Entity.cpp
parentFixed whitespace in previous commit. (diff)
downloadcuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.tar
cuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.tar.gz
cuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.tar.bz2
cuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.tar.lz
cuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.tar.xz
cuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.tar.zst
cuberite-de4ac553984c01f2aa94d42637c05ec75dc6680c.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index cd97c6766..8e0d0b9a7 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -75,13 +75,16 @@ cEntity::~cEntity()
{
ASSERT(!m_World->HasEntity(m_UniqueID)); // Before deleting, the entity needs to have been removed from the world
+ /*
+ // DEBUG:
LOGD("Deleting entity %d at pos {%.2f, %.2f, %.2f} ~ [%d, %d]; ptr %p",
m_UniqueID,
m_Pos.x, m_Pos.y, m_Pos.z,
(int)(m_Pos.x / cChunkDef::Width), (int)(m_Pos.z / cChunkDef::Width),
this
);
-
+ */
+
if (m_AttachedTo != NULL)
{
Detach();
@@ -138,9 +141,13 @@ bool cEntity::Initialize(cWorld * a_World)
return false;
}
+ /*
+ // DEBUG:
LOGD("Initializing entity #%d (%s) at {%.02f, %.02f, %.02f}",
m_UniqueID, GetClass(), m_Pos.x, m_Pos.y, m_Pos.z
);
+ */
+
m_IsInitialized = true;
m_World = a_World;
m_World->AddEntity(this);
@@ -617,9 +624,12 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
m_bOnGround = true;
+ /*
+ // DEBUG:
LOGD("Entity #%d (%s) is inside a block at {%d, %d, %d}",
m_UniqueID, GetClass(), BlockX, BlockY, BlockZ
);
+ */
}
if (!m_bOnGround)