1
0

Changed entity ownership model to use smart pointers

This commit is contained in:
Tiger Wang
2016-12-19 20:12:23 +00:00
parent 07f25253a2
commit 4ef47aed62
39 changed files with 484 additions and 425 deletions

View File

@@ -15,6 +15,7 @@ cWither::cWither(void) :
m_WitherInvulnerableTicks(220)
{
SetMaxHealth(300);
SetHealth(GetMaxHealth() / 3);
}
@@ -30,18 +31,6 @@ bool cWither::IsArmored(void) const
bool cWither::Initialize(cWorld & a_World)
{
// Set health before BroadcastSpawnEntity()
SetHealth(GetMaxHealth() / 3);
return super::Initialize(a_World);
}
bool cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if (a_TDI.DamageType == dtDrowning)