From 4cd49d7eca5f8fd53eb98577a1f218a5086704bb Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 5 Apr 2021 01:38:43 +0100 Subject: Fix sending incorrect date values on world change Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge. --- src/Entities/Player.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Entities/Player.h') diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 65dbfaed7..40797fa34 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -86,9 +86,6 @@ public: static const int MAX_FOOD_LEVEL; - /** Number of ticks it takes to eat an item */ - static const int EATING_TICKS; - // tolua_end CLASS_PROTODEF(cPlayer) @@ -371,7 +368,7 @@ public: void AddFoodExhaustion(double a_Exhaustion); /** Returns true if the player is currently in the process of eating the currently equipped item */ - bool IsEating(void) const { return (m_EatingFinishTick >= 0); } + bool IsEating(void) const { return m_EatingFinishTick >= 0_tick; } /** Returns true if the player is currently flying */ bool IsFlying(void) const { return m_IsFlying; } @@ -734,7 +731,7 @@ private: bool m_IsVisible; /** The world tick in which eating will be finished. -1 if not eating */ - Int64 m_EatingFinishTick; + cTickTimeLong m_EatingFinishTick; /** Player Xp level */ int m_LifetimeTotalXp; -- cgit v1.2.3