diff options
author | James Ravenscroft <ravenscroftj@gmail.com> | 2013-08-09 09:50:33 +0200 |
---|---|---|
committer | James Ravenscroft <ravenscroftj@gmail.com> | 2013-08-09 09:50:33 +0200 |
commit | ffce5d143fe2b6224ee7ff29e40c9a73af0463e4 (patch) | |
tree | 1a57ee22dbeed4a1ccc1cb18407affe90ebd9b97 /source/Player.h | |
parent | Added IsSwimming and IsSubmerged flags and access methods (diff) | |
download | cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.tar cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.tar.gz cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.tar.bz2 cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.tar.lz cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.tar.xz cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.tar.zst cuberite-ffce5d143fe2b6224ee7ff29e40c9a73af0463e4.zip |
Diffstat (limited to 'source/Player.h')
-rw-r--r-- | source/Player.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/Player.h b/source/Player.h index ab9a17cf2..105e7d0a1 100644 --- a/source/Player.h +++ b/source/Player.h @@ -253,6 +253,12 @@ public: /// Starts or stops sprinting, sends the max speed update to the client, if needed void SetSprint(bool a_IsSprinting); + /// Returns whether the player is swimming or not + virtual bool IsSwimming(void) const{ return m_IsSwimming; } + + /// Return whether the player is under water or not + virtual bool IsSubmerged(void) const{ return m_IsSubmerged; } + // tolua_end // cEntity overrides: @@ -260,11 +266,7 @@ public: virtual bool IsSprinting(void) const { return m_IsSprinting; } virtual bool IsRclking (void) const { return IsEating(); } - /// Returns whether the player is swimming or not - virtual bool IsSwimming(void) const{ return m_IsSwimming; } - /// Return whether the player is under water or not - virtual bool IsSubmerged(void) const{ return m_IsSubmerged; } protected: typedef std::map< std::string, bool > PermissionMap; @@ -362,7 +364,7 @@ protected: void SetSwimState(cChunk & a_Chunk); /// Adds food exhaustion based on the difference between Pos and LastPos, sprinting status and swimming (in water block) - void ApplyFoodExhaustionFromMovement(cChunk & a_Chunk); + void ApplyFoodExhaustionFromMovement(); } ; // tolua_export |