Disabled excessive entity-related logging in Debug mode.
This commit is contained in:
parent
c44ce84497
commit
de4ac55398
@ -1743,7 +1743,14 @@ bool cChunk::AddClient(cClientHandle* a_Client)
|
||||
|
||||
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr )
|
||||
{
|
||||
LOGD("cChunk: Entity #%d (%s) at [%i, %i, %i] spawning for player \"%s\"", (*itr)->GetUniqueID(), (*itr)->GetClass(), m_PosX, m_PosY, m_PosZ, a_Client->GetUsername().c_str());
|
||||
/*
|
||||
// DEBUG:
|
||||
LOGD("cChunk: Entity #%d (%s) at [%i, %i, %i] spawning for player \"%s\"",
|
||||
(*itr)->GetUniqueID(), (*itr)->GetClass(),
|
||||
m_PosX, m_PosY, m_PosZ,
|
||||
a_Client->GetUsername().c_str()
|
||||
);
|
||||
*/
|
||||
(*itr)->SpawnOn(*a_Client);
|
||||
}
|
||||
return true;
|
||||
@ -1768,7 +1775,13 @@ void cChunk::RemoveClient( cClientHandle* a_Client )
|
||||
{
|
||||
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr )
|
||||
{
|
||||
LOGD("chunk [%i, %i] destroying entity #%i for player \"%s\"", m_PosX, m_PosZ, (*itr)->GetUniqueID(), a_Client->GetUsername().c_str() );
|
||||
/*
|
||||
// DEBUG:
|
||||
LOGD("chunk [%i, %i] destroying entity #%i for player \"%s\"",
|
||||
m_PosX, m_PosZ,
|
||||
(*itr)->GetUniqueID(), a_Client->GetUsername().c_str()
|
||||
);
|
||||
*/
|
||||
a_Client->SendDestroyEntity(*(*itr));
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user