Pets considered any noise made by hero as whistling

In 3.6.2 parts of the wakeup code were merged together, and this
caused pets consider any noise made by the hero - such as hitting
iron bars or digging - as whistling for them to come to the hero.

Change it to only consider actual whistling and ringing a bell.
This commit is contained in:
Pasi Kallinen
2024-04-03 12:42:38 +03:00
parent 6aaab97044
commit defb5d5f80
10 changed files with 31 additions and 23 deletions

View File

@@ -1374,7 +1374,7 @@ trapeffect_sqky_board(
Deaf ? "vibrates" : "squeaks ",
Deaf ? "" : trapnote(trap, FALSE),
Deaf ? "" : " loudly");
wake_nearby();
wake_nearby(FALSE);
}
} else {
boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
@@ -6119,7 +6119,7 @@ chest_trap(
(boolean) shkp->mpeaceful, TRUE);
delobj(otmp);
}
wake_nearby();
wake_nearby(FALSE);
losehp(Maybe_Half_Phys(d(6, 6)), buf, KILLED_BY_AN);
exercise(A_STR, FALSE);
if (costly && loss) {
@@ -6418,7 +6418,7 @@ b_trapped(const char *item, int bodypart)
Soundeffect(se_kaboom, 80);
pline("KABOOM!! %s was booby-trapped!", The(item));
wake_nearby();
wake_nearby(FALSE);
losehp(Maybe_Half_Phys(dmg), "explosion", KILLED_BY_AN);
exercise(A_STR, FALSE);
if (bodypart != NO_PART)