From 5558d62aa8d9a7d8d900d3f0f0718bb0846cac5d Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Tue, 20 Feb 2018 21:53:27 +0000 Subject: [PATCH] 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. --- src/mon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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. */