diff options
author | archshift <admin@archshift.com> | 2014-07-19 10:40:29 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-07-19 10:40:29 +0200 |
commit | 041bfd5860cd8ef51db42eb6fb4b50b45549feba (patch) | |
tree | 2d93a68b888a5e2b410ec95d124edaad6f67bb92 /src/Entities/Player.cpp | |
parent | Renamed AllToLua_lua script. (diff) | |
download | cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.gz cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.bz2 cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.lz cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.xz cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.zst cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index ea11926b8..7376441b4 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -382,10 +382,7 @@ short cPlayer::DeltaExperience(short a_Xp_delta) m_CurrentXp += a_Xp_delta; // Make sure they didn't subtract too much - if (m_CurrentXp < 0) - { - m_CurrentXp = 0; - } + m_CurrentXp = std::max<short int>(m_CurrentXp, 0); // Update total for score calculation if (a_Xp_delta > 0) |