]> granicus.if.org Git - nethack/commitdiff
magic whistle vs steed
authornethack.rankin <nethack.rankin>
Mon, 30 Apr 2012 22:00:25 +0000 (22:00 +0000)
committernethack.rankin <nethack.rankin>
Mon, 30 Apr 2012 22:00:25 +0000 (22:00 +0000)
     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.

doc/fixes35.0
src/apply.c

index 5badb34e980f9cd66a76c2dd48241aaf060f52b1..968fa79fd3af90f7ec3fb106986f7ec6e374b7d5 100644 (file)
@@ -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
index dc2245cd14f96df0664934957db58a8372d11c97..1b0c001a1d67a9b5935662bd8a48b9958f0453a2 100644 (file)
@@ -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) */