v0.4.1: extra reach weapons no longer penetrate mobs
This commit is contained in:
parent
40f5797509
commit
6bf05ea044
|
@ -388,7 +388,11 @@ public class Hero extends Char {
|
||||||
|
|
||||||
if (wep != null && Level.distance( pos, enemy.pos ) <= wep.reachFactor(this)){
|
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);
|
return PathFinder.distance[pos] <= wep.reachFactor(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user