From 769d6e29787116631425f56e72da8c0597ff277a Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 6 Jul 2023 12:13:06 -0400 Subject: [PATCH] v2.1.4: fixed visual errors when hiding mimics were magically slept --- .../shatteredpixeldungeon/actors/mobs/Mimic.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java index 0ca90418a..f2143871f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java @@ -125,9 +125,12 @@ public class Mimic extends Mob { protected boolean act() { if (alignment == Alignment.NEUTRAL && state != PASSIVE){ alignment = Alignment.ENEMY; - GLog.w(Messages.get(this, "reveal") ); - CellEmitter.get(pos).burst(Speck.factory(Speck.STAR), 10); - Sample.INSTANCE.play(Assets.Sounds.MIMIC); + if (sprite != null) sprite.idle(); + if (Dungeon.level.heroFOV[pos]) { + GLog.w(Messages.get(this, "reveal") ); + CellEmitter.get(pos).burst(Speck.factory(Speck.STAR), 10); + Sample.INSTANCE.play(Assets.Sounds.MIMIC); + } } return super.act(); }