summaryrefslogtreecommitdiffstats
path: root/src/Entities/ItemFrame.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-10 21:51:22 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-10 21:51:22 +0200
commitbfa8aaf41bd2e982e81ca1385efc9ec25ebd246c (patch)
tree706bb3680c60cbc1f78e31f0ca2ac6d1e9422a6a /src/Entities/ItemFrame.cpp
parentPortal improvements and suggestions (diff)
parentFixed clang warnings about abs() in Noise.cpp. (diff)
downloadcuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.tar
cuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.tar.gz
cuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.tar.bz2
cuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.tar.lz
cuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.tar.xz
cuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.tar.zst
cuberite-bfa8aaf41bd2e982e81ca1385efc9ec25ebd246c.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);
}