diff options
Diffstat (limited to '')
-rw-r--r-- | VC2013/MCServer.sdf | bin | 61997056 -> 58261504 bytes | |||
-rw-r--r-- | source/Entities/Player.cpp | 4 |
2 files changed, 3 insertions, 1 deletions
diff --git a/VC2013/MCServer.sdf b/VC2013/MCServer.sdf Binary files differindex f0501bef6..fabac10ba 100644 --- a/VC2013/MCServer.sdf +++ b/VC2013/MCServer.sdf diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp index 098417dc5..f5c28b326 100644 --- a/source/Entities/Player.cpp +++ b/source/Entities/Player.cpp @@ -318,8 +318,10 @@ int cPlayer::XpGetLevel() float cPlayer::XpGetPercentage() { int currentLevel = CalcLevelFromXp(m_XpTotal); + int currentLevel_XpBase = XpForLevel(currentLevel); - return (float)m_XpTotal / (float)XpForLevel(1+currentLevel); + return (float)(m_XpTotal - currentLevel_XpBase) / + (float)(XpForLevel(1+currentLevel) - currentLevel_XpBase); } |