Merge pull request #439 from DanielNoord/fix/gamesound (#437)

Incorporated the general game volume in calculation of notifications volumes
This commit is contained in:
DanielNoord
2020-12-13 22:14:36 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -1884,7 +1884,7 @@ CM.Disp.Flash = function(mode, config) {
CM.Disp.PlaySound = function(url, sndConfig, volConfig) {
if (CM.Config[sndConfig] == 1) {
var sound = new realAudio(url);
sound.volume = CM.Config[volConfig] / 100;
sound.volume = (CM.Config[volConfig] / 100) * (Game.volume / 100);
sound.play();
}
}

View File

@@ -980,7 +980,7 @@ CM.Disp.Flash = function(mode, config) {
CM.Disp.PlaySound = function(url, sndConfig, volConfig) {
if (CM.Config[sndConfig] == 1) {
var sound = new realAudio(url);
sound.volume = CM.Config[volConfig] / 100;
sound.volume = (CM.Config[volConfig] / 100) * (Game.volume / 100);
sound.play();
}
}