diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-17 12:40:14 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-17 12:40:14 +0100 |
commit | 71097aa49b7ec3fc258167e528a0c9f37f259c71 (patch) | |
tree | 1fc97c2339345a7c31184b2bda1557d10ef7830f /source/WSSCompact.cpp | |
parent | git-svn-id: http://mc-server.googlecode.com/svn/trunk@281 0a769ca7-a7f5-676a-18bf-c427514a06d6 (diff) | |
download | cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.tar cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.tar.gz cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.tar.bz2 cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.tar.lz cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.tar.xz cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.tar.zst cuberite-71097aa49b7ec3fc258167e528a0c9f37f259c71.zip |
Diffstat (limited to 'source/WSSCompact.cpp')
-rw-r--r-- | source/WSSCompact.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/WSSCompact.cpp b/source/WSSCompact.cpp index c023875a5..04fb45351 100644 --- a/source/WSSCompact.cpp +++ b/source/WSSCompact.cpp @@ -64,6 +64,7 @@ bool cWSSCompact::LoadChunk(const cChunkCoords & a_Chunk) if (f == NULL)
{
// For some reason we couldn't locate the file
+ LOG("Cannot locate a proper PAK file for chunk [%d, %d]", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
@@ -80,6 +81,7 @@ bool cWSSCompact::SaveChunk(const cChunkCoords & a_Chunk) if (f == NULL)
{
// For some reason we couldn't locate the file
+ LOG("Cannot locate a proper PAK file for chunk [%d, %d]", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
return f->SaveChunk(a_Chunk, m_World);
@@ -299,7 +301,6 @@ bool cWSSCompact::cPAKFile::LoadChunk(const cChunkCoords & a_Chunk, int a_Offset if (a_Header->m_UncompressedSize > cChunk::c_BlockDataSize ) // We gots some extra data :D
{
- LOGINFO("Parsing trailing JSON");
Json::Value root; // will contain the root value after parsing.
Json::Reader reader;
if ( !reader.parse( UncompressedData.data() + cChunk::c_BlockDataSize, root, false ) )
@@ -351,6 +352,7 @@ bool cWSSCompact::cPAKFile::SaveChunkToData(const cChunkCoords & a_Chunk, cWorld if (Serializer.GetBlockData().empty())
{
// Chunk not valid
+ LOG("cWSSCompact: Trying to save chunk [%d, %d] that has no data, ignoring request.", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
@@ -380,6 +382,7 @@ bool cWSSCompact::cPAKFile::SaveChunkToData(const cChunkCoords & a_Chunk, cWorld sChunkHeader * Header = new sChunkHeader;
if (Header == NULL)
{
+ LOGWARNING("Cannot create a new chunk header to save chunk [%d, %d]", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
Header->m_CompressedSize = (int)CompressedData.size();
|