From 529de54277268ecd655bc3f103dc3eb1dd3f48d7 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 3 Oct 2024 23:15:24 -0700 Subject: [PATCH] spot_monster messages while saving The 'spot_monster' option (extra feedback for "accessibility") was causing messages to be delivered during save, and they could end up triggering unwanted "--More--" interruptions for tty. I couldn't reproduce it but it was easy to see where it would happen. This shuts such messages off in two ways. Only one should be needed but I'm not sure which one it ought to be. --- src/display.c | 4 ++++ src/save.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/display.c b/src/display.c index 71ce67766..19e60d41c 100644 --- a/src/display.c +++ b/src/display.c @@ -1853,6 +1853,10 @@ show_glyph(coordxy x, coordxy y, int glyph) boolean show_glyph_change = FALSE; int oldglyph; + /* don't process map glyphs when saving, restoring, or in_mklev */ + if (suppress_map_output()) + return; + //if (glyph == 3972 || glyph == 3988) // __debugbreak(); /* diff --git a/src/save.c b/src/save.c index f3ea97a62..0f194ba34 100644 --- a/src/save.c +++ b/src/save.c @@ -87,6 +87,7 @@ dosave0(void) int res = 0; program_state.saving++; /* inhibit status and perm_invent updates */ + notice_mon_off(); /* we may get here via hangup signal, in which case we want to fix up a few of things before saving so that they won't be restored in an improper state; these will be no-ops for normal save sequence */ @@ -234,6 +235,7 @@ dosave0(void) res = 1; done: + notice_mon_on(); program_state.saving--; return res; }