summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorldStorage')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp7
-rw-r--r--src/WorldStorage/WSSAnvil.cpp3
-rw-r--r--src/WorldStorage/WSSCompact.cpp1
3 files changed, 5 insertions, 6 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 70c07af50..d058a4583 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -609,17 +609,12 @@ void cNBTChunkSerializer::AddProjectileEntity(cProjectileEntity * a_Projectile)
case cProjectileEntity::pkGhastFireball:
{
m_Writer.AddInt("ExplosionPower", 1);
- // fall-through:
+ break;
}
case cProjectileEntity::pkFireCharge:
case cProjectileEntity::pkWitherSkull:
case cProjectileEntity::pkEnderPearl:
{
- m_Writer.BeginList("Motion", TAG_Double);
- m_Writer.AddDouble("", a_Projectile->GetSpeedX());
- m_Writer.AddDouble("", a_Projectile->GetSpeedY());
- m_Writer.AddDouble("", a_Projectile->GetSpeedZ());
- m_Writer.EndList();
break;
}
default:
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index c84763ac2..a3259b769 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -469,6 +469,9 @@ bool cWSSAnvil::SaveChunkToNBT(const cChunkCoords & a_Chunk, cFastNBTWriter & a_
a_Writer.AddByte("MCSIsLightValid", 1);
}
+ // Store the flag that the chunk has all the ores, trees, dungeons etc. MCS chunks are always complete.
+ a_Writer.AddByte("TerrainPopulated", 1);
+
a_Writer.EndCompound(); // "Level"
return true;
}
diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp
index 7a113849a..a853f6ec9 100644
--- a/src/WorldStorage/WSSCompact.cpp
+++ b/src/WorldStorage/WSSCompact.cpp
@@ -473,6 +473,7 @@ cWSSCompact::cPAKFile::cPAKFile(const AString & a_FileName, int a_LayerX, int a_
{
LOGERROR("ERROR READING %s FROM FILE %s (line %d); file offset %d", "Header", m_FileName.c_str(), __LINE__, f.Tell());
delete Header;
+ Header = NULL;
return;
}
m_ChunkHeaders.push_back(Header);