summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-02-13 19:02:08 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2022-07-10 16:59:26 +0200
commitb8071f1449822a266daa993c6512c93a05d1ab28 (patch)
tree6f7b9c54163e4a52aff2c38718b2364b1213ab84 /src/ClientHandle.cpp
parentForEachEntityInBox: fix off by one (diff)
downloadcuberite-b8071f1449822a266daa993c6512c93a05d1ab28.tar
cuberite-b8071f1449822a266daa993c6512c93a05d1ab28.tar.gz
cuberite-b8071f1449822a266daa993c6512c93a05d1ab28.tar.bz2
cuberite-b8071f1449822a266daa993c6512c93a05d1ab28.tar.lz
cuberite-b8071f1449822a266daa993c6512c93a05d1ab28.tar.xz
cuberite-b8071f1449822a266daa993c6512c93a05d1ab28.tar.zst
cuberite-b8071f1449822a266daa993c6512c93a05d1ab28.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index ef596baf0..3f56dfedf 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -624,8 +624,8 @@ void cClientHandle::StreamNextChunks(void)
void cClientHandle::UnloadOutOfRangeChunks(void)
{
- int ChunkPosX = FAST_FLOOR_DIV(static_cast<int>(m_Player->GetPosX()), cChunkDef::Width);
- int ChunkPosZ = FAST_FLOOR_DIV(static_cast<int>(m_Player->GetPosZ()), cChunkDef::Width);
+ int ChunkPosX = FloorC(m_Player->GetPosX() / cChunkDef::Width);
+ int ChunkPosZ = FloorC(m_Player->GetPosZ() / cChunkDef::Width);
cChunkCoordsList ChunksToRemove;
{