From 785c04a4b46f978e52ad17e4af7eec3cadddebdc Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Sat, 2 Nov 2024 14:21:44 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com> --- src/field/pokemon.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 0daa085c8ee..cfbe217c208 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3214,7 +3214,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { let rate = 0.85; const cry = this.scene.playSound(key, { rate: rate }) as AnySound; if (!cry || this.scene.fieldVolume === 0) { - return; + return callback(); } const sprite = this.getSprite(); const tintSprite = this.getTintSprite(); @@ -3280,7 +3280,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const fusionCryKey = this.fusionSpecies!.getCryKey(this.fusionFormIndex); let fusionCry = this.scene.playSound(fusionCryKey, { rate: rate }) as AnySound; if (!cry || !fusionCry || this.scene.fieldVolume === 0) { - return; + return callback(); } fusionCry.stop(); duration = Math.min(duration, fusionCry.totalDuration * 1000); @@ -3325,7 +3325,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (i === transitionIndex && fusionCryKey) { SoundFade.fadeOut(this.scene, cry, Utils.fixedInt(Math.ceil((duration / rate) * 0.2))); fusionCry = this.scene.playSound(fusionCryKey, Object.assign({ seek: Math.max(fusionCry.totalDuration * 0.4, 0), rate: rate })); - SoundFade.fadeIn(this.scene, fusionCry, Utils.fixedInt(Math.ceil((duration / rate) * 0.2)), this.scene.masterVolume * this.scene.seVolume, 0); + SoundFade.fadeIn(this.scene, fusionCry, Utils.fixedInt(Math.ceil((duration / rate) * 0.2)), this.scene.masterVolume * this.scene.fieldVolume, 0); } rate *= 0.99; if (cry && !cry.pendingRemove) {