summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 61a9e1aaa1..b5821cb120 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -841,7 +841,8 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail )
// Hopefully, those will eventually be fixed. -- bwr
if (flags & SPFLAG_TARGETING_MASK)
{
- int targ = (testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY);
+ targ_mode_type targ =
+ (testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY);
targeting_type dir =
(testbits( flags, SPFLAG_TARGET ) ? DIR_TARGET :
@@ -852,7 +853,7 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail )
if (dir == DIR_DIR)
mpr(prompt? prompt : "Which direction? ", MSGCH_PROMPT);
- if (spell_direction( spd, beam, dir, targ, prompt ) == -1)
+ if ( !spell_direction( spd, beam, dir, targ, prompt ) )
return (SPRET_ABORT);
if (testbits( flags, SPFLAG_NOT_SELF ) && spd.isMe)