]> granicus.if.org Git - nethack/commitdiff
Apply runmode to multiturn actions
authorPasi Kallinen <paxed@alt.org>
Tue, 21 Dec 2021 15:37:48 +0000 (17:37 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 21 Dec 2021 15:37:48 +0000 (17:37 +0200)
doc/fixes37.0
include/extern.h
src/allmain.c
src/hack.c

index 6eaba8930acc569eea6d88f68173b01c6b0dfa6d..48e6948a65a55f5cb7d0126e151d76b194a78430 100644 (file)
@@ -720,6 +720,7 @@ if a leashed pet changed name (#name m) or an unnamed pet changed type
 attack feedback when using a bullwhip said "swing"; change to "lash"
 attack feedback for monster using polearm when adjacent said "thrust"; change
        to "bash"
+apply runmode delay to multiturn actions, not just running
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index dacabbb849d1a7596268a1b15f6c26732d3dc1d4..3fd48ac1db6d72e3b0312afbcfac9e44e6c2b23a 100644 (file)
@@ -874,6 +874,7 @@ extern int wiz_debug_cmd_traveldisplay(void);
 #endif
 extern boolean u_rooted(void);
 extern void domove(void);
+extern void runmode_delay_output(void);
 extern void overexert_hp(void);
 extern boolean overexertion(void);
 extern void invocation_message(void);
index fc7c7e39938b8f8eca9d0ee1f34a6f7f2740d0a5..0ef1108ef18b6416d5e9a7ce804fb9ea97706cc4 100644 (file)
@@ -336,6 +336,7 @@ moveloop_core(void)
 
                 /* when immobile, count is in turns */
                 if (g.multi < 0) {
+                    runmode_delay_output();
                     if (++g.multi == 0) { /* finished yet? */
                         unmul((char *) 0);
                         /* if unmul caused a level change, take it now */
@@ -433,10 +434,7 @@ moveloop_core(void)
             stop_occupation();
             reset_eat();
         }
-#if defined(MICRO) || defined(WIN32)
-        if (!(++g.occtime % 7))
-            display_nhwindow(WIN_MAP, FALSE);
-#endif
+        runmode_delay_output();
         return;
     }
 
@@ -449,6 +447,7 @@ moveloop_core(void)
 
     if (g.multi > 0) {
         lookaround();
+        runmode_delay_output();
         if (!g.multi) {
             /* lookaround may clear multi */
             g.context.move = 0;
index 6ffe51c7517a8cfcf7156711620216faade71060..4942c4cdbf3e97fbdc951f0f8c07b712ab7797c5 100644 (file)
@@ -2141,7 +2141,15 @@ domove_core(void)
         g.nomovemsg = "";
     }
 
-    if (g.context.run && flags.runmode != RUN_TPORT) {
+    runmode_delay_output();
+}
+
+/* delay output based on value of runmode,
+   if hero is running or doing a multi-turn action */
+void
+runmode_delay_output(void)
+{
+    if ((g.context.run || g.multi) && flags.runmode != RUN_TPORT) {
         /* for tport mode, don't display anything until we've stopped;
            for normal (leap) mode, update display every 7th step
            (relative to turn counter; ought to be to start of running);