diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-02-13 19:01:46 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-10 16:59:26 +0200 |
commit | 61aefeae7b6e15064cf4484482c86fc14fb404f0 (patch) | |
tree | d378ecea7d7724af4dce63e10cc9e4949dbe57ae /src | |
parent | Fix detector rail breaking/replacing blocks (#5429) (diff) | |
download | cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.tar cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.tar.gz cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.tar.bz2 cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.tar.lz cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.tar.xz cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.tar.zst cuberite-61aefeae7b6e15064cf4484482c86fc14fb404f0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 16e8fa267..82631e6ed 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -1016,8 +1016,8 @@ bool cChunkMap::ForEachEntityInBox(const cBoundingBox & a_Box, cEntityCallback a // Calculate the chunk range for the box: int MinChunkX = FloorC(a_Box.GetMinX() / cChunkDef::Width); int MinChunkZ = FloorC(a_Box.GetMinZ() / cChunkDef::Width); - int MaxChunkX = FloorC((a_Box.GetMaxX() + cChunkDef::Width) / cChunkDef::Width); - int MaxChunkZ = FloorC((a_Box.GetMaxZ() + cChunkDef::Width) / cChunkDef::Width); + int MaxChunkX = FloorC(a_Box.GetMaxX() / cChunkDef::Width); + int MaxChunkZ = FloorC(a_Box.GetMaxZ() / cChunkDef::Width); // Iterate over each chunk in the range: cCSLock Lock(m_CSChunks); |