summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/debug.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-05 14:04:39 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-05 14:04:39 +0000
commita57d484bd70f19a06271202fd5e5a9d0be914d18 (patch)
tree2d4e1edd7666c7c3f07164104d3753a477af5b5b /crawl-ref/source/debug.cc
parent70e12c754c318dc3e7b513d45c9cca91c94147ca (diff)
downloadcrawl-ref-a57d484bd70f19a06271202fd5e5a9d0be914d18.tar.gz
crawl-ref-a57d484bd70f19a06271202fd5e5a9d0be914d18.zip
Fix mimics not teleporting when attacked by reaching or airstrike, and a
few (really) minor adjustments on monster pathfinding. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5487 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/debug.cc')
-rw-r--r--crawl-ref/source/debug.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 7337faa475..30fdcbf26b 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -4070,16 +4070,21 @@ void debug_pathfind(int mid)
return;
mpr("Choose a destination!");
-#ifdef USE_TILE
+#ifndef USE_TILE
more();
#endif
coord_def dest;
show_map(dest, true);
redraw_screen();
+ if (!dest.x)
+ {
+ canned_msg(MSG_OK);
+ return;
+ }
monsters &mon = menv[mid];
- mprf("Attempting to calculate a path from (%d, %d) to (%d, %d)...",
- mon.x, mon.y, dest.x, dest.y);
+ mprf("Attempting to calculate a path from (%d, %d) to (%d, %d)...",
+ mon.x, mon.y, dest.x, dest.y);
monster_pathfind mp;
bool success = mp.start_pathfind(&mon, dest, true);
if (success)