Make boulder dropping noise wake up monsters

Also, don't bother waking up monsters who would end up dead anyway.
This commit is contained in:
Pasi Kallinen
2017-10-14 21:29:20 +03:00
parent 7d8ba1d46f
commit 612a0cb909
+4 -1
View File
@@ -1714,6 +1714,7 @@ boolean confused, helmet_protects, byu, skip_uswallow;
} }
} else } else
dmg = 0; dmg = 0;
wake_nearto(u.ux, u.uy, 4 * 4);
/* Must be before the losehp(), for bones files */ /* Must be before the losehp(), for bones files */
if (!flooreffects(otmp2, u.ux, u.uy, "fall")) { if (!flooreffects(otmp2, u.ux, u.uy, "fall")) {
place_object(otmp2, u.ux, u.uy); place_object(otmp2, u.ux, u.uy);
@@ -1771,7 +1772,6 @@ boolean confused, byu;
xname(helmet), mhim(mtmp)); xname(helmet), mhim(mtmp));
} }
} }
wakeup(mtmp, byu);
mtmp->mhp -= mdmg; mtmp->mhp -= mdmg;
if (mtmp->mhp <= 0) { if (mtmp->mhp <= 0) {
if (byu) { if (byu) {
@@ -1780,7 +1780,10 @@ boolean confused, byu;
pline("%s is killed.", Monnam(mtmp)); pline("%s is killed.", Monnam(mtmp));
mondied(mtmp); mondied(mtmp);
} }
} else {
wakeup(mtmp, byu);
} }
wake_nearto(x, y, 4 * 4);
} else if (u.uswallow && mtmp == u.ustuck) { } else if (u.uswallow && mtmp == u.ustuck) {
obfree(otmp2, (struct obj *) 0); obfree(otmp2, (struct obj *) 0);
/* fall through to player */ /* fall through to player */