From: nethack.rankin Date: Mon, 30 Apr 2012 22:00:25 +0000 (+0000) Subject: magic whistle vs steed X-Git-Tag: MOVE2GIT~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=889e3fa0b62c241d38e4173fc4ef9bbabd28330a;p=nethack magic whistle vs steed From a bug report, using a magic whistle when you're mounted and standing on a trap location would cause your steed to trigger the trap even though it didn't move. Since it is already at the same place as you, make steed be unaffected by magic whistle so that trap complications can be avoided. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5badb34e9..968fa79fd 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -833,6 +833,7 @@ wizard mode ^F on Plane of Water marked portal as seen but didn't display it magic mapping now displays furniture in preference to known or remembered traps or objects and known traps in preference to remembered objects restrictions on diagonal movement were ignored when crawling out of water +when using magic whistle, prevent steed from being affected (trap interaction) Platform- and/or Interface-Specific Fixes diff --git a/src/apply.c b/src/apply.c index dc2245cd1..1b0c001a1 100644 --- a/src/apply.c +++ b/src/apply.c @@ -441,6 +441,11 @@ struct obj *obj; for(mtmp = fmon; mtmp; mtmp = nextmon) { nextmon = mtmp->nmon; /* trap might kill mon */ if (DEADMONSTER(mtmp)) continue; +#ifdef STEED + /* steed is already at your location, so not affected; + this avoids trap issues if you're on a trap location */ + if (mtmp == u.usteed) continue; +#endif if (mtmp->mtame) { if (mtmp->mtrapped) { /* no longer in previous trap (affects mintrap) */