diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-29 09:44:50 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-29 09:44:50 +0000 |
commit | b42bd161b6822443312c2fd75dc1d724edd30e13 (patch) | |
tree | e08f81cfb58d1124c2a24db288bdcab73c94c651 /crawl-ref/source/travel.cc | |
parent | 5f14cf8ebbe2bcd0de008010281061edfd2c503a (diff) | |
download | crawl-ref-b42bd161b6822443312c2fd75dc1d724edd30e13.tar.gz crawl-ref-b42bd161b6822443312c2fd75dc1d724edd30e13.zip |
Modify tutorial messages for the new triggers. Thanks again, Matthew! :)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5328 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r-- | crawl-ref/source/travel.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 50ad0e67a7..3b5a0f36ba 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -1585,7 +1585,15 @@ bool travel_pathfind::path_flood(const coord_def &c, const coord_def &dc) return (true); } - if (dc != dest && !is_travelsafe_square(dc.x, dc.y, ignore_hostile)) + if (dc == dest) + { + // Hallelujah, we're home! + if (_is_safe_move(c.x, c.y)) + next_travel_move = c; + + return (true); + } + else if (!is_travelsafe_square(dc.x, dc.y, ignore_hostile)) { // This point is not okay to travel on, but if this is a // trap, we'll want to put it on the feature vector anyway. @@ -1609,14 +1617,7 @@ bool travel_pathfind::path_flood(const coord_def &c, const coord_def &dc) return (false); } - if (dc == dest) - { - // Hallelujah, we're home! - if (_is_safe_move(c.x, c.y)) - next_travel_move = c; - return (true); - } - else if (!point_distance[dc.x][dc.y]) + if (!point_distance[dc.x][dc.y]) { // This point is going to be on the agenda for the next // iteration |