summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2011-01-23 19:01:03 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2011-01-23 19:30:31 +0100
commitbbb9ae0b47697eb814bfb88ffe192c6b823a0f2b (patch)
tree978e6a7d5461dba739a6b3c79db557d4ae87eaf7 /crawl-ref/source/travel.h
parent1cacd72452d2efae591f3c4219af7c03401b7166 (diff)
downloadcrawl-ref-bbb9ae0b47697eb814bfb88ffe192c6b823a0f2b.tar.gz
crawl-ref-bbb9ae0b47697eb814bfb88ffe192c6b823a0f2b.zip
Allow mouseclick movement through exclusions and stationary monsters.
When actual travel is disallowed, mouseclicks take you one step along the path. That was already the case for normal monsters and has now been extended to work around stationary monsters (e.g. training dummy) and in excluded areas.
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r--crawl-ref/source/travel.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index 7f17c1bcbd..631ef297d8 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -72,7 +72,8 @@ bool is_unknown_stair(const coord_def &p);
void find_travel_pos(const coord_def& youpos, int *move_x, int *move_y,
std::vector<coord_def>* coords = NULL);
-bool is_travelsafe_square(const coord_def& c, bool ignore_hostile = false);
+bool is_travelsafe_square(const coord_def& c, bool ignore_hostile = false,
+ bool ignore_danger = false);
/* ***********************************************************************
* Initiates explore - the character runs around the level to map it. Note
@@ -514,6 +515,11 @@ public:
// RMODE_EXPLORE_GREEDY.
const coord_def unexplored_square() const;
+ inline void set_ignore_danger()
+ {
+ ignore_danger = true;
+ }
+
protected:
bool is_greed_inducing_square(const coord_def &c) const;
bool path_examine_point(const coord_def &c);
@@ -546,6 +552,10 @@ protected:
// hostile squares.
bool ignore_hostile;
+ // Set to true for Tiles mode clicking, so you can move one step
+ // at a time through excluded areas and around stationary monsters.
+ bool ignore_danger;
+
// If true, use magic numbers in point distance array which can be
// used to colour the level-map.
bool annotate_map;