]> granicus.if.org Git - nethack/commitdiff
Make boulder dropping noise wake up monsters
authorPasi Kallinen <paxed@alt.org>
Sat, 14 Oct 2017 18:29:17 +0000 (21:29 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 14 Oct 2017 18:29:20 +0000 (21:29 +0300)
Also, don't bother waking up monsters who would end up dead anyway.

src/read.c

index ad1c75f370b37f41b7bd59688a3b69f1d88c9633..29513f7ef7d3906527c442e8e27a6c8b51814297 100644 (file)
@@ -1714,6 +1714,7 @@ boolean confused, helmet_protects, byu, skip_uswallow;
         }
     } else
         dmg = 0;
+    wake_nearto(u.ux, u.uy, 4 * 4);
     /* Must be before the losehp(), for bones files */
     if (!flooreffects(otmp2, u.ux, u.uy, "fall")) {
         place_object(otmp2, u.ux, u.uy);
@@ -1771,7 +1772,6 @@ boolean confused, byu;
                           xname(helmet), mhim(mtmp));
             }
         }
-        wakeup(mtmp, byu);
         mtmp->mhp -= mdmg;
         if (mtmp->mhp <= 0) {
             if (byu) {
@@ -1780,7 +1780,10 @@ boolean confused, byu;
                 pline("%s is killed.", Monnam(mtmp));
                 mondied(mtmp);
             }
+        } else {
+            wakeup(mtmp, byu);
         }
+        wake_nearto(x, y, 4 * 4);
     } else if (u.uswallow && mtmp == u.ustuck) {
         obfree(otmp2, (struct obj *) 0);
         /* fall through to player */