Commit 315aac8d authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro

parents 6f8ad10e f788c0d4
...@@ -52,6 +52,7 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -52,6 +52,7 @@ void SoundManager::PlaySoundEffect(int sound) {
#ifdef YGOPRO_USE_IRRKLANG #ifdef YGOPRO_USE_IRRKLANG
if(!mainGame->chkEnableSound->isChecked()) if(!mainGame->chkEnableSound->isChecked())
return; return;
engineSound->setSoundVolume(mainGame->gameConf.sound_volume);
switch(sound) { switch(sound) {
case SOUND_SUMMON: { case SOUND_SUMMON: {
engineSound->play2D("./sound/summon.wav"); engineSound->play2D("./sound/summon.wav");
...@@ -180,7 +181,6 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -180,7 +181,6 @@ void SoundManager::PlaySoundEffect(int sound) {
default: default:
break; break;
} }
engineSound->setSoundVolume(mainGame->gameConf.sound_volume);
#endif #endif
} }
void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) { void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
...@@ -212,8 +212,8 @@ void SoundManager::PlayMusic(char* song, bool loop) { ...@@ -212,8 +212,8 @@ void SoundManager::PlayMusic(char* song, bool loop) {
return; return;
if(!engineMusic->isCurrentlyPlaying(song)) { if(!engineMusic->isCurrentlyPlaying(song)) {
engineMusic->stopAllSounds(); engineMusic->stopAllSounds();
soundBGM = engineMusic->play2D(song, loop, false, true);
engineMusic->setSoundVolume(mainGame->gameConf.music_volume); engineMusic->setSoundVolume(mainGame->gameConf.music_volume);
soundBGM = engineMusic->play2D(song, loop, false, true);
} }
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment