diff options
author | LO1ZB <andreasdaamen@web.de> | 2014-08-28 11:36:35 +0200 |
---|---|---|
committer | LO1ZB <andreasdaamen@web.de> | 2014-08-28 11:36:35 +0200 |
commit | 3c1c073714e2b0542c9a79db962b6fc9e6ddd352 (patch) | |
tree | cf8c191b1642914745944fa376ba1f2f56a95ea6 /src/Chunk.cpp | |
parent | DungeonRooms: Fixed an off-by-one error. (diff) | |
download | cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.tar cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.tar.gz cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.tar.bz2 cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.tar.lz cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.tar.xz cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.tar.zst cuberite-3c1c073714e2b0542c9a79db962b6fc9e6ddd352.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Chunk.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 116c0f3a0..5fd6cb352 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -65,7 +65,7 @@ sSetBlock::sSetBlock( int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_Bloc // cChunk: cChunk::cChunk( - int a_ChunkX, int a_ChunkY, int a_ChunkZ, + int a_ChunkX, int a_ChunkZ, cChunkMap * a_ChunkMap, cWorld * a_World, cChunk * a_NeighborXM, cChunk * a_NeighborXP, cChunk * a_NeighborZM, cChunk * a_NeighborZP, cAllocationPool<cChunkData::sChunkSection> & a_Pool @@ -77,7 +77,6 @@ cChunk::cChunk( m_HasLoadFailed(false), m_StayCount(0), m_PosX(a_ChunkX), - m_PosY(a_ChunkY), m_PosZ(a_ChunkZ), m_World(a_World), m_ChunkMap(a_ChunkMap), @@ -643,7 +642,7 @@ void cChunk::MoveEntityToNewChunk(cEntity * a_Entity) cChunk * Neighbor = GetNeighborChunk(a_Entity->GetChunkX() * cChunkDef::Width, a_Entity->GetChunkZ() * cChunkDef::Width); if (Neighbor == NULL) { - Neighbor = m_ChunkMap->GetChunkNoLoad(a_Entity->GetChunkX(), ZERO_CHUNK_Y, a_Entity->GetChunkZ()); + Neighbor = m_ChunkMap->GetChunkNoLoad(a_Entity->GetChunkX(), a_Entity->GetChunkZ()); if (Neighbor == NULL) { // TODO: What to do with this? @@ -2593,7 +2592,7 @@ cChunk * cChunk::GetRelNeighborChunk(int a_RelX, int a_RelZ) int BlockZ = m_PosZ * cChunkDef::Width + a_RelZ; int ChunkX, ChunkZ; BlockToChunk(BlockX, BlockZ, ChunkX, ChunkZ); - return m_ChunkMap->GetChunkNoLoad(ChunkX, ZERO_CHUNK_Y, ChunkZ); + return m_ChunkMap->GetChunkNoLoad(ChunkX, ChunkZ); } // Walk the neighbors: |