diff -u -r angband.org/src/xtra2.c angband/src/xtra2.c
--- angband.org/src/xtra2.c Tue Jul 25 20:57:49 2000
+++ angband/src/xtra2.c Mon Jan 15 22:20:39 2001
@@ -1694,7 +1694,7 @@
  /* Handle stuff */
  handle_stuff();
  }
-
+ 
 
  /* Gain levels while possible */
  while ((p_ptr->lev < PY_MAX_LEVEL) &&
@@ -1722,6 +1722,28 @@
  /* Handle stuff */
  handle_stuff();
  }
+
+ /* Gain max levels while possible */
+ while ((p_ptr->max_lev < PY_MAX_LEVEL) &&
+        (p_ptr->max_exp >= (player_exp[p_ptr->max_lev-1] *
+                            p_ptr->expfact / 100L)))
+ {
+ /* Gain max level */
+ p_ptr->max_lev++;
+
+ /* Update some stuff */
+ p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
+
+ /* Redraw some stuff */
+ p_ptr->redraw |= (PR_LEV | PR_TITLE);
+
+ /* Window stuff */
+ p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1);
+
+ /* Handle stuff */
+ handle_stuff();
+ }
+
 }


