mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-02 07:42:12 -05:00
Fix D O G A R S (#1782)
This commit is contained in:
@@ -1592,6 +1592,8 @@ class BattleScene {
|
||||
this.bgm = BattleSound.loadBgm('audio/sm-rival.mp3', 11389, 62158, this.bgm);
|
||||
break;
|
||||
}
|
||||
|
||||
this.updateBgm();
|
||||
}
|
||||
updateBgm() {
|
||||
/**
|
||||
|
||||
@@ -137,7 +137,10 @@ const BattleSound = new class {
|
||||
|
||||
/** loopstart and loopend are in milliseconds */
|
||||
loadBgm(url: string, loopstart: number, loopend: number, replaceBGM?: BattleBGM | null) {
|
||||
if (replaceBGM) this.deleteBgm(replaceBGM);
|
||||
if (replaceBGM) {
|
||||
replaceBGM.stop();
|
||||
this.deleteBgm(replaceBGM);
|
||||
}
|
||||
|
||||
const bgm = new BattleBGM(url, loopstart, loopend);
|
||||
this.bgm.push(bgm);
|
||||
|
||||
Reference in New Issue
Block a user