diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-05-07 12:54:58 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-05-07 12:54:58 +0200 |
commit | f5fe3682201e2f1356e3a5c408eb8296b542e072 (patch) | |
tree | 208ec7a760b9e909fbb43e1a12ee43d866cb9df7 /src/Mobs/Wither.cpp | |
parent | Remove old import (diff) | |
parent | Fixed wires powering wires diagonally below them (diff) | |
download | cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.gz cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.bz2 cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.lz cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.xz cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.zst cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.zip |
Diffstat (limited to 'src/Mobs/Wither.cpp')
-rw-r--r-- | src/Mobs/Wither.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp index 8f5d28b68..5b6e895e1 100644 --- a/src/Mobs/Wither.cpp +++ b/src/Mobs/Wither.cpp @@ -10,7 +10,7 @@ cWither::cWither(void) : super("Wither", mtWither, "mob.wither.hurt", "mob.wither.death", 0.9, 4.0), - m_InvulnerableTicks(220) + m_WitherInvulnerableTicks(220) { SetMaxHealth(300); } @@ -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) + if (m_WitherInvulnerableTicks > 0) { - return; + return false; } if (IsArmored() && (a_TDI.DamageType == dtRangedAttack)) { - return; + return false; } - super::DoTakeDamage(a_TDI); + return super::DoTakeDamage(a_TDI); } @@ -68,16 +68,16 @@ void cWither::Tick(float a_Dt, cChunk & a_Chunk) { super::Tick(a_Dt, a_Chunk); - if (m_InvulnerableTicks > 0) + if (m_WitherInvulnerableTicks > 0) { - unsigned int NewTicks = m_InvulnerableTicks - 1; + unsigned int NewTicks = m_WitherInvulnerableTicks - 1; if (NewTicks == 0) { m_World->DoExplosionAt(7.0, GetPosX(), GetPosY(), GetPosZ(), false, esWitherBirth, this); } - m_InvulnerableTicks = NewTicks; + m_WitherInvulnerableTicks = NewTicks; if ((NewTicks % 10) == 0) { |