summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/exclude.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2011-01-11 14:33:29 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2011-01-11 19:18:06 +0100
commit3743e2d50c669851be29de823e5a69c8c4859169 (patch)
treec86e85b3e7cc49e6ba0ffb950e40a846cee56d97 /crawl-ref/source/exclude.cc
parentcc4c2b0e84fc3fd379a3294325eebb3d8ae4faf6 (diff)
downloadcrawl-ref-3743e2d50c669851be29de823e5a69c8c4859169.tar.gz
crawl-ref-3743e2d50c669851be29de823e5a69c8c4859169.zip
Don't attempt to set autoexclusions in unmappable areas.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r--crawl-ref/source/exclude.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index 4be28bd505..3f23195428 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -65,6 +65,9 @@ bool need_auto_exclude(const monster* mon, bool sleepy)
// exclusion.
void set_auto_exclude(const monster* mon)
{
+ if (!player_in_mappable_area())
+ return;
+
if (need_auto_exclude(mon) && !is_exclude_root(mon->pos()))
{
int rad = LOS_RADIUS;