From 6bf05ea044ebb6a1cbb386694a3f0dd20f1fda3e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 5 Jul 2016 15:51:03 -0400 Subject: [PATCH] v0.4.1: extra reach weapons no longer penetrate mobs --- .../shatteredpixeldungeon/actors/hero/Hero.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 4106e0ee2..cd0a1093e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -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);