Move output delay from walk_path to mhurtle_step

... 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.
This commit is contained in:
Pasi Kallinen
2022-02-24 19:50:27 +02:00
parent 0c20bf116c
commit 6fa4fd46f7

View 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))) {