1
0

Add entity invulnerable

This commit is contained in:
Howaner
2014-04-26 00:32:30 +02:00
parent 43cca14763
commit 7e76f030aa
22 changed files with 111 additions and 50 deletions

View File

@@ -25,14 +25,19 @@ cWolf::cWolf(void) :
void cWolf::DoTakeDamage(TakeDamageInfo & a_TDI)
bool cWolf::DoTakeDamage(TakeDamageInfo & a_TDI)
{
super::DoTakeDamage(a_TDI);
if (super::DoTakeDamage(a_TDI))
{
return false;
}
if (!m_IsTame)
{
m_IsAngry = true;
}
m_World->BroadcastEntityMetadata(*this); // Broadcast health and possibly angry face
return true;
}