summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-04 15:16:30 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-04 15:16:30 +0200
commit33fbdedea3b9d48f2bec329b93d86024befbb6ab (patch)
tree97d9837e980893653d15adf958f77af531c8fe6b
parentMerge pull request #1059 from mc-server/coverity_fixes (diff)
downloadcuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.tar
cuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.tar.gz
cuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.tar.bz2
cuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.tar.lz
cuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.tar.xz
cuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.tar.zst
cuberite-33fbdedea3b9d48f2bec329b93d86024befbb6ab.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ItemFrame.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Entities/ItemFrame.cpp b/src/Entities/ItemFrame.cpp
index 9dd909880..7bc7bda8d 100644
--- a/src/Entities/ItemFrame.cpp
+++ b/src/Entities/ItemFrame.cpp
@@ -55,6 +55,7 @@ void cItemFrame::KilledBy(cEntity * a_Killer)
{
if (m_Item.IsEmpty())
{
+ SetHealth(0);
super::KilledBy(a_Killer);
Destroy();
return;
@@ -69,8 +70,9 @@ void cItemFrame::KilledBy(cEntity * a_Killer)
}
SetHealth(GetMaxHealth());
- m_Item.Clear();
+ m_Item.Empty();
m_Rotation = 0;
+ SetInvulnerableTicks(0);
GetWorld()->BroadcastEntityMetadata(*this);
}