diff options
author | madmaxoft <github@xoft.cz> | 2013-11-21 22:09:11 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-21 22:09:11 +0100 |
commit | f92512ebdf9b163a8e830055d7887b7afe554699 (patch) | |
tree | 46ac08113dad504b372f9025f8f510707329e2f3 /source/Entities/Player.h | |
parent | APIDump: Documented cWorld:ForEachBlockEntityInChunk() and cWorld:DoWithBlockEntityAt(). (diff) | |
download | cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.tar cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.tar.gz cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.tar.bz2 cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.tar.lz cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.tar.xz cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.tar.zst cuberite-f92512ebdf9b163a8e830055d7887b7afe554699.zip |
Diffstat (limited to 'source/Entities/Player.h')
-rw-r--r-- | source/Entities/Player.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/Entities/Player.h b/source/Entities/Player.h index bda25715d..44cab7d74 100644 --- a/source/Entities/Player.h +++ b/source/Entities/Player.h @@ -32,7 +32,6 @@ public: EATING_TICKS = 30, ///< Number of ticks it takes to eat an item MAX_AIR_LEVEL = 300, DROWNING_TICKS = 10, //number of ticks per heart of damage - MIN_EXPERIENCE = 0, } ; // tolua_end @@ -92,6 +91,12 @@ public: /// Gets the experience bar percentage - XpP float GetXpPercentage(void); + /// Caculates the amount of XP needed for a given level, ref: http://minecraft.gamepedia.com/XP + static short XpForLevel(short int a_Level); + + /// inverse of XpForLevel, ref: http://minecraft.gamepedia.com/XP values are as per this with pre-calculations + static short CalcLevelFromXp(short int a_CurrentXp); + // tolua_end /// Starts charging the equipped bow @@ -326,9 +331,7 @@ public: virtual bool IsCrouched (void) const { return m_IsCrouched; } virtual bool IsSprinting(void) const { return m_IsSprinting; } virtual bool IsRclking (void) const { return IsEating(); } - - - + protected: typedef std::map< std::string, bool > PermissionMap; PermissionMap m_ResolvedPermissions; @@ -426,15 +429,10 @@ protected: // flag saying we need to send a xp update to client bool m_bDirtyExperience; - /// Caculates the Xp needed for a given level, ref: http://minecraft.gamepedia.com/XP - static short XpForLevel(short int a_Level); - - /// inverse of XpAtLevel, ref: http://minecraft.gamepedia.com/XP values are as per this with pre-calculations - static short CalcLevelFromXp(short int a_CurrentXp); - bool m_IsChargingBow; int m_BowCharge; + virtual void Destroyed(void); /// Filters out damage for creative mode |