diff options
author | peterbell10 <peterbell10@live.co.uk> | 2018-07-23 20:12:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 20:12:51 +0200 |
commit | 31a11a6df4922b590a50a5ff3d3c00d42a45599d (patch) | |
tree | e495de40981de4fd89bf4b652a13fe1dcec723d7 /src/ChunkDef.h | |
parent | cPawn: Reset last ground height in ResetPosition (#4261) (diff) | |
download | cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.tar cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.tar.gz cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.tar.bz2 cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.tar.lz cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.tar.xz cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.tar.zst cuberite-31a11a6df4922b590a50a5ff3d3c00d42a45599d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkDef.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h index bdba4061f..3807ae1aa 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -207,19 +207,19 @@ public: } - inline static Vector3i IndexToCoordinate( unsigned int index) + inline static Vector3i IndexToCoordinate(size_t index) { #if AXIS_ORDER == AXIS_ORDER_XZY return Vector3i( // 1.2 - index % cChunkDef::Width, // X - index / (cChunkDef::Width * cChunkDef::Width), // Y - (index / cChunkDef::Width) % cChunkDef::Width // Z + static_cast<int>(index % cChunkDef::Width), // X + static_cast<int>(index / (cChunkDef::Width * cChunkDef::Width)), // Y + static_cast<int>((index / cChunkDef::Width) % cChunkDef::Width) // Z ); #elif AXIS_ORDER == AXIS_ORDER_YZX return Vector3i( // 1.1 - index / (cChunkDef::Height * cChunkDef::Width), // X - index % cChunkDef::Height, // Y - (index / cChunkDef::Height) % cChunkDef::Width // Z + static_cast<int>(index / (cChunkDef::Height * cChunkDef::Width)), // X + static_cast<int>(index % cChunkDef::Height), // Y + static_cast<int>((index / cChunkDef::Height) % cChunkDef::Width) // Z ); #endif } |