diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java index 1c43782f3..b3eeefe45 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java @@ -29,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostImbue; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; -import com.watabou.utils.BArray; import com.watabou.utils.PathFinder; public class Icecap extends Plant { @@ -45,12 +44,10 @@ public class Icecap extends Plant { if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){ Buff.affect(ch, FrostImbue.class, FrostImbue.DURATION*0.3f); } - - PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.losBlocking, null ), 1 ); - for (int i=0; i < PathFinder.distance.length; i++) { - if (PathFinder.distance[i] < Integer.MAX_VALUE) { - Freezing.affect( i ); + for (int i : PathFinder.NEIGHBOURS9){ + if (!Dungeon.level.solid[pos+i]) { + Freezing.affect( pos+i ); } } }