From 2378f45fbbca75cd68846cd16785ba5ca7203818 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 26 Mar 2016 18:45:45 -0400 Subject: [PATCH] v0.3.5: fixed plants hanging around when they shouldn't on tengu's level. --- .../shatteredpixeldungeon/levels/PrisonBossLevel.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index 513a2b45b..607aefb87 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.MazePainter; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SpearTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.ui.CustomTileVisual; import com.shatteredpixel.shatteredpixeldungeon.ui.HealthIndicator; @@ -265,6 +266,12 @@ public class PrisonBossLevel extends Level { mob.destroy(); } } + for (Plant plant : plants.values()){ + if (safeArea == null || !safeArea.inside(plant.pos)){ + plants.remove(plant.pos); + plant.sprite.kill(); + } + } } public void progress(){