summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-20 10:11:58 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-20 10:11:58 +0000
commit64707c2d565008f6c5fea165df96bc4c4c9e4be0 (patch)
treea12f74236fed3fd248fb902186575eab16f75d37 /crawl-ref/source
parent2741951b4396d2b9aa697fe2801502b35fbf7d3f (diff)
downloadcrawl-ref-64707c2d565008f6c5fea165df96bc4c4c9e4be0.tar.gz
crawl-ref-64707c2d565008f6c5fea165df96bc4c4c9e4be0.zip
Delays now give their startup messages when they start, rather than
when they are pushed onto the queue. Fixes 1797499. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2161 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/delay.cc45
-rw-r--r--crawl-ref/source/externs.h1
-rw-r--r--crawl-ref/source/food.cc6
3 files changed, 28 insertions, 24 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index d77fd9d269..b84c8107ac 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -111,33 +111,17 @@ void start_delay( delay_type type, int turns, int parm1, int parm2 )
delay.duration = turns;
delay.parm1 = parm1;
delay.parm2 = parm2;
+ delay.started = false;
// Handle zero-turn delays (possible with butchering).
if (turns == 0)
{
+ delay.started = true;
// Don't issue startup message.
if (push_delay(delay) == 0)
finish_delay(delay);
return;
}
-
- switch ( delay.type )
- {
- case DELAY_ARMOUR_ON:
- mpr("You start putting on your armour.", MSGCH_MULTITURN_ACTION);
- break;
- case DELAY_ARMOUR_OFF:
- mpr("You start removing your armour.", MSGCH_MULTITURN_ACTION);
- break;
- case DELAY_MEMORISE:
- mpr("You start memorising the spell.", MSGCH_MULTITURN_ACTION);
- break;
- case DELAY_PASSWALL:
- mpr("You begin to meditate on the wall.", MSGCH_MULTITURN_ACTION);
- break;
- default:
- break;
- }
push_delay( delay );
}
@@ -309,6 +293,31 @@ void handle_delay( void )
delay_queue_item &delay = you.delay_queue.front();
+ if ( !delay.started )
+ {
+ switch ( delay.type )
+ {
+ case DELAY_ARMOUR_ON:
+ mpr("You start putting on your armour.", MSGCH_MULTITURN_ACTION);
+ break;
+ case DELAY_ARMOUR_OFF:
+ mpr("You start removing your armour.", MSGCH_MULTITURN_ACTION);
+ break;
+ case DELAY_BUTCHER:
+ mpr("You start butchering the corpse.", MSGCH_MULTITURN_ACTION);
+ break;
+ case DELAY_MEMORISE:
+ mpr("You start memorising the spell.", MSGCH_MULTITURN_ACTION);
+ break;
+ case DELAY_PASSWALL:
+ mpr("You begin to meditate on the wall.", MSGCH_MULTITURN_ACTION);
+ break;
+ default:
+ break;
+ }
+ delay.started = true;
+ }
+
ASSERT(!crawl_state.is_repeating_cmd() || delay.type == DELAY_MACRO);
// Run delays and Lua delays don't have a specific end time.
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index e6dee9a54d..526bf96b92 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -318,6 +318,7 @@ struct delay_queue_item
int duration;
int parm1;
int parm2;
+ bool started;
};
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index b0945f1fbf..bbad92c57c 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -317,12 +317,6 @@ bool butchery(void)
if ( can_butcher )
{
- // we actually butcher now
- if ( teeth_butcher || barehand_butcher )
- mpr("You start tearing the corpse apart.");
- else
- mpr("You start hacking away.");
-
bool rotten = (mitm[objl].special < 100);
if (you.duration[DUR_PRAYER] && !rotten &&
god_likes_butchery(you.religion))