diff options
author | Mattes D <github@xoft.cz> | 2014-06-04 16:08:44 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-06-04 16:08:44 +0200 |
commit | a85d4afe9625f57c8032282d9ab83bb0c3fa3ec9 (patch) | |
tree | 97d9837e980893653d15adf958f77af531c8fe6b /src/Entities/ItemFrame.cpp | |
parent | Merge pull request #1059 from mc-server/coverity_fixes (diff) | |
parent | Fix itemframe break. (diff) | |
download | cuberite-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.cpp | 4 |
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); } |