diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-22 21:00:05 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-22 21:02:48 -0800 |
commit | c94f94d6959395a96da97a4c163e44456277d1a1 (patch) | |
tree | 89f857c646b48e8bba22f4362629bc7d3c375f2b /crawl-ref/source/directn.cc | |
parent | ce0b009e851f37ee522e7e0ef420a0e9fb0b246e (diff) | |
download | crawl-ref-c94f94d6959395a96da97a4c163e44456277d1a1.tar.gz crawl-ref-c94f94d6959395a96da97a4c163e44456277d1a1.zip |
tiles: Make mod-L-click actions do-again-able
If you fire/cast/zap at a monster with mod-L-click, then you can do the
command over again with the "`" key. Doesn't work yet with spells cast
via the spell pane (toggled on with "_"), or with items fired via
clicking on the inventory pane.
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index a1e9ccf2c0..cd94c49360 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -361,6 +361,7 @@ static void _direction_again(dist& moves, targetting_type restricts, return; } +#ifdef DEBUG int targ_types = 0; if (you.prev_targ != MHITNOT && you.prev_targ != MHITYOU) targ_types++; @@ -368,6 +369,7 @@ static void _direction_again(dist& moves, targetting_type restricts, targ_types++; if (you.prev_grd_targ != coord_def(0, 0)) targ_types++; +#endif ASSERT(targ_types == 1); // Discard keys until we get to a set-target command @@ -382,7 +384,8 @@ static void _direction_again(dist& moves, targetting_type restricts, || key_command == CMD_TARGET_SELECT || key_command == CMD_TARGET_SELECT_FORCE_ENDPOINT || key_command == CMD_TARGET_SELECT_FORCE - || key_command == CMD_TARGET_MAYBE_PREV_TARGET) + || key_command == CMD_TARGET_MAYBE_PREV_TARGET + || key_command == CMD_TARGET_MOUSE_SELECT) { break; } @@ -996,11 +999,7 @@ void direction(dist& moves, targetting_type restricts, #endif if (crawl_state.is_replaying_keys() && restricts != DIR_DIR) - { - _direction_again(moves, restricts, mode, range, just_looking, - prompt, beh); return; - } // NOTE: Even if just_looking is set, moves is still interesting, // because we can travel there! |