diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
commit | 03c402d63f5bef5d880c81bf7253a1274aaacf01 (patch) | |
tree | 6e25129e5f685ea8643fcbea5718efa6a22a9064 /src | |
parent | d191da218fc81d989d0ebdcfd66a4e0b00405121 (diff) |
Clean up conditional in make_attack_spell()
Diffstat (limited to 'src')
-rw-r--r-- | src/melee2.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/melee2.cc b/src/melee2.cc index 59f85803..a31ca1f7 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -2496,7 +2496,6 @@ static bool_ make_attack_spell(int m_idx) int chance, rlev, failrate; char m_name[80]; bool_ no_inate = FALSE; - int x, y; /* Extract the blind-ness */ bool_ blind = (p_ptr->blind ? TRUE : FALSE); @@ -2508,19 +2507,12 @@ static bool_ make_attack_spell(int m_idx) bool_ seen = (!blind && m_ptr->ml); /* Target location */ - if (m_ptr->target > -1) + if (m_ptr->target != 0) { - if (!m_ptr->target) - { - y = p_ptr->py; - x = p_ptr->px; - } - else - { - return (FALSE); - } + return FALSE; } - else return FALSE; + int y = p_ptr->py; + int x = p_ptr->px; /* Cannot cast spells when confused */ if (m_ptr->confused) return (FALSE); |