summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-01 12:09:07 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-01 12:12:34 +0100
commitbce5f7020a13edbceb605979a3b73fdfe590a0cf (patch)
treef35f77649b8fc49939c67608d415dbd9b8c0efcf /crawl-ref/source/spl-cast.cc
parent20889107ee4ef5e7f61b1facfdf4da4bc97935b6 (diff)
downloadcrawl-ref-bce5f7020a13edbceb605979a3b73fdfe590a0cf.tar.gz
crawl-ref-bce5f7020a13edbceb605979a3b73fdfe590a0cf.zip
Make passwall use standard targetting system.
This means it's properly abortable now.
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 9f73adf013..e35944c8ce 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -195,6 +195,7 @@ static bool _spell_no_hostile_in_range(spell_type spell, int minRange)
case SPELL_PROJECTED_NOISE:
case SPELL_CONJURE_FLAME:
case SPELL_DIG:
+ case SPELL_PASSWALL:
// Airstrike has LOS_RANGE and can go through glass walls.
case SPELL_AIRSTRIKE:
@@ -2192,7 +2193,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
break;
case SPELL_PASSWALL:
- cast_passwall(powc);
+ if (!cast_passwall(spd.delta, powc))
+ return (SPRET_ABORT);
break;
case SPELL_APPORTATION: