diff options
Diffstat (limited to '')
-rw-r--r-- | source/cChunkMap.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/cChunkMap.h b/source/cChunkMap.h index a4593529b..32ae4da6e 100644 --- a/source/cChunkMap.h +++ b/source/cChunkMap.h @@ -111,21 +111,21 @@ public: {
BlockToChunk(a_X, a_Y, a_Z, a_ChunkX, a_ChunkZ);
- a_X = a_X - a_ChunkX * 16;
- a_Z = a_Z - a_ChunkZ * 16;
+ a_X = a_X - a_ChunkX * cChunk::c_ChunkWidth;
+ a_Z = a_Z - a_ChunkZ * cChunk::c_ChunkWidth;
}
/// Converts absolute block coords to chunk coords:
inline static void BlockToChunk( int a_X, int a_Y, int a_Z, int & a_ChunkX, int & a_ChunkZ )
{
(void)a_Y;
- a_ChunkX = a_X / 16;
- if ((a_X < 0) && (a_X % 16 != 0))
+ a_ChunkX = a_X / cChunk::c_ChunkWidth;
+ if ((a_X < 0) && (a_X % cChunk::c_ChunkWidth != 0))
{
a_ChunkX--;
}
- a_ChunkZ = a_Z / 16;
- if ((a_Z < 0) && (a_Z % 16 != 0))
+ a_ChunkZ = a_Z / cChunk::c_ChunkWidth;
+ if ((a_Z < 0) && (a_Z % cChunk::c_ChunkWidth != 0))
{
a_ChunkZ--;
}
|