From 725cb5b4d5a3ade5c5e7b04a6210cedc839c2bdd Mon Sep 17 00:00:00 2001 From: zelgadis Date: Wed, 19 Sep 2007 01:19:56 +0000 Subject: Added new commands "re-do previous command" (bound to `) and "repeat next command" (bound to 0). Though this is just an interface change, it changes code in the core input processing function (input() in acr.cc), and also messes around with the input buffer, so it could probably do with more testing before merging it into the 0.3 branch. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2137 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index d432fa0e86..3d992a3eb1 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -60,6 +60,7 @@ #include "spells3.h" #include "spl-util.h" #include "spells4.h" +#include "state.h" #include "stuff.h" #include "terrain.h" #include "transfor.h" @@ -4168,6 +4169,8 @@ bool enough_hp(int minimum, bool suppress_msg) if (!suppress_msg) mpr("You haven't enough vitality at the moment."); + crawl_state.cancel_cmd_again(); + crawl_state.cancel_cmd_repeat(); return false; } @@ -4181,6 +4184,8 @@ bool enough_mp(int minimum, bool suppress_msg) if (!suppress_msg) mpr("You haven't enough magic at the moment."); + crawl_state.cancel_cmd_again(); + crawl_state.cancel_cmd_repeat(); return false; } @@ -5022,6 +5027,8 @@ void player::init() prev_targ = MHITNOT; pet_target = MHITNOT; + prev_grd_targ = coord_def(0, 0); + x_pos = 0; y_pos = 0; @@ -6044,3 +6051,4 @@ std::vector player::get_all_place_info(bool visited_only, return list; } + -- cgit v1.2.3-54-g00ecf