summaryrefslogtreecommitdiffstats
path: root/source/Entities/Player.cpp
diff options
context:
space:
mode:
authorDaniel O'Brien <marmot.daniel@gmail.com>2013-11-16 12:46:27 +0100
committerDaniel O'Brien <marmot.daniel@gmail.com>2013-11-16 12:46:27 +0100
commitc7f38761ed1cc524e98db754cadb2c6af1578b88 (patch)
tree56f767f989214305c4d1d1e4116e466804f990fd /source/Entities/Player.cpp
parentedited comment and changed error behavior of DeltaXp (diff)
downloadcuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.tar
cuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.tar.gz
cuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.tar.bz2
cuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.tar.lz
cuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.tar.xz
cuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.tar.zst
cuberite-c7f38761ed1cc524e98db754cadb2c6af1578b88.zip
Diffstat (limited to '')
-rw-r--r--source/Entities/Player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp
index 129d7df56..ccc7b89f1 100644
--- a/source/Entities/Player.cpp
+++ b/source/Entities/Player.cpp
@@ -370,9 +370,9 @@ short cPlayer::DeltaExperience(short a_Xp_delta)
m_CurrentXp += a_Xp_delta;
// Make sure they didn't subtract too much
- if(m_CurrentXp < 0)
+ if(m_CurrentXp < MIN_EXPERIENCE)
{
- m_CurrentXp = 0;
+ m_CurrentXp = MIN_EXPERIENCE;
}
// Update total for score calculation