summaryrefslogtreecommitdiffstats
path: root/source/cChunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/cChunk.h')
-rw-r--r--source/cChunk.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/cChunk.h b/source/cChunk.h
index cbf3b3b85..0759b79f0 100644
--- a/source/cChunk.h
+++ b/source/cChunk.h
@@ -214,13 +214,14 @@ public:
void PositionToWorldPosition(int a_ChunkX, int a_ChunkY, int a_ChunkZ, int & a_X, int & a_Y, int & a_Z);
Vector3i PositionToWorldPosition( const Vector3i & a_InChunkPos );
+ static const unsigned int INDEX_OUT_OF_RANGE = 0xffffffff;
inline static unsigned int MakeIndex(int x, int y, int z )
{
if( x < c_ChunkWidth && x > -1 && y < c_ChunkHeight && y > -1 && z < c_ChunkWidth && z > -1 )
{
return y + (z * c_ChunkHeight) + (x * c_ChunkHeight * c_ChunkWidth);
}
- return 0;
+ return INDEX_OUT_OF_RANGE;
}
inline void MarkDirty(void)