ClientHandle: fix incorrect position floor

This commit is contained in:
Tiger Wang 2022-02-13 18:02:08 +00:00
parent 61aefeae7b
commit b8071f1449

View File

@ -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;
{