summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-30 01:23:33 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-30 01:23:33 -0700
commit5b1a28616877a2f8f3b1b2562c02fca645fcc99f (patch)
tree1549976d13ba5266439e676b9c027b29093518e6
parentc6fc0f21471b48180fb592ff38c0526be1dece11 (diff)
downloadcrawl-ref-5b1a28616877a2f8f3b1b2562c02fca645fcc99f.tar.gz
crawl-ref-5b1a28616877a2f8f3b1b2562c02fca645fcc99f.zip
Interrupt less often when repeating wiz commands
Interrupt/cancel command repetition less often when repeating a wizard command.
-rw-r--r--crawl-ref/source/acr.cc5
-rw-r--r--crawl-ref/source/state.cc17
2 files changed, 21 insertions, 1 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 2b64b5c065..1461423479 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2792,8 +2792,11 @@ void world_reacts()
viewwindow(true, false);
- if (you.cannot_act() && any_messages())
+ if (you.cannot_act() && any_messages()
+ && crawl_state.repeat_cmd != CMD_WIZARD)
+ {
more();
+ }
#if defined(DEBUG_TENSION) || defined(DEBUG_RELIGION)
if (you.religion != GOD_NO_GOD)
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index c13c2321e9..2c994cd094 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -86,6 +86,23 @@ void game_state::cancel_cmd_repeat(std::string reason)
if (!is_repeating_cmd())
return;
+ if (repeat_cmd == CMD_WIZARD)
+ {
+ // Don't interrupt wizard testing of religion.
+ if (is_god_acting())
+ return;
+
+ // Don't interrupt wizard testing just because we can't
+ // move.
+ if (you.cannot_act())
+ return;
+
+ // We've probably just recovered from being unable to act;
+ // again, don't interrupt.
+ if (you.turn_is_over)
+ return;
+ }
+
if (is_replaying_keys() || cmd_repeat_start)
flush_input_buffer(FLUSH_KEY_REPLAY_CANCEL);