diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-12-17 17:06:51 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-12-17 17:06:51 +0100 |
commit | 5c9c66d11372dae31a485e39684ecd8a5b65b274 (patch) | |
tree | f606899f7b803fa0abfa033476076a0510fd85c5 /crawl-ref/source | |
parent | 5eb6eed0aca7ce5f58dd5c51bbd406754b5491a7 (diff) | |
download | crawl-ref-5c9c66d11372dae31a485e39684ecd8a5b65b274.tar.gz crawl-ref-5c9c66d11372dae31a485e39684ecd8a5b65b274.zip |
Disallow apporting from the map boundary (shop inventories).
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/spells4.cc | 3 |
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)) |