v3.0.0: fixed grass blocking icecap and removed unnecessary pathfind
This commit is contained in:
@@ -29,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostImbue;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.watabou.utils.BArray;
|
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
|
|
||||||
public class Icecap extends Plant {
|
public class Icecap extends Plant {
|
||||||
@@ -46,11 +45,9 @@ public class Icecap extends Plant {
|
|||||||
Buff.affect(ch, FrostImbue.class, FrostImbue.DURATION*0.3f);
|
Buff.affect(ch, FrostImbue.class, FrostImbue.DURATION*0.3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.losBlocking, null ), 1 );
|
for (int i : PathFinder.NEIGHBOURS9){
|
||||||
|
if (!Dungeon.level.solid[pos+i]) {
|
||||||
for (int i=0; i < PathFinder.distance.length; i++) {
|
Freezing.affect( pos+i );
|
||||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
|
||||||
Freezing.affect( i );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user