summaryrefslogtreecommitdiffstats
path: root/source/WSSCompact.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-14 22:21:03 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-14 22:21:03 +0100
commitb974b1ea59efac4a14a929b917df152d06487201 (patch)
treee23c97a10cfde99c7ddcaa0960e459d8e9caaf16 /source/WSSCompact.cpp
parentAdded the new ChunkDef.h into VC2010 project (diff)
downloadcuberite-b974b1ea59efac4a14a929b917df152d06487201.tar
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.gz
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.bz2
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.lz
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.xz
cuberite-b974b1ea59efac4a14a929b917df152d06487201.tar.zst
cuberite-b974b1ea59efac4a14a929b917df152d06487201.zip
Diffstat (limited to '')
-rw-r--r--source/WSSCompact.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/WSSCompact.cpp b/source/WSSCompact.cpp
index ae920e55f..8c27dba51 100644
--- a/source/WSSCompact.cpp
+++ b/source/WSSCompact.cpp
@@ -734,12 +734,14 @@ bool cWSSCompact::LoadChunkFromData(const cChunkCoords & a_Chunk, int & a_Uncomp
}
}
+ BLOCKTYPE * BlockData = (BLOCKTYPE *)UncompressedData.data();
+
a_World->ChunkDataLoaded(
a_Chunk.m_ChunkX, a_Chunk.m_ChunkY, a_Chunk.m_ChunkZ,
- UncompressedData.data(),
- UncompressedData.data() + cChunkDef::MetaOffset,
- UncompressedData.data() + cChunkDef::LightOffset,
- UncompressedData.data() + cChunkDef::SkyLightOffset,
+ BlockData,
+ BlockData + cChunkDef::MetaOffset,
+ BlockData + cChunkDef::LightOffset,
+ BlockData + cChunkDef::SkyLightOffset,
NULL,
Entities,
BlockEntities
@@ -788,7 +790,7 @@ bool cWSSCompact::cPAKFile::SaveChunkToData(const cChunkCoords & a_Chunk, cWorld
}
AString Data;
- Data.assign(Serializer.GetBlockData(), cChunkDef::BlockDataSize);
+ Data.assign((const char *)Serializer.GetBlockData(), cChunkDef::BlockDataSize);
if (Serializer.HasJsonData())
{
AString JsonData;