diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java index 83d883d19..3bc100936 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java @@ -103,9 +103,9 @@ public class DemonSpawner extends Mob { spawn.pos = Random.element( candidates ); spawn.state = spawn.HUNTING; + GameScene.add( spawn, 1 ); Dungeon.level.occupyCell(spawn); - GameScene.add( spawn, 1 ); if (sprite.visible) { Actor.addDelayed(new Pushing(spawn, pos, spawn.pos), -1); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java index 18e4bb9a5..c71360698 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java @@ -122,10 +122,10 @@ public class Ghoul extends Mob { } child.pos = Random.element( candidates ); - + + GameScene.add( child ); Dungeon.level.occupyCell(child); - GameScene.add( child ); if (sprite.visible) { Actor.addDelayed( new Pushing( child, pos, child.pos ), -1 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java index 2dbd089ac..78d361edb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java @@ -100,11 +100,11 @@ public class Swarm extends Mob { clone.HP = (HP - damage) / 2; clone.pos = Random.element( candidates ); clone.state = clone.HUNTING; - - Dungeon.level.occupyCell(clone); - + GameScene.add( clone, SPLIT_DELAY ); Actor.addDelayed( new Pushing( clone, pos, clone.pos ), -1 ); + + Dungeon.level.occupyCell(clone); HP -= clone.HP; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java index 0af9c3c89..d6a2eb782 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Wraith.java @@ -106,9 +106,9 @@ public class Wraith extends Mob { w.adjustStats( Dungeon.depth ); w.pos = pos; w.state = w.HUNTING; - Dungeon.level.occupyCell(w); GameScene.add( w, SPAWN_DELAY ); - + Dungeon.level.occupyCell(w); + w.sprite.alpha( 0 ); w.sprite.parent.add( new AlphaTweener( w.sprite, 1, 0.5f ) ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/WoollyBomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/WoollyBomb.java index 6f9de29f4..31610c1ce 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/WoollyBomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/WoollyBomb.java @@ -53,8 +53,8 @@ public class WoollyBomb extends Bomb { Sheep sheep = new Sheep(); sheep.lifespan = Random.NormalIntRange( 12, 16 ); sheep.pos = i; - Dungeon.level.occupyCell(sheep); GameScene.add(sheep); + Dungeon.level.occupyCell(sheep); CellEmitter.get(i).burst(Speck.factory(Speck.WOOL), 4); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java index b4ad4aa26..c5e0f6370 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java @@ -55,8 +55,8 @@ public class StoneOfFlock extends Runestone { Sheep sheep = new Sheep(); sheep.lifespan = Random.NormalIntRange( 6, 8 ); sheep.pos = i; - Dungeon.level.occupyCell(sheep); GameScene.add(sheep); + Dungeon.level.occupyCell(sheep); CellEmitter.get(i).burst(Speck.factory(Speck.WOOL), 4); } }