summaryrefslogtreecommitdiffstats
path: root/src/Entities/ItemFrame.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-06-04 16:08:44 +0200
committerMattes D <github@xoft.cz>2014-06-04 16:08:44 +0200
commita85d4afe9625f57c8032282d9ab83bb0c3fa3ec9 (patch)
tree97d9837e980893653d15adf958f77af531c8fe6b /src/Entities/ItemFrame.cpp
parentMerge pull request #1059 from mc-server/coverity_fixes (diff)
parentFix itemframe break. (diff)
downloadcuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.tar
cuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.tar.gz
cuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.tar.bz2
cuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.tar.lz
cuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.tar.xz
cuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.tar.zst
cuberite-a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9.zip
Diffstat (limited to 'src/Entities/ItemFrame.cpp')
-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);
}