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

@@ -75,9 +75,12 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cCreeper::DoTakeDamage(TakeDamageInfo & a_TDI)
bool cCreeper::DoTakeDamage(TakeDamageInfo & a_TDI)
{
super::DoTakeDamage(a_TDI);
if (!super::DoTakeDamage(a_TDI))
{
return false;
}
if (a_TDI.DamageType == dtLightning)
{
@@ -85,6 +88,7 @@ void cCreeper::DoTakeDamage(TakeDamageInfo & a_TDI)
}
m_World->BroadcastEntityMetadata(*this);
return true;
}