if(max_dlv[i] > max_dl)
max_dl = max_dlv[i];
- point_l = (p_ptr->max_exp + (100 * max_dl));
+ point_l = (p_ptr->max_max_exp + (100 * max_dl));
point_h = point_l / 0x10000L;
point_l = point_l % 0x10000L;
point_h *= mult;
rd_s32b(&p_ptr->au);
rd_s32b(&p_ptr->max_exp);
+ if (h_older_than(1, 5, 4, 1)) p_ptr->max_max_exp = p_ptr->max_exp;
+ else rd_s32b(&p_ptr->max_max_exp);
rd_s32b(&p_ptr->exp);
rd_u16b(&p_ptr->exp_frac);
s32b au; /* Current Gold */
+ s32b max_max_exp; /* Max max experience (only to calculate score) */
s32b max_exp; /* Max experience */
s32b exp; /* Cur experience */
u16b exp_frac; /* Cur exp frac (times 2^16) */
/* Hack -- lower limit */
if (p_ptr->exp < 0) p_ptr->exp = 0;
-
- /* Hack -- lower limit */
if (p_ptr->max_exp < 0) p_ptr->max_exp = 0;
+ if (p_ptr->max_max_exp < 0) p_ptr->max_max_exp = 0;
/* Hack -- upper limit */
if (p_ptr->exp > PY_MAX_EXP) p_ptr->exp = PY_MAX_EXP;
-
- /* Hack -- upper limit */
if (p_ptr->max_exp > PY_MAX_EXP) p_ptr->max_exp = PY_MAX_EXP;
+ if (p_ptr->max_max_exp > PY_MAX_EXP) p_ptr->max_max_exp = PY_MAX_EXP;
/* Hack -- maintain "max" experience */
if (p_ptr->exp > p_ptr->max_exp) p_ptr->max_exp = p_ptr->exp;
+ /* Hack -- maintain "max max" experience */
+ if (p_ptr->max_exp > p_ptr->max_max_exp) p_ptr->max_max_exp = p_ptr->max_exp;
+
/* Redraw experience */
p_ptr->redraw |= (PR_EXP);