summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-09-08 15:39:40 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-09-08 15:39:40 +0200
commit9ab5627a393a0b178f13fbba2c39463cfe0675b8 (patch)
tree1f89501893f02a6e711e5a31868a8acdb4ca7de5 /src/Entities/Player.h
parentd (diff)
parentShutdown connection when disconnect packet sent (#3999) (diff)
downloadcuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.tar
cuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.tar.gz
cuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.tar.bz2
cuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.tar.lz
cuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.tar.xz
cuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.tar.zst
cuberite-9ab5627a393a0b178f13fbba2c39463cfe0675b8.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 5c08151c8..2685622ad 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -195,6 +195,15 @@ public:
/** Returns true if the player is in Spectator mode, either explicitly, or by inheriting from current world */
bool IsGameModeSpectator(void) const;
+ /** Returns true if the player is fireproof
+ Stops players burning in creative or spectator modes.
+ */
+ virtual bool IsFireproof() const override
+ {
+ return (m_IsFireproof || IsGameModeCreative() || IsGameModeSpectator());
+
+ }
+
/** Returns true if the player can be targeted by Mobs */
bool CanMobsTarget(void) const;
@@ -331,13 +340,13 @@ public:
/** Returns true if the player is currently in the process of eating the currently equipped item */
bool IsEating(void) const { return (m_EatingFinishTick >= 0); }
- /** Returns true if the player is currently flying. */
+ /** Returns true if the player is currently flying */
bool IsFlying(void) const { return m_IsFlying; }
- /** Returns if a player is sleeping in a bed */
+ /** Returns true if a player is sleeping in a bed */
bool IsInBed(void) const { return m_bIsInBed; }
- /** returns true if the player has thrown out a floater. */
+ /** Returns true if the player has thrown out a floater */
bool IsFishing(void) const { return m_IsFishing; }
void SetIsFishing(bool a_IsFishing, UInt32 a_FloaterID = cEntity::INVALID_ID) { m_IsFishing = a_IsFishing; m_FloaterID = a_FloaterID; }
@@ -719,9 +728,6 @@ protected:
/** Filters out damage for creative mode / friendly fire */
virtual bool DoTakeDamage(TakeDamageInfo & TDI) override;
- /** Stops players from burning in creative mode */
- virtual void TickBurning(cChunk & a_Chunk) override;
-
/** Called in each tick to handle food-related processing */
void HandleFood(void);