summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libw32c.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-12-13 14:01:15 +0100
committerAdam Borowski <kilobyte@angband.pl>2011-12-14 10:22:16 +0100
commitd5a93c807e89bdccfd61b3871aca95d6088c56f4 (patch)
tree171a24ab076250b538f47788e378343dab8d26fd /crawl-ref/source/libw32c.cc
parent81a932ab1fd9bd5c823fd04589c339979216be03 (diff)
downloadcrawl-ref-d5a93c807e89bdccfd61b3871aca95d6088c56f4.tar.gz
crawl-ref-d5a93c807e89bdccfd61b3871aca95d6088c56f4.zip
Disable death and delays during fsim.
If you somehow die, fsim would hang on a non-displayed prompt; delays would make a single run take a week spent in sleep(). Note that fsim is currently completely broken by UCC changes.
Diffstat (limited to 'crawl-ref/source/libw32c.cc')
-rw-r--r--crawl-ref/source/libw32c.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index 1cda0df8da..788f017c87 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -847,6 +847,9 @@ bool kbhit()
void delay(unsigned int ms)
{
+ if (crawl_state.disables[DIS_DELAY])
+ return;
+
Sleep((DWORD)ms);
}