v0.7.0: fixed blacksmith sound errors caused by timekeeper's hourglass

This commit is contained in:
Evan Debenham 2018-06-24 22:20:57 -04:00
parent a282833a0e
commit bb5b493c1b

View File

@ -75,7 +75,8 @@ public class BlacksmithSprite extends MobSprite {
public void onComplete( Animation anim ) { public void onComplete( Animation anim ) {
super.onComplete( anim ); super.onComplete( anim );
if (visible && emitter != null && anim == idle) { //FIXME should figure out why onComplete is called constantly when an animation is paused
if (visible && emitter != null && anim == idle && !paused) {
emitter.burst( Speck.factory( Speck.FORGE ), 3 ); emitter.burst( Speck.factory( Speck.FORGE ), 3 );
float volume = 0.2f / (Dungeon.level.distance( ch.pos, Dungeon.hero.pos )); float volume = 0.2f / (Dungeon.level.distance( ch.pos, Dungeon.hero.pos ));
Sample.INSTANCE.play( Assets.SND_EVOKE, volume, volume, 0.8f ); Sample.INSTANCE.play( Assets.SND_EVOKE, volume, volume, 0.8f );