diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-08 15:54:02 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-08 15:54:02 +0000 |
commit | 2e6e327fcefc772e02f8d6db1232fb97aaaab597 (patch) | |
tree | 33aca0589101dcd6b3da808aa719f8b520276e2f /crawl-ref/source/delay.cc | |
parent | 4a6ed4aa315d47f6ac7186eb217e08c6bea38a1d (diff) | |
download | crawl-ref-2e6e327fcefc772e02f8d6db1232fb97aaaab597.tar.gz crawl-ref-2e6e327fcefc772e02f8d6db1232fb97aaaab597.zip |
Stop butcher delays when blade hands wears off (Eva).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1801 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index fc016121d2..5f4d8877db 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -53,7 +53,7 @@ static void finish_delay(const delay_queue_item &delay); // other delays can be spawned while this delay is running. If is_parent_delay // returns true, new delays will be pushed immediately to the front of the // delay in question, rather than at the end of the queue. -static bool is_parent_delay(int delay) +static bool is_parent_delay(delay_type delay) { // Interlevel travel can do upstairs/downstairs delays. // Lua macros can in theory perform any of the other delays, @@ -99,7 +99,7 @@ static void clear_pending_delays() } } -void start_delay( int type, int turns, int parm1, int parm2 ) +void start_delay( delay_type type, int turns, int parm1, int parm2 ) /***********************************************************/ { delay_queue_item delay; @@ -253,13 +253,19 @@ void stop_delay( void ) update_turn_count(); } +void stop_butcher_delay() +{ + if (current_delay_action() == DELAY_BUTCHER) + stop_delay(); +} + bool you_are_delayed( void ) /**************************/ { return (!you.delay_queue.empty()); } -int current_delay_action( void ) +delay_type current_delay_action( void ) /******************************/ { return (you_are_delayed() ? you.delay_queue.front().type @@ -828,6 +834,8 @@ static void handle_run_delays(const delay_queue_item &delay) case DELAY_TRAVEL: cmd = travel(); break; + default: + break; } if (cmd != CMD_NO_CMD) |