1
0

Merge pull request #1060 from Howaner/Inventory

Fix itemframe break.
This commit is contained in:
Mattes D 2014-06-04 16:08:44 +02:00
commit a85d4afe96

View File

@ -55,6 +55,7 @@ void cItemFrame::KilledBy(cEntity * a_Killer)
{ {
if (m_Item.IsEmpty()) if (m_Item.IsEmpty())
{ {
SetHealth(0);
super::KilledBy(a_Killer); super::KilledBy(a_Killer);
Destroy(); Destroy();
return; return;
@ -69,8 +70,9 @@ void cItemFrame::KilledBy(cEntity * a_Killer)
} }
SetHealth(GetMaxHealth()); SetHealth(GetMaxHealth());
m_Item.Clear(); m_Item.Empty();
m_Rotation = 0; m_Rotation = 0;
SetInvulnerableTicks(0);
GetWorld()->BroadcastEntityMetadata(*this); GetWorld()->BroadcastEntityMetadata(*this);
} }