2014-07-17 04:24:29 -04:00
|
|
|
|
|
|
|
// WitherSkullEntity.cpp
|
|
|
|
|
|
|
|
// Implements the cWitherSkullEntity class representing the entity used by both blue and black wither skulls
|
|
|
|
|
2014-06-06 03:16:33 -04:00
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
|
|
|
#include "WitherSkullEntity.h"
|
|
|
|
#include "../World.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-29 08:59:24 -04:00
|
|
|
cWitherSkullEntity::cWitherSkullEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
|
2020-04-13 12:38:06 -04:00
|
|
|
Super(pkWitherSkull, a_Creator, a_Pos, 0.25, 0.25)
|
2014-06-06 03:16:33 -04:00
|
|
|
{
|
|
|
|
SetSpeed(a_Speed);
|
2015-03-30 19:42:32 -04:00
|
|
|
SetGravity(0);
|
|
|
|
SetAirDrag(0);
|
2014-06-06 03:16:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-07 04:25:34 -04:00
|
|
|
void cWitherSkullEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
|
2014-06-06 03:16:33 -04:00
|
|
|
{
|
|
|
|
// TODO: Explode
|
|
|
|
// TODO: Apply wither effect to entities nearby
|
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-07 04:25:34 -04:00
|
|
|
void cWitherSkullEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
|
2014-06-06 03:16:33 -04:00
|
|
|
{
|
|
|
|
// TODO: If entity is Ender Crystal, destroy it
|
|
|
|
a_EntityHit.TakeDamage(dtRangedAttack, this, 0, 1);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-06-06 03:16:33 -04:00
|
|
|
// TODO: Explode
|
|
|
|
// TODO: Apply wither effect to entity and others nearby
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2020-03-05 05:52:34 -05:00
|
|
|
Destroy();
|
2014-06-06 03:16:33 -04:00
|
|
|
}
|
2014-07-17 04:24:29 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|