summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-27 11:01:20 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-27 11:01:20 +0100
commit71cd0199fda68a84c5f9a5252bf63e69712b177b (patch)
treef53d9488a3b5663aa6697fb3e6f68c9a4ea03939 /source/WorldStorage/WSSAnvil.cpp
parentAnvilStats: Added ChunkExtract mode of operation, splitting Anvil files into individual chunks. (diff)
downloadcuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar
cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.gz
cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.bz2
cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.lz
cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.xz
cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.zst
cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.zip
Diffstat (limited to 'source/WorldStorage/WSSAnvil.cpp')
-rw-r--r--source/WorldStorage/WSSAnvil.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/WorldStorage/WSSAnvil.cpp b/source/WorldStorage/WSSAnvil.cpp
index 1204db282..70e280a57 100644
--- a/source/WorldStorage/WSSAnvil.cpp
+++ b/source/WorldStorage/WSSAnvil.cpp
@@ -388,9 +388,10 @@ bool cWSSAnvil::SetChunkData(const cChunkCoords & a_Chunk, const AString & a_Dat
cWSSAnvil::cMCAFile * cWSSAnvil::LoadMCAFile(const cChunkCoords & a_Chunk)
{
// ASSUME m_CS is locked
+ ASSERT(m_CS.IsLocked());
- const int RegionX = (int)(floorf((float)a_Chunk.m_ChunkX / 32.0f));
- const int RegionZ = (int)(floorf((float)a_Chunk.m_ChunkZ / 32.0f));
+ const int RegionX = FAST_FLOOR_DIV(a_Chunk.m_ChunkX, 32);
+ const int RegionZ = FAST_FLOOR_DIV(a_Chunk.m_ChunkZ, 32);
// Is it already cached?
for (cMCAFiles::iterator itr = m_Files.begin(); itr != m_Files.end(); ++itr)