summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-20 18:16:54 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-20 18:16:54 +0200
commit7cf741abdeef7579ea3069ca42615e3f868c0194 (patch)
treed50a88d41bf43f0d46481782d50ab8623d287471 /src/Entities/Player.h
parentMerge pull request #2391 from SamJBarney/CropGrowthFix (diff)
parentFixed food drain bugs (diff)
downloadcuberite-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.h15
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);