This commit is contained in:
frutescens 2024-11-01 12:44:53 -07:00
parent 47087d7bad
commit 47083262e9
2 changed files with 7 additions and 0 deletions

View File

@ -3213,6 +3213,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
let i = 0; let i = 0;
let rate = 0.85; let rate = 0.85;
const cry = this.scene.playSound(key, { rate: rate }) as AnySound; const cry = this.scene.playSound(key, { rate: rate }) as AnySound;
if (!cry || this.scene.fieldVolume === 0) {
return;
}
const sprite = this.getSprite(); const sprite = this.getSprite();
const tintSprite = this.getTintSprite(); const tintSprite = this.getTintSprite();
const delay = Math.max(this.scene.sound.get(key).totalDuration * 50, 25); const delay = Math.max(this.scene.sound.get(key).totalDuration * 50, 25);
@ -3276,6 +3279,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const fusionCryKey = this.fusionSpecies!.getCryKey(this.fusionFormIndex); const fusionCryKey = this.fusionSpecies!.getCryKey(this.fusionFormIndex);
let fusionCry = this.scene.playSound(fusionCryKey, { rate: rate }) as AnySound; let fusionCry = this.scene.playSound(fusionCryKey, { rate: rate }) as AnySound;
if (!cry || !fusionCry || this.scene.fieldVolume === 0) {
return;
}
fusionCry.stop(); fusionCry.stop();
duration = Math.min(duration, fusionCry.totalDuration * 1000); duration = Math.min(duration, fusionCry.totalDuration * 1000);
fusionCry.destroy(); fusionCry.destroy();

View File

@ -157,6 +157,7 @@ export default class GameManager {
this.scene.enableTutorials = false; this.scene.enableTutorials = false;
this.scene.gameData.gender = PlayerGender.MALE; // set initial player gender this.scene.gameData.gender = PlayerGender.MALE; // set initial player gender
this.scene.battleStyle = this.settings.battleStyle; this.scene.battleStyle = this.settings.battleStyle;
this.scene.fieldVolume = 0;
} }
/** /**