From 8c1131286be54f36c3f663d22cade5a1aa407072 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 10 Nov 2024 10:54:06 -0500 Subject: [PATCH] v3.0.0: fixed grass blocking icecap and removed unnecessary pathfind --- .../shatteredpixeldungeon/plants/Icecap.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 ); } } }