Bientôt un monde infini?
This commit is contained in:
@@ -11,7 +11,7 @@ Chunk* World::ChunkAt(float x, float y, float z) const {
|
||||
int cz = (int)z / CHUNK_SIZE_Z;
|
||||
|
||||
if (x < 0 || y < 0 || z < 0 ||
|
||||
cx >= VIEW_DISTANCE || cz >= VIEW_DISTANCE || y >= CHUNK_SIZE_Y)
|
||||
x >= WORLD_SIZE_X * CHUNK_SIZE_X || z >= CHUNK_SIZE_Z * WORLD_SIZE_Y || y > CHUNK_SIZE_Y)
|
||||
return 0;
|
||||
|
||||
return m_chunks.Get(cx, cz);
|
||||
|
Reference in New Issue
Block a user