… | |
… | |
828 | */ |
828 | */ |
829 | movetype = spell->other_arch->move_type; |
829 | movetype = spell->other_arch->move_type; |
830 | |
830 | |
831 | for (i = range_min; i <= range_max; i++) |
831 | for (i = range_min; i <= range_max; i++) |
832 | { |
832 | { |
833 | sint16 x, y, d; |
833 | sint16 x, y; |
834 | |
834 | |
835 | /* We can't use absdir here, because it never returns |
835 | /* We can't use absdir here, because it never returns |
836 | * 0. If this is a rune, we want to hit the person on top |
836 | * 0. If this is a rune, we want to hit the person on top |
837 | * of the trap (d==0). If it is not a rune, then we don't want |
837 | * of the trap (d==0). If it is not a rune, then we don't want |
838 | * to hit that person. |
838 | * to hit that person. |
839 | */ |
839 | */ |
840 | d = dir ? absdir (dir + i) : 0; |
840 | int d = dir ? absdir (dir + i) : i; |
841 | |
841 | |
842 | /* If it's not a rune, we don't want to blast the caster. |
842 | /* If it's not a rune, we don't want to blast the caster. |
843 | * In that case, we have to see - if dir is specified, |
843 | * In that case, we have to see - if dir is specified, |
844 | * turn this into direction 8. If dir is not specified (all |
844 | * turn this into direction 8. If dir is not specified (all |
845 | * direction) skip - otherwise, one line would do more damage |
845 | * direction) skip - otherwise, one line would do more damage |