summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 16:42:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 16:42:26 +0000
commit760579ccd2bbf5599dd615f57d04de17fdbf7735 (patch)
tree26c3c71896f68a0e17403ca2673f4fdeceb4ec0c /crawl-ref/source/player.cc
parent56f6f73efb98b03485b34d334ef72585e4ee41a7 (diff)
downloadcrawl-ref-760579ccd2bbf5599dd615f57d04de17fdbf7735.tar.gz
crawl-ref-760579ccd2bbf5599dd615f57d04de17fdbf7735.zip
Properly redraw the player's skill level, experience level, etc. after
losing a level due to draining. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6253 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 21904de8d6..eb8662b5bc 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -3497,8 +3497,7 @@ void level_change(bool skip_attribute_increase)
deflate_hp( you.hp_max, false );
- if (you.magic_points < 0)
- you.magic_points = 0;
+ you.magic_points = std::max(0, you.magic_points);
{
unwind_var<int> hpmax(you.hp_max);
@@ -3530,8 +3529,7 @@ void level_change(bool skip_attribute_increase)
}
redraw_skill( you.your_name, player_title() );
-
-} // end level_change()
+}
// Here's a question for you: does the ordering of mods make a difference?
// (yes) -- are these things in the right order of application to stealth?