diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-08-20 18:16:54 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-08-20 18:16:54 +0200 |
commit | 7cf741abdeef7579ea3069ca42615e3f868c0194 (patch) | |
tree | d50a88d41bf43f0d46481782d50ab8623d287471 /src/Entities/Player.h | |
parent | Merge pull request #2391 from SamJBarney/CropGrowthFix (diff) | |
parent | Fixed food drain bugs (diff) | |
download | cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.tar cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.tar.gz cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.tar.bz2 cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.tar.lz cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.tar.xz cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.tar.zst cuberite-7cf741abdeef7579ea3069ca42615e3f868c0194.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 0fee6ef8a..8656f7336 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -117,8 +117,8 @@ public: /** Returns true if the player is currently charging the bow */ bool IsChargingBow(void) const { return m_IsChargingBow; } - void SetTouchGround( bool a_bTouchGround); - inline void SetStance( const double a_Stance) { m_Stance = a_Stance; } + void SetTouchGround(bool a_bTouchGround); + inline void SetStance(const double a_Stance) { m_Stance = a_Stance; } double GetEyeHeight(void) const; // tolua_export Vector3d GetEyePosition(void) const; // tolua_export virtual bool IsOnGround(void) const override { return m_bTouchGround; } @@ -208,9 +208,6 @@ public: @deprecated Use SetSpeed instead. */ void ForceSetSpeed(const Vector3d & a_Speed); // tolua_export - /** Tries to move to a new position, with attachment-related checks (y == -999) */ - void MoveTo(const Vector3d & a_NewPos); // tolua_export - cWindow * GetWindow(void) { return m_CurrentWindow; } // tolua_export const cWindow * GetWindow(void) const { return m_CurrentWindow; } @@ -454,7 +451,7 @@ public: // tolua_end /** Update movement-related statistics. */ - void UpdateMovementStats(const Vector3d & a_DeltaPos); + void UpdateMovementStats(const Vector3d & a_DeltaPos, bool a_PreviousIsOnGround); // tolua_begin @@ -553,8 +550,7 @@ protected: /** A "buffer" which adds up hunger before it is substracted from m_FoodSaturationLevel or m_FoodLevel. Each action adds a little */ double m_FoodExhaustionLevel; - float m_LastJumpHeight; - float m_LastGroundHeight; + double m_LastGroundHeight; bool m_bTouchGround; double m_Stance; @@ -667,9 +663,6 @@ protected: /** Tosses a list of items. */ void TossItems(const cItems & a_Items); - /** Adds food exhaustion based on the difference between Pos and LastPos, sprinting status and swimming (in water block) */ - void ApplyFoodExhaustionFromMovement(); - /** Returns the filename for the player data based on the UUID given. This can be used both for online and offline UUIDs. */ AString GetUUIDFileName(const AString & a_UUID); |