Force the soundtrack to be sent again

This commit is contained in:
smallmodel 2024-08-25 23:45:18 +02:00
parent ac22b1cfbf
commit 07f13d1ae9
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -1528,7 +1528,12 @@ void ChangeSoundtrack(const char *soundtrack)
level.saved_soundtrack = level.current_soundtrack;
level.current_soundtrack = soundtrack;
// Force the soundtrack to be sent again by setting it to empty first
// so it gets sent to clients again especially when loading
// from a saved game
gi.setConfigstring(CS_MUSIC, "");
gi.setConfigstring(CS_MUSIC, soundtrack);
gi.DPrintf("soundtrack switched to %s.\n", soundtrack);
}