From b49b73d9b3736c7dad367e7f61c78ca35787f428 Mon Sep 17 00:00:00 2001 From: haranp Date: Sun, 8 Jul 2007 01:00:51 +0000 Subject: Lots and lots of type safety. Caught a bug in the definition of shadows (isn't it lucky that BLACK == MST_NO_SPELLS?) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1788 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/spl-cast.cc') 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) -- cgit v1.2.3-54-g00ecf