diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/defines.h | 6 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 327d69af32..03a7ab6be5 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -141,9 +141,9 @@ const int ANON_FRIENDLY_MONSTER = -1999; const int DEBUG_COOKIE = 32767; const int MAX_SKILL_LEVEL = 27; -const unsigned int MAX_EXP_TOTAL = 8999999; -const unsigned int MAX_EXP_POOL = 20000; -const unsigned int FULL_EXP_POOL = MAX_EXP_POOL; +const int MAX_EXP_TOTAL = 8999999; +const int MAX_EXP_POOL = 20000; +const int FULL_EXP_POOL = MAX_EXP_POOL; const int MIN_HIT_MISS_PERCENTAGE = 5; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index b74219279a..733759432c 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2510,7 +2510,7 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain, mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained ); #endif - if (you.experience + exp_gained > MAX_EXP_TOTAL) + if (you.experience + exp_gained > (unsigned int)MAX_EXP_TOTAL) you.experience = MAX_EXP_TOTAL; else you.experience += exp_gained; @@ -2525,7 +2525,7 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain, exp_gained /= 2; } - if (you.exp_available + exp_gained > MAX_EXP_POOL) + if (you.exp_available + exp_gained > (unsigned int)MAX_EXP_POOL) you.exp_available = MAX_EXP_POOL; else you.exp_available += exp_gained; |