diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2011-01-11 15:46:25 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2011-01-11 19:18:08 +0100 |
commit | 56266ee012d54c6dc9021abb1deebc51da3539df (patch) | |
tree | 0f5e7b231f608b9b10fca14d60b25c76ec700077 /crawl-ref/source/exclude.cc | |
parent | 3743e2d50c669851be29de823e5a69c8c4859169 (diff) | |
download | crawl-ref-56266ee012d54c6dc9021abb1deebc51da3539df.tar.gz crawl-ref-56266ee012d54c6dc9021abb1deebc51da3539df.zip |
Implement #1960: Allow traveling across radius 1 excluded stairs.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r-- | crawl-ref/source/exclude.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 3f23195428..61ba1fb703 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -360,6 +360,18 @@ bool is_exclude_root(const coord_def &p) return (curr_excludes.get_exclude_root(p)); } +int get_exclusion_radius(const coord_def &p) +{ + if (travel_exclude *exc = curr_excludes.get_exclude_root(p)) + { + if (!exc->radius) + return 1; + else + return exc->radius; + } + return 0; +} + #ifdef USE_TILE // update Gmap for squares surrounding exclude centre static void _tile_exclude_gmap_update(const coord_def &p) |