From f8e244bbddcc5f321267938fbe9b58e3836a27ab Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 29 Aug 2020 19:22:12 -0400 Subject: [PATCH] v0.8.2d: adjusted mob adding logic to fix a rare race condition crash --- .../shatteredpixeldungeon/scenes/GameScene.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index 6e4eef0aa..648395d51 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -778,8 +778,8 @@ public class GameScene extends PixelScene { public static void add( Mob mob ) { Dungeon.level.mobs.add( mob ); - Actor.add( mob ); scene.addMobSprite( mob ); + Actor.add( mob ); } public static void addSprite( Mob mob ) { @@ -788,8 +788,8 @@ public class GameScene extends PixelScene { public static void add( Mob mob, float delay ) { Dungeon.level.mobs.add( mob ); - Actor.addDelayed( mob, delay ); scene.addMobSprite( mob ); + Actor.addDelayed( mob, delay ); } public static void add( EmoIcon icon ) {