v0.4.1: extra reach weapons no longer penetrate mobs

This commit is contained in:
Evan Debenham 2016-07-05 15:51:03 -04:00 committed by Evan Debenham
parent 40f5797509
commit 6bf05ea044

View File

@ -388,7 +388,11 @@ public class Hero extends Char {
if (wep != null && Level.distance( pos, enemy.pos ) <= wep.reachFactor(this)){
PathFinder.buildDistanceMap(enemy.pos, BArray.not(Level.solid, null), wep.reachFactor(this));
boolean[] passable = BArray.not(Level.solid, null);
for (Mob m : Dungeon.level.mobs)
passable[m.pos] = false;
PathFinder.buildDistanceMap(enemy.pos, passable, wep.reachFactor(this));
return PathFinder.distance[pos] <= wep.reachFactor(this);