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:
@@ -1390,6 +1390,7 @@ don't self-genocide if a monk picks "master-lich" or "masterlich" as target
|
|||||||
(was matching "Master" rank)
|
(was matching "Master" rank)
|
||||||
Sunsword can be invoked to create a blinding ray
|
Sunsword can be invoked to create a blinding ray
|
||||||
Excalibur is much harder to get if hero is not a knight
|
Excalibur is much harder to get if hero is not a knight
|
||||||
|
pets considered any noise made by hero made as whistling
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
+1
-1
@@ -1716,7 +1716,7 @@ extern void m_respond(struct monst *) NONNULLARG1;
|
|||||||
extern void setmangry(struct monst *, boolean) NONNULLARG1;
|
extern void setmangry(struct monst *, boolean) NONNULLARG1;
|
||||||
extern void wake_msg(struct monst *, boolean) NONNULLARG1;
|
extern void wake_msg(struct monst *, boolean) NONNULLARG1;
|
||||||
extern void wakeup(struct monst *, boolean) NONNULLARG1;
|
extern void wakeup(struct monst *, boolean) NONNULLARG1;
|
||||||
extern void wake_nearby(void);
|
extern void wake_nearby(boolean);
|
||||||
extern void wake_nearto(coordxy, coordxy, int);
|
extern void wake_nearto(coordxy, coordxy, int);
|
||||||
extern void seemimic(struct monst *) NONNULLARG1;
|
extern void seemimic(struct monst *) NONNULLARG1;
|
||||||
extern void normal_shape(struct monst *) NONNULLARG1;
|
extern void normal_shape(struct monst *) NONNULLARG1;
|
||||||
|
|||||||
+3
-3
@@ -478,7 +478,7 @@ use_whistle(struct obj *obj)
|
|||||||
else
|
else
|
||||||
You(whistle_str, obj->cursed ? "shrill" : "high");
|
You(whistle_str, obj->cursed ? "shrill" : "high");
|
||||||
Soundeffect(se_shrill_whistle, 50);
|
Soundeffect(se_shrill_whistle, 50);
|
||||||
wake_nearby();
|
wake_nearby(TRUE);
|
||||||
if (obj->cursed)
|
if (obj->cursed)
|
||||||
vault_summon_gd();
|
vault_summon_gd();
|
||||||
}
|
}
|
||||||
@@ -492,7 +492,7 @@ use_magic_whistle(struct obj *obj)
|
|||||||
} else if (obj->cursed && !rn2(2)) {
|
} else if (obj->cursed && !rn2(2)) {
|
||||||
You("produce a %shigh-%s.", Underwater ? "very " : "",
|
You("produce a %shigh-%s.", Underwater ? "very " : "",
|
||||||
Deaf ? "frequency vibration" : "pitched humming noise");
|
Deaf ? "frequency vibration" : "pitched humming noise");
|
||||||
wake_nearby();
|
wake_nearby(TRUE);
|
||||||
} else {
|
} else {
|
||||||
/* it's magic! it works underwater too (at a higher pitch) */
|
/* it's magic! it works underwater too (at a higher pitch) */
|
||||||
You(Deaf ? alt_whistle_str : whistle_str,
|
You(Deaf ? alt_whistle_str : whistle_str,
|
||||||
@@ -1296,7 +1296,7 @@ use_bell(struct obj **optr)
|
|||||||
obj->known = 1;
|
obj->known = 1;
|
||||||
}
|
}
|
||||||
if (wakem)
|
if (wakem)
|
||||||
wake_nearby();
|
wake_nearby(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
staticfn void
|
staticfn void
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ dig(void)
|
|||||||
Soundeffect(se_bang_weapon_side, 100);
|
Soundeffect(se_bang_weapon_side, 100);
|
||||||
pline("Bang! You hit with the broad side of %s!",
|
pline("Bang! You hit with the broad side of %s!",
|
||||||
the(xname(uwep)));
|
the(xname(uwep)));
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Your("swing misses its mark.");
|
Your("swing misses its mark.");
|
||||||
@@ -511,7 +511,7 @@ dig(void)
|
|||||||
|
|
||||||
if (!gd.did_dig_msg) {
|
if (!gd.did_dig_msg) {
|
||||||
You("hit the %s with all your might.", d_target[dig_target]);
|
You("hit the %s with all your might.", d_target[dig_target]);
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
gd.did_dig_msg = TRUE;
|
gd.did_dig_msg = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -674,7 +674,7 @@ digactualhole(coordxy x, coordxy y, struct monst *madeby, int ttyp)
|
|||||||
else
|
else
|
||||||
add_damage(x, y, heros_fault ? SHOP_PIT_COST : 0L);
|
add_damage(x, y, heros_fault ? SHOP_PIT_COST : 0L);
|
||||||
if (madeby_u)
|
if (madeby_u)
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
/* in case we're digging down while encased in solid rock
|
/* in case we're digging down while encased in solid rock
|
||||||
which is blocking levitation or flight */
|
which is blocking levitation or flight */
|
||||||
switch_terrain();
|
switch_terrain();
|
||||||
@@ -864,7 +864,7 @@ dighole(boolean pit_only, boolean by_magic, coord *cc)
|
|||||||
} else if (is_pool_or_lava(dig_x, dig_y)) {
|
} else if (is_pool_or_lava(dig_x, dig_y)) {
|
||||||
pline_The("%s sloshes furiously for a moment, then subsides.",
|
pline_The("%s sloshes furiously for a moment, then subsides.",
|
||||||
hliquid(is_lava(dig_x, dig_y) ? "lava" : "water"));
|
hliquid(is_lava(dig_x, dig_y) ? "lava" : "water"));
|
||||||
wake_nearby(); /* splashing */
|
wake_nearby(FALSE); /* splashing */
|
||||||
|
|
||||||
} else if (old_typ == DRAWBRIDGE_DOWN
|
} else if (old_typ == DRAWBRIDGE_DOWN
|
||||||
|| (is_drawbridge_wall(dig_x, dig_y) >= 0)) {
|
|| (is_drawbridge_wall(dig_x, dig_y) >= 0)) {
|
||||||
@@ -894,7 +894,7 @@ dighole(boolean pit_only, boolean by_magic, coord *cc)
|
|||||||
*/
|
*/
|
||||||
Soundeffect(se_kadoom_boulder_falls_in, 60);
|
Soundeffect(se_kadoom_boulder_falls_in, 60);
|
||||||
pline("KADOOM! The boulder falls in!");
|
pline("KADOOM! The boulder falls in!");
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
(void) delfloortrap(ttmp);
|
(void) delfloortrap(ttmp);
|
||||||
}
|
}
|
||||||
delobj(boulder_here);
|
delobj(boulder_here);
|
||||||
@@ -1160,7 +1160,7 @@ use_pick_axe2(struct obj *obj)
|
|||||||
gn.nomovemsg = "You pull free.";
|
gn.nomovemsg = "You pull free.";
|
||||||
} else if (lev->typ == IRONBARS) {
|
} else if (lev->typ == IRONBARS) {
|
||||||
pline("Clang!");
|
pline("Clang!");
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
} else if (IS_WATERWALL(lev->typ)) {
|
} else if (IS_WATERWALL(lev->typ)) {
|
||||||
pline("Splash!");
|
pline("Splash!");
|
||||||
} else if (lev->typ == LAVAWALL) {
|
} else if (lev->typ == LAVAWALL) {
|
||||||
@@ -1185,7 +1185,7 @@ use_pick_axe2(struct obj *obj)
|
|||||||
if (vibrate)
|
if (vibrate)
|
||||||
losehp(Maybe_Half_Phys(2), "axing a hard object",
|
losehp(Maybe_Half_Phys(2), "axing a hard object",
|
||||||
KILLED_BY);
|
KILLED_BY);
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
} else {
|
} else {
|
||||||
/* using a pick but dig_target is DIGTYPE_UNDIGGABLE
|
/* using a pick but dig_target is DIGTYPE_UNDIGGABLE
|
||||||
and there is at least one boulder or statue or both
|
and there is at least one boulder or statue or both
|
||||||
|
|||||||
+1
-1
@@ -1366,7 +1366,7 @@ dokick(void)
|
|||||||
return (gc.context.move ? ECMD_TIME : ECMD_OK);
|
return (gc.context.move ? ECMD_TIME : ECMD_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
u_wipe_engr(2);
|
u_wipe_engr(2);
|
||||||
|
|
||||||
if (!isok(x, y)) {
|
if (!isok(x, y)) {
|
||||||
|
|||||||
+1
-1
@@ -234,7 +234,7 @@ forcelock(void)
|
|||||||
return ((gx.xlock.usedtime = 0));
|
return ((gx.xlock.usedtime = 0));
|
||||||
}
|
}
|
||||||
} else /* blunt */
|
} else /* blunt */
|
||||||
wake_nearby(); /* due to hammering on the container */
|
wake_nearby(FALSE); /* due to hammering on the container */
|
||||||
|
|
||||||
if (rn2(100) >= gx.xlock.chance)
|
if (rn2(100) >= gx.xlock.chance)
|
||||||
return 1; /* still busy */
|
return 1; /* still busy */
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ staticfn void logdeadmon(struct monst *, int);
|
|||||||
staticfn boolean ok_to_obliterate(struct monst *);
|
staticfn boolean ok_to_obliterate(struct monst *);
|
||||||
staticfn void qst_guardians_respond(void);
|
staticfn void qst_guardians_respond(void);
|
||||||
staticfn void peacefuls_respond(struct monst *);
|
staticfn void peacefuls_respond(struct monst *);
|
||||||
|
staticfn void wake_nearto_core(coordxy, coordxy, int, boolean);
|
||||||
staticfn void m_restartcham(struct monst *);
|
staticfn void m_restartcham(struct monst *);
|
||||||
staticfn boolean restrap(struct monst *);
|
staticfn boolean restrap(struct monst *);
|
||||||
staticfn int pick_animal(void);
|
staticfn int pick_animal(void);
|
||||||
@@ -4011,14 +4012,14 @@ wakeup(struct monst *mtmp, boolean via_attack)
|
|||||||
|
|
||||||
/* Wake up nearby monsters without angering them. */
|
/* Wake up nearby monsters without angering them. */
|
||||||
void
|
void
|
||||||
wake_nearby(void)
|
wake_nearby(boolean petcall)
|
||||||
{
|
{
|
||||||
wake_nearto(u.ux, u.uy, u.ulevel * 20);
|
wake_nearto_core(u.ux, u.uy, u.ulevel * 20, petcall);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wake up monsters near some particular location. */
|
/* Wake up monsters near some particular location. */
|
||||||
void
|
staticfn void
|
||||||
wake_nearto(coordxy x, coordxy y, int distance)
|
wake_nearto_core(coordxy x, coordxy y, int distance, boolean petcall)
|
||||||
{
|
{
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
@@ -4032,7 +4033,7 @@ wake_nearto(coordxy x, coordxy y, int distance)
|
|||||||
mtmp->msleeping = 0; /* wake indeterminate sleep */
|
mtmp->msleeping = 0; /* wake indeterminate sleep */
|
||||||
if (!(mtmp->data->geno & G_UNIQ))
|
if (!(mtmp->data->geno & G_UNIQ))
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK; /* wake 'meditation' */
|
mtmp->mstrategy &= ~STRAT_WAITMASK; /* wake 'meditation' */
|
||||||
if (gc.context.mon_moving)
|
if (gc.context.mon_moving || !petcall)
|
||||||
continue;
|
continue;
|
||||||
if (mtmp->mtame) {
|
if (mtmp->mtame) {
|
||||||
if (!mtmp->isminion)
|
if (!mtmp->isminion)
|
||||||
@@ -4045,6 +4046,12 @@ wake_nearto(coordxy x, coordxy y, int distance)
|
|||||||
disturb_buried_zombies(x, y);
|
disturb_buried_zombies(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
wake_nearto(coordxy x, coordxy y, int distance)
|
||||||
|
{
|
||||||
|
wake_nearto_core(x, y, distance, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/* NOTE: we must check for mimicry before calling this routine */
|
/* NOTE: we must check for mimicry before calling this routine */
|
||||||
void
|
void
|
||||||
seemimic(struct monst *mtmp)
|
seemimic(struct monst *mtmp)
|
||||||
|
|||||||
+1
-1
@@ -2193,7 +2193,7 @@ prayer_done(void) /* M. Stephenson (1.0.3b) */
|
|||||||
/* praying at an unaligned altar, not necessarily in Gehennom */
|
/* praying at an unaligned altar, not necessarily in Gehennom */
|
||||||
You("%s diabolical laughter all around you...",
|
You("%s diabolical laughter all around you...",
|
||||||
!Deaf ? "hear" : "intuit");
|
!Deaf ? "hear" : "intuit");
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
adjalign(-2);
|
adjalign(-2);
|
||||||
exercise(A_WIS, FALSE);
|
exercise(A_WIS, FALSE);
|
||||||
if (!Inhell) {
|
if (!Inhell) {
|
||||||
|
|||||||
+1
-1
@@ -871,7 +871,7 @@ nh_timeout(void)
|
|||||||
if ((inv_weight() > -500)) {
|
if ((inv_weight() > -500)) {
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
You("make a lot of noise!");
|
You("make a lot of noise!");
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* from outside means slippery ice; don't reset
|
/* from outside means slippery ice; don't reset
|
||||||
|
|||||||
+3
-3
@@ -1374,7 +1374,7 @@ trapeffect_sqky_board(
|
|||||||
Deaf ? "vibrates" : "squeaks ",
|
Deaf ? "vibrates" : "squeaks ",
|
||||||
Deaf ? "" : trapnote(trap, FALSE),
|
Deaf ? "" : trapnote(trap, FALSE),
|
||||||
Deaf ? "" : " loudly");
|
Deaf ? "" : " loudly");
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
|
boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
|
||||||
@@ -6119,7 +6119,7 @@ chest_trap(
|
|||||||
(boolean) shkp->mpeaceful, TRUE);
|
(boolean) shkp->mpeaceful, TRUE);
|
||||||
delobj(otmp);
|
delobj(otmp);
|
||||||
}
|
}
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
losehp(Maybe_Half_Phys(d(6, 6)), buf, KILLED_BY_AN);
|
losehp(Maybe_Half_Phys(d(6, 6)), buf, KILLED_BY_AN);
|
||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
if (costly && loss) {
|
if (costly && loss) {
|
||||||
@@ -6418,7 +6418,7 @@ b_trapped(const char *item, int bodypart)
|
|||||||
|
|
||||||
Soundeffect(se_kaboom, 80);
|
Soundeffect(se_kaboom, 80);
|
||||||
pline("KABOOM!! %s was booby-trapped!", The(item));
|
pline("KABOOM!! %s was booby-trapped!", The(item));
|
||||||
wake_nearby();
|
wake_nearby(FALSE);
|
||||||
losehp(Maybe_Half_Phys(dmg), "explosion", KILLED_BY_AN);
|
losehp(Maybe_Half_Phys(dmg), "explosion", KILLED_BY_AN);
|
||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
if (bodypart != NO_PART)
|
if (bodypart != NO_PART)
|
||||||
|
|||||||
Reference in New Issue
Block a user