summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Wither.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-25 10:13:27 +0100
committerandrew <xdotftw@gmail.com>2014-03-25 10:13:27 +0100
commitba4216641120ec2f49464ed0b136af3198d48f89 (patch)
tree727d0a45024b8c25152379d7c5e28339c40006ff /src/Mobs/Wither.cpp
parentProtocol: Wither metadata (diff)
downloadcuberite-ba4216641120ec2f49464ed0b136af3198d48f89.tar
cuberite-ba4216641120ec2f49464ed0b136af3198d48f89.tar.gz
cuberite-ba4216641120ec2f49464ed0b136af3198d48f89.tar.bz2
cuberite-ba4216641120ec2f49464ed0b136af3198d48f89.tar.lz
cuberite-ba4216641120ec2f49464ed0b136af3198d48f89.tar.xz
cuberite-ba4216641120ec2f49464ed0b136af3198d48f89.tar.zst
cuberite-ba4216641120ec2f49464ed0b136af3198d48f89.zip
Diffstat (limited to 'src/Mobs/Wither.cpp')
-rw-r--r--src/Mobs/Wither.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp
index 790f127f2..39dc6aab9 100644
--- a/src/Mobs/Wither.cpp
+++ b/src/Mobs/Wither.cpp
@@ -13,8 +13,6 @@ cWither::cWither(void) :
m_InvulnerableTicks(220)
{
SetMaxHealth(300);
-
- SetHealth(GetMaxHealth() / 3);
}
@@ -30,6 +28,18 @@ bool cWither::IsArmored(void) const
+bool cWither::Initialize(cWorld * a_World) override
+{
+ // Set health before BroadcastSpawnEntity()
+ SetHealth(GetMaxHealth() / 3);
+
+ return super::Initialize(a_World);
+}
+
+
+
+
+
void cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if (a_TDI.DamageType == dtDrowning)