From bca7f2949032ab90ee03988f560bce157a25b683 Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 22 Apr 2014 01:59:34 -1000 Subject: Lay foundation for fireproof entities. Prevent any entities with the m_Fireproof flag from taking fire or lava damage. --- src/Entities/Entity.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 8f3899e2f..ea85ac683 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -435,6 +435,9 @@ protected: cWorld * m_World; + /// Whether the entity is capable of taking fire or lava damage. + bool m_Fireproof; + /// Time, in ticks, since the last damage dealt by being on fire. Valid only if on fire (IsOnFire()) int m_TicksSinceLastBurnDamage; -- cgit v1.2.3 From 06f41699afe27a6be1de357466f9185403baa550 Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 22 Apr 2014 02:36:39 -1000 Subject: Fixed indentation and changed m_Fireproof to m_IsFireproof. --- src/Entities/Entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index ea85ac683..84a2003d4 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -435,8 +435,8 @@ protected: cWorld * m_World; - /// Whether the entity is capable of taking fire or lava damage. - bool m_Fireproof; + /// Whether the entity is capable of taking fire or lava damage. + bool m_IsFireproof; /// Time, in ticks, since the last damage dealt by being on fire. Valid only if on fire (IsOnFire()) int m_TicksSinceLastBurnDamage; -- cgit v1.2.3 From a37b36adab85206e025d4ca97f6e64dc7a6974b8 Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 22 Apr 2014 12:59:31 -1000 Subject: Fireproof status getter and setter. --- src/Entities/Entity.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 84a2003d4..4267ed0f6 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -329,6 +329,11 @@ public: 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 void StartBurning(int a_TicksLeftBurning); -- cgit v1.2.3 From 876866942807f823d5d7553538f562a6b081093b Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 23 Apr 2014 00:12:37 -0700 Subject: Renamed getter and setter for IsFireproof. --- src/Entities/Entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 4267ed0f6..86efc5a98 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -330,9 +330,9 @@ public: int GetMaxHealth(void) const { return m_MaxHealth; } /// Sets whether the entity is fireproof - void SetFireproofStatus(bool a_IsFireproof); + void SetIsFireproof(bool a_IsFireproof); - bool GetFireproofStatus(void) const { return m_IsFireproof; } + bool IsFireproof(void) const { return m_IsFireproof; } /// Puts the entity on fire for the specified amount of ticks void StartBurning(int a_TicksLeftBurning); -- cgit v1.2.3