Fireproof status getter and setter.
This commit is contained in:
parent
06f41699af
commit
a37b36adab
@ -45,6 +45,7 @@ cEntity::cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z, d
|
|||||||
, m_IsInitialized(false)
|
, m_IsInitialized(false)
|
||||||
, m_EntityType(a_EntityType)
|
, m_EntityType(a_EntityType)
|
||||||
, m_World(NULL)
|
, m_World(NULL)
|
||||||
|
, m_IsFireproof(false)
|
||||||
, m_TicksSinceLastBurnDamage(0)
|
, m_TicksSinceLastBurnDamage(0)
|
||||||
, m_TicksSinceLastLavaDamage(0)
|
, m_TicksSinceLastLavaDamage(0)
|
||||||
, m_TicksSinceLastFireDamage(0)
|
, m_TicksSinceLastFireDamage(0)
|
||||||
@ -1042,6 +1043,16 @@ void cEntity::SetMaxHealth(int a_MaxHealth)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// Sets whether the entity is fireproof
|
||||||
|
void cEntity::SetFireproofStatus(bool a_IsFireproof)
|
||||||
|
{
|
||||||
|
m_IsFireproof = a_IsFireproof;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Puts the entity on fire for the specified amount of ticks
|
/// Puts the entity on fire for the specified amount of ticks
|
||||||
void cEntity::StartBurning(int a_TicksLeftBurning)
|
void cEntity::StartBurning(int a_TicksLeftBurning)
|
||||||
{
|
{
|
||||||
|
@ -329,6 +329,11 @@ public:
|
|||||||
|
|
||||||
int GetMaxHealth(void) const { return m_MaxHealth; }
|
int GetMaxHealth(void) const { return m_MaxHealth; }
|
||||||
|
|
||||||
|
/// Sets whether the entity is fireproof
|
||||||
|
void SetFireproofStatus(bool a_IsFireproof);
|
||||||
|
|
||||||
|
bool GetFireproofStatus(void) const { return m_IsFireproof; }
|
||||||
|
|
||||||
/// Puts the entity on fire for the specified amount of ticks
|
/// Puts the entity on fire for the specified amount of ticks
|
||||||
void StartBurning(int a_TicksLeftBurning);
|
void StartBurning(int a_TicksLeftBurning);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user