From 91dc1ea834a3fb00f42543c9f55d9dbf2417e293 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 15 Feb 2023 11:24:01 +0200 Subject: [PATCH] Fix angering monsters with non-hero magic rays Can't use gc.context.mon_moving to check if the ray was caused by hero, as some rays can happen while hero is moving in response to their action - for example a bolt of lightning from a god. dobuzz() uses positive type values for magic rays caused by hero, so just use that. --- src/zap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zap.c b/src/zap.c index fa236d03a..c37daf8e2 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4482,7 +4482,7 @@ dobuzz( if (mon_could_move && !mon->mcanmove) /* ZT_SLEEP */ slept_monst(mon); if (abstype != ZT_SLEEP) - wakeup(mon, !gc.context.mon_moving); + wakeup(mon, (type >= 0) ? TRUE : FALSE); } } range -= 2;