From: Pasi Kallinen Date: Sat, 24 Oct 2015 06:19:35 +0000 (+0300) Subject: Fix mon weapon inconsistency when monster got disintegrated X-Git-Tag: NetHack-3.6.0_RC01~133 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fd92e3ef8b79311a8a84370a9b9fe5b27b6ffc2;p=nethack Fix mon weapon inconsistency when monster got disintegrated This happened when the monster, who was wielding a weapon, got hit by a disintegration blast, and then lifesaved by a worn amulet. --- diff --git a/src/zap.c b/src/zap.c index 106f9bfc2..67b7977ea 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3765,6 +3765,8 @@ const char *fltxt; if (otmp->owornmask) { /* in case monster's life gets saved */ mon->misc_worn_check &= ~otmp->owornmask; + if (otmp->owornmask & W_WEP) + setmnotwielded(mon, otmp); /* also dismounts hero if this object is steed's saddle */ update_mon_intrinsics(mon, otmp, FALSE, TRUE); otmp->owornmask = 0L;