summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-17 17:06:51 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-17 17:06:51 +0100
commit5c9c66d11372dae31a485e39684ecd8a5b65b274 (patch)
treef606899f7b803fa0abfa033476076a0510fd85c5 /crawl-ref/source/spells4.cc
parent5eb6eed0aca7ce5f58dd5c51bbd406754b5491a7 (diff)
downloadcrawl-ref-5c9c66d11372dae31a485e39684ecd8a5b65b274.tar.gz
crawl-ref-5c9c66d11372dae31a485e39684ecd8a5b65b274.zip
Disallow apporting from the map boundary (shop inventories).
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 1ecaa4bd06..992b768ed5 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1765,8 +1765,9 @@ bool cast_apportation(int pow, const coord_def& where)
}
// Let's look at the top item in that square...
+ // And don't allow apporting from shop inventories.
const int item_idx = igrd(where);
- if (item_idx == NON_ITEM)
+ if (item_idx == NON_ITEM || !in_bounds(where))
{
// Maybe the player *thought* there was something there (a mimic.)
if (monsters* m = monster_at(where))