summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-20 12:06:22 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-20 12:06:22 +0000
commit48d9ab2d186ee9fc043e6a7410328df357eedacb (patch)
treeb748a3f5674661b80dd789b0e5d42f2dee9fbdae /crawl-ref/source/travel.cc
parent6052fa93471180670f18d1abad16b2a12cdcf1dc (diff)
downloadcrawl-ref-48d9ab2d186ee9fc043e6a7410328df357eedacb.tar.gz
crawl-ref-48d9ab2d186ee9fc043e6a7410328df357eedacb.zip
Fix travel not working. Whoops!
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5151 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index f51b626c74..288bef1cfb 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -1135,7 +1135,7 @@ command_type travel()
// Interlevel travel. Since you.running.x is zero, we've either just
// initiated travel, or we've just climbed or descended a staircase,
// and we need to figure out where to travel to next.
- if (!you.running.x || !_find_transtravel_square(level_target.p))
+ if (!_find_transtravel_square(level_target.p) || !you.running.x)
stop_running();
}
@@ -2581,8 +2581,10 @@ static int _find_transtravel_stair( const level_id &cur,
// still be able to find a shorter route, since it can consider
// routes that leave and reenter the current level.
if (player_level == target.id && stair.x == you.x_pos
- && stair.y == you.y_pos)
+ && stair.y == you.y_pos)
+ {
best_stair = target.pos;
+ }
// The local_distance is already set, but there may actually be
// stairs we can take that'll get us to the target faster than the