v0.9.3: fixed monk parry sfx playing when monks aren't visible

This commit is contained in:
Evan Debenham
2021-05-08 21:05:54 -04:00
parent 96d8cd07b9
commit c54eaf8b16

View File

@@ -118,7 +118,9 @@ public class Monk extends Mob {
return super.defenseVerb();
} else {
f.detach();
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
if (sprite != null && sprite.visible) {
Sample.INSTANCE.play(Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
}
focusCooldown = Random.NormalFloat( 6, 7 );
return Messages.get(this, "parried");
}