]> granicus.if.org Git - nethack/commitdiff
Move output delay from walk_path to mhurtle_step
authorPasi Kallinen <paxed@alt.org>
Thu, 24 Feb 2022 17:50:27 +0000 (19:50 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 24 Feb 2022 17:50:37 +0000 (19:50 +0200)
... in case walk_path is ever used for something that
doesn't need the delay.  The hero hurtling already had
delay, so it was done twice.

src/dothrow.c

index d71b42e12437c36cc54c85eb5e1186687889c447..003830fe464b5c1ee52c450a04d3d3f33d6563e5 100644 (file)
@@ -637,8 +637,6 @@ walk_path(coord *src_cc, coord *dest_cc,
             /* check for early exit condition */
             if (!(keep_going = (*check_proc)(arg, x, y)))
                 break;
-            flush_screen(1);
-            delay_output();
         }
     } else {
         while (i++ < dx) {
@@ -653,8 +651,6 @@ walk_path(coord *src_cc, coord *dest_cc,
             /* check for early exit condition */
             if (!(keep_going = (*check_proc)(arg, x, y)))
                 break;
-            flush_screen(1);
-            delay_output();
         }
     }
 
@@ -926,6 +922,9 @@ mhurtle_step(genericptr_t arg, int x, int y)
             || res == Trap_Caught_Mon
             || res == Trap_Moved_Mon)
             return FALSE;
+
+        flush_screen(1);
+        delay_output();
         return TRUE;
     }
     if ((mtmp = m_at(x, y)) != 0 && (canseemon(mon) || canseemon(mtmp))) {