From 2fde79b4bc3a8388eb7afc293a2020819c1d01dd Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 14 Oct 2012 22:13:49 +0000 Subject: [PATCH] A potential fix for MUSICANDSFX problems after loading a savegame. I was never able to reproduce the issue myself, but something like this seems like a good idea anyway. Thoughts? git-svn-id: https://svn.eduke32.com/eduke32@3083 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/savegame.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 039c639af..4b4ae11b4 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -1790,6 +1790,19 @@ static void postloadplayer(int32_t savegamep) //3.5 if (savegamep) { + int32_t i = headspritestat[STAT_FX]; + + while (i >= 0) + { + if (sprite[i].picnum == MUSICANDSFX) + { + T2 = ud.config.SoundToggle; + T1 = 0; + } + + i = nextspritestat[i]; + } + G_UpdateScreenArea(); FX_SetReverb(0); }