From: Alex Smith Date: Tue, 20 Feb 2018 21:53:27 +0000 (+0000) Subject: Wake up monsters, and let them stop eating, before angering them X-Git-Tag: NetHack-3.6.1_RC01~178 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5558d62aa8d9a7d8d900d3f0f0718bb0846cac5d;p=nethack Wake up monsters, and let them stop eating, before angering them If we do it the other way round, then mimics will forget what they're mimicking without a seemimic() call, meaning that the line-of-sight calculations can get confused if the mimic was mimicking something opaque. --- diff --git a/src/mon.c b/src/mon.c index 62fb34a8f..7e82ba651 100644 --- a/src/mon.c +++ b/src/mon.c @@ -2751,7 +2751,6 @@ boolean via_attack; } } } - } /* wake up a monster, possibly making it angry in the process */ @@ -2761,9 +2760,6 @@ register struct monst *mtmp; boolean via_attack; { mtmp->msleeping = 0; - finish_meating(mtmp); - if (via_attack) - setmangry(mtmp, TRUE); if (mtmp->m_ap_type) { seemimic(mtmp); } else if (context.forcefight && !context.mon_moving @@ -2771,6 +2767,9 @@ boolean via_attack; mtmp->mundetected = 0; newsym(mtmp->mx, mtmp->my); } + finish_meating(mtmp); + if (via_attack) + setmangry(mtmp, TRUE); } /* Wake up nearby monsters without angering them. */