diff --git a/src/modes/linear_world.cpp b/src/modes/linear_world.cpp index 64d7da984a9..148a8f97932 100644 --- a/src/modes/linear_world.cpp +++ b/src/modes/linear_world.cpp @@ -421,17 +421,20 @@ void LinearWorld::newLap(unsigned int kart_index) } if(!m_last_lap_sfx_played && lap_count > 1) { - if (UserConfigParams::m_music) + if (UserConfigParams::m_sfx) { m_last_lap_sfx->play(); m_last_lap_sfx_played = true; m_last_lap_sfx_playing = true; - // In case that no music is defined - if(music_manager->getCurrentMusic() && - music_manager->getMasterMusicVolume() > 0.2f) + // Temporarily reduce the volume of the main music + // So that the last lap SFX can be heard + if(UserConfigParams::m_music && + music_manager->getCurrentMusic()) { - music_manager->setTemporaryVolume(0.2f); + // The parameter taken by SetTemporaryVolume is a factor + // that gets multiplied with the master volume + music_manager->setTemporaryVolume(0.5f); } } else diff --git a/src/network/protocols/client_lobby.cpp b/src/network/protocols/client_lobby.cpp index d1b7d346b92..b1242272fd2 100644 --- a/src/network/protocols/client_lobby.cpp +++ b/src/network/protocols/client_lobby.cpp @@ -1686,6 +1686,7 @@ void ClientLobby::handleClientCommand(const std::string& cmd) AddonsPack::install(argv[1]); else if (argv[0] == "uninstalladdon" && argv.size() == 2) AddonsPack::uninstall(argv[1]); + // FIXME - this code duplicates functions that should be handled elsewhere. else if (argv[0] == "music" && argv.size() == 2) { int vol = atoi(argv[1].c_str());