sound cleanup
+ Separate the two uses of flags.soundok. + Player-settable option is now called "acoustics". + Deafness is now handled as a full-fledged attribute. + Check for deafness in You_hear(), rather than caller. + Check for deafness in caller, rather than verbalize(), because gods can speak to characters in spite of deafness. + Since changes are being made to prop.h, reorder it to the same order as youprop.h and enlightenment. There are still some extraneous checks and missing checks for deafness, which will be followed up in a future patch. Because of the size of this patch and its savefile incompatibilities, it is only being applied to the trunk code. Portions of this patch were written by Michael Allison.
This commit is contained in:
@@ -275,6 +275,11 @@ nh_timeout()
|
||||
make_blinded(0L, TRUE);
|
||||
stop_occupation();
|
||||
break;
|
||||
case DEAF:
|
||||
if (!Deaf)
|
||||
You("can hear again.");
|
||||
stop_occupation();
|
||||
break;
|
||||
case INVIS:
|
||||
newsym(u.ux,u.uy);
|
||||
if (!Invis && !BInvis && !Blind) {
|
||||
@@ -359,7 +364,7 @@ boolean wakeup_msg;
|
||||
if (wakeup_msg && multi == how_long) {
|
||||
/* caller can follow with a direct call to Hear_again() if
|
||||
there's a need to override this when wakeup_msg is true */
|
||||
flags.soundok = 0;
|
||||
incr_itimeout(&HDeaf, how_long);
|
||||
afternmv = Hear_again; /* this won't give any messages */
|
||||
}
|
||||
/* early wakeup from combat won't be possible until next monster turn */
|
||||
@@ -512,7 +517,7 @@ long timeout;
|
||||
siblings ? "Their" : "Its",
|
||||
flags.female ? "mommy" : "daddy",
|
||||
egg->spe ? "." : "?");
|
||||
} else if (mon->data->mlet == S_DRAGON) {
|
||||
} else if (mon->data->mlet == S_DRAGON && !Deaf) {
|
||||
verbalize("Gleep!"); /* Mything eggs :-) */
|
||||
}
|
||||
break;
|
||||
@@ -1199,8 +1204,10 @@ do_storms()
|
||||
}
|
||||
|
||||
if(levl[u.ux][u.uy].typ == CLOUD) {
|
||||
/* inside a cloud during a thunder storm is deafening */
|
||||
/* Inside a cloud during a thunder storm is deafening. */
|
||||
/* Even if already deaf, we sense the thunder's vibrations. */
|
||||
pline("Kaboom!!! Boom!! Boom!!");
|
||||
incr_itimeout(&HDeaf, rn1(20,30));
|
||||
if(!u.uinvulnerable) {
|
||||
stop_occupation();
|
||||
nomul(-3);
|
||||
|
||||
Reference in New Issue
Block a user