summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 01:29:33 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 01:29:33 +0000
commite558b0503312ea313b9a0303b74cce435500f119 (patch)
tree6a28390f9b93a307fbc9c90518ce6458533e41f1 /crawl-ref/source/player.cc
parentdfb4f758b542dac6147dc5284e51b3875469e36e (diff)
downloadcrawl-ref-e558b0503312ea313b9a0303b74cce435500f119.tar.gz
crawl-ref-e558b0503312ea313b9a0303b74cce435500f119.zip
Tweaks to make it less likely that command repitition will be cancled when it's
being used to wizard test Xom acts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8525 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 4cdf592454..e13ba99ba5 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2994,6 +2994,9 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
void level_change(bool skip_attribute_increase)
{
+ const bool wiz_cmd = crawl_state.prev_cmd == CMD_WIZARD
+ || crawl_state.repeat_cmd == CMD_WIZARD;
+
// necessary for the time being, as level_change() is called
// directly sometimes {dlb}
you.redraw_experience = true;
@@ -3003,14 +3006,9 @@ void level_change(bool skip_attribute_increase)
{
bool skip_more = false;
- if (!skip_attribute_increase)
+ if (!skip_attribute_increase && !wiz_cmd)
{
- if (crawl_state.is_replaying_keys()
- || crawl_state.is_repeating_cmd())
- {
- crawl_state.cancel_cmd_repeat();
- crawl_state.cancel_cmd_again();
- }
+ crawl_state.cancel_cmd_all();
if (is_processing_macro())
flush_input_buffer(FLUSH_ABORT_MACRO);