v2.5.3: fixed new bomb logic preventing bombs breaking flammable terrain
This commit is contained in:
committed by
Evan Debenham
parent
c2b163ae03
commit
2fef96f21c
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Beam;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeParticle;
|
||||
@@ -149,7 +150,10 @@ public class Bomb extends Item {
|
||||
}
|
||||
|
||||
boolean terrainAffected = false;
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
boolean[] explodable = new boolean[Dungeon.level.length()];
|
||||
BArray.not( Dungeon.level.solid, explodable);
|
||||
BArray.or( Dungeon.level.flamable, explodable, explodable);
|
||||
PathFinder.buildDistanceMap( cell, explodable, explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] != Integer.MAX_VALUE) {
|
||||
if (Dungeon.level.heroFOV[i]) {
|
||||
|
||||
Reference in New Issue
Block a user