]> granicus.if.org Git - nethack/commitdiff
Don't 'fall' and self-stone when flying down
authorMichael Meyer <me@entrez.cc>
Fri, 14 Jan 2022 16:48:46 +0000 (11:48 -0500)
committerMichael Meyer <me@entrez.cc>
Fri, 14 Jan 2022 16:53:37 +0000 (11:53 -0500)
When a flying hero deliberately "swoops" through a trap door or hole,
consider the movement down to the next level to be controlled flight
rather than falling, preventing the sort of inadvertent touching of a
carried cockatrice corpse that happens when falling between levels.

src/trap.c

index e600b18719bd05d22f2fe09959de37a3201639b2..4d5de461391705af9be3ca27434ad33420fe85cd 100644 (file)
@@ -563,7 +563,7 @@ fall_through(
         Sprintf(msgbuf, "The hole in the %s above you closes up.",
                 ceiling(u.ux, u.uy));
 
-    schedule_goto(&dtmp, UTOTYPE_FALLING, (char *) 0,
+    schedule_goto(&dtmp, !Flying ? UTOTYPE_FALLING : UTOTYPE_NONE, (char *) 0,
                   !td ? msgbuf : (char *) 0);
 }