Browse Source

bug: Fixed an issue where destroyed sound objects would play again after relog

tags/v0.10.4^2
Shaun 2 years ago
parent
commit
1b70ec99a1
2 changed files with 6 additions and 0 deletions
  1. +4
    -0
      src/client/js/sound/sound.js
  2. +2
    -0
      src/server/clientComponents/sound.js

+ 4
- 0
src/client/js/sound/sound.js View File

@@ -321,6 +321,10 @@ define([

const { player: { x, y } } = window;
this.update(x, y);
},

destroySoundEntry: function (soundEntry) {
this.sounds.spliceWhere(s => s === soundEntry);
}
};
});

+ 2
- 0
src/server/clientComponents/sound.js View File

@@ -43,6 +43,8 @@ define([
destroy: function () {
if (this.soundEntry?.sound)
this.soundEntry?.sound.stop();

soundManager.destroySoundEntry(this.soundEntry);
}
};
});

Loading…
Cancel
Save