v0.4.2b: fixed sprites of deleted mobs still showing

This commit is contained in:
Evan Debenham 2016-09-14 21:12:14 -04:00
parent 770bbfdb42
commit 8501abc9cf

View File

@ -266,6 +266,8 @@ public class PrisonBossLevel extends Level {
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[Dungeon.level.mobs.size()])){
if (mob != tengu && (safeArea == null || !safeArea.inside(cellToPoint(mob.pos)))){
mob.destroy();
if (mob.sprite != null)
mob.sprite.killAndErase();
}
}
for (Plant plant : plants.values()){