diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-26 03:13:40 +0100 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-26 03:13:40 +0100 |
commit | c35db25269ea9549b996cd18c65b05a9f8d43387 (patch) | |
tree | 87c8ef140849ed116d59fdfdc88ac4385d3ce5b7 /source/cEntity.cpp | |
parent | - Ignoring Debug and Release makes it easier to check what should be committed (diff) | |
download | cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.tar cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.tar.gz cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.tar.bz2 cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.tar.lz cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.tar.xz cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.tar.zst cuberite-c35db25269ea9549b996cd18c65b05a9f8d43387.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cEntity.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source/cEntity.cpp b/source/cEntity.cpp index f739a3243..ce7117498 100644 --- a/source/cEntity.cpp +++ b/source/cEntity.cpp @@ -52,17 +52,6 @@ void cEntity::Initialize( cWorld* a_World ) m_World->AddEntity( this );
MoveToCorrectChunk(true);
-
- /*
-Not needed because itīs covered by the MoveToCorrectChunk function
- cWorld::BlockToChunk( (int)m_Pos->x, (int)m_Pos->y, (int)m_Pos->z, m_ChunkX, m_ChunkY, m_ChunkZ );
- cChunk* Chunk = m_World->GetChunk( m_ChunkX, m_ChunkY, m_ChunkZ );
- if( Chunk )
- {
- //LOG("Adding entity %i to chunk %i %i %i", m_UniqueID, Chunk->GetPosX(), Chunk->GetPosY(), Chunk->GetPosZ() );
- Chunk->AddEntity( *this );
- }
- */
}
void cEntity::WrapRotation()
@@ -73,17 +62,17 @@ void cEntity::WrapRotation() while(m_Rot->y < -180.f) m_Rot->y+=360.f;
}
-void cEntity::MoveToCorrectChunk(bool a_IgnoreOldChunk)
+void cEntity::MoveToCorrectChunk(bool a_bIgnoreOldChunk)
{
if( !m_World ) return; // Entity needs a world to move to a chunk
int ChunkX = 0, ChunkY = 0, ChunkZ = 0;
cWorld::BlockToChunk( (int)m_Pos->x, (int)m_Pos->y, (int)m_Pos->z, ChunkX, ChunkY, ChunkZ );
- if(a_IgnoreOldChunk || m_ChunkX != ChunkX || m_ChunkY != ChunkY || m_ChunkZ != ChunkZ)
+ if(a_bIgnoreOldChunk || m_ChunkX != ChunkX || m_ChunkY != ChunkY || m_ChunkZ != ChunkZ)
{
LOG("From %i %i To %i %i", m_ChunkX, m_ChunkZ, ChunkX, ChunkZ );
cChunk* Chunk = 0;
- if(!a_IgnoreOldChunk)
+ if(!a_bIgnoreOldChunk)
Chunk = m_World->GetChunkUnreliable( m_ChunkX, m_ChunkY, m_ChunkZ );
typedef std::list< cClientHandle* > ClientList;
|