Skip to content

Commit

Permalink
snd_restart: always restart the cgame
Browse files Browse the repository at this point in the history
Previously, it only restarted if you were in a game. So if you were in
the main menu, the music would stop playing. Pretty unhelpful if you are
trying to fix your sound...
  • Loading branch information
slipher committed Sep 28, 2024
1 parent ba59f4d commit b245b33
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/engine/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1476,22 +1476,10 @@ void CL_Snd_Restart_f()
{
Audio::Shutdown();

if( !cls.cgameStarted )
{
// In the main menu case the cgame is not restarted... but is there anything preventing
// the main menu from also using sound handles?
if (!Audio::Init()) {
Log::Warn("Couldn't initialize the audio subsystem.");
}
//TODO S_BeginRegistration()
}
else
{
if (!Audio::Init()) {
Log::Warn("Couldn't initialize the audio subsystem.");
}
CL_Vid_Restart_f();
if (!Audio::Init()) {
Log::Warn("Couldn't initialize the audio subsystem.");
}
CL_Vid_Restart_f();
}

/*
Expand Down

0 comments on commit b245b33

Please sign in to comment.