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

@@ -40,24 +40,24 @@ bool cWither::Initialize(cWorld * a_World)
void cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
bool cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if (a_TDI.DamageType == dtDrowning)
{
return;
return false;
}
if (m_InvulnerableTicks > 0)
{
return;
return false;
}
if (IsArmored() && (a_TDI.DamageType == dtRangedAttack))
{
return;
return false;
}
super::DoTakeDamage(a_TDI);
return super::DoTakeDamage(a_TDI);
}