summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-04 17:49:24 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-04 17:49:24 +0200
commitf4e3c01a710a2cc5118807a65f8d27519a19ef37 (patch)
treeb01db2464263a6425ed39195f574523e7707fa5b /src/WorldStorage/NBTChunkSerializer.cpp
parentEps comparison (diff)
downloadcuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.gz
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.bz2
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.lz
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.xz
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.zst
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index e49042ff7..2dcae51ce 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -619,14 +619,11 @@ void cNBTChunkSerializer::AddProjectileEntity(cProjectileEntity * a_Projectile)
{
ASSERT(!"Unsaved projectile entity!");
}
- } // switch (ProjectileKind)
- cEntity * Creator = a_Projectile->GetCreator();
- if (Creator != NULL)
+ } // switch (ProjectileKind)
+
+ if (!a_Projectile->GetCreatorName().empty())
{
- if (Creator->GetEntityType() == cEntity::etPlayer)
- {
- m_Writer.AddString("ownerName", ((cPlayer *)Creator)->GetName());
- }
+ m_Writer.AddString("ownerName", a_Projectile->GetCreatorName());
}
m_Writer.EndCompound();
}