bundle the display-related hints, that tell bot() and others

that an update is required, into a struct. Remove it from
context since there is no reason to save those.
This commit is contained in:
nhmall
2024-01-04 23:16:27 -05:00
parent 9bcff7b896
commit 22e52ee905
46 changed files with 246 additions and 238 deletions

View File

@@ -2320,7 +2320,7 @@ use_unicorn_horn(struct obj **optr)
}
if (did_prop)
gc.context.botl = TRUE;
display.botl = TRUE;
else
pline("%s", nothing_seems_to_happen);
@@ -3917,11 +3917,11 @@ do_break_wand(struct obj *obj)
*/
if ((mon = m_at(x, y)) != 0) {
(void) bhitm(mon, obj);
/* if (gc.context.botl) bot(); */
/* if (display.botl) bot(); */
}
if (affects_objects && gl.level.objects[x][y]) {
(void) bhitpile(obj, bhito, x, y, 0);
if (gc.context.botl)
if (display.botl)
bot(); /* potion effects */
}
} else {
@@ -3939,7 +3939,7 @@ do_break_wand(struct obj *obj)
*/
if (affects_objects && gl.level.objects[x][y]) {
(void) bhitpile(obj, bhito, x, y, 0);
if (gc.context.botl)
if (display.botl)
bot(); /* potion effects */
}
damage = zapyourself(obj, FALSE);
@@ -3947,7 +3947,7 @@ do_break_wand(struct obj *obj)
Sprintf(buf, "killed %sself by breaking a wand", uhim());
losehp(Maybe_Half_Phys(damage), buf, NO_KILLER_PREFIX);
}
if (gc.context.botl)
if (display.botl)
bot(); /* blindness */
}
}