From 7ff0bb74bc7db7dab1c33c5ec5724a882f836ea1 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 17 Dec 2009 16:49:07 +0100 Subject: Stop shift-running at map boundary. --- crawl-ref/source/delay.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/delay.cc') diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 5af0f6aa4c..5a02bbccf8 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -16,6 +16,7 @@ #include "attitude-change.h" #include "clua.h" #include "command.h" +#include "coord.h" #include "coordit.h" #include "database.h" #include "delay.h" @@ -1602,7 +1603,7 @@ void armour_wear_effects(const int item_slot) static command_type _get_running_command() { - if (kbhit()) + if (kbhit() || !in_bounds(you.pos() + you.running.pos)) { stop_running(); return CMD_NO_CMD; -- cgit v1.2.3-54-g00ecf