summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/player.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index a6bb401b64..4f5f0a1346 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2982,6 +2982,9 @@ void level_change(bool skip_attribute_increase)
skip_more = true;
}
+ const int old_hp = you.hp;
+ const int old_maxhp = you.hp_max;
+
int hp_adjust = 0;
int mp_adjust = 0;
@@ -3521,6 +3524,7 @@ void level_change(bool skip_attribute_increase)
deflate_hp(you.hp_max, false);
+ you.hp = old_hp * you.hp_max / old_maxhp;
you.magic_points = std::max(0, you.magic_points);
// Get "real" values for note-taking, i.e. ignore Berserk,