]> granicus.if.org Git - nethack/commitdiff
Fix mon weapon inconsistency when monster got disintegrated
authorPasi Kallinen <paxed@alt.org>
Sat, 24 Oct 2015 06:19:35 +0000 (09:19 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 24 Oct 2015 06:30:38 +0000 (09:30 +0300)
This happened when the monster, who was wielding a weapon, got hit
by a disintegration blast, and then lifesaved by a worn amulet.

src/zap.c

index 106f9bfc2fa99950871a4082a43cb4625a35cc84..67b7977ea354a9e9e00e77c48737b32455f84b2c 100644 (file)
--- 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;