From 8682f37b24e78df211658b13bd5a281e05ba3662 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 20 Feb 2007 00:25:26 +0000 Subject: [PATCH] - Fixed: $Ambient SNDINFO commands zeroed the AmbientSound structure, which is a no-no when using FString. SVN r490 (trunk) --- docs/rh-log.txt | 2 ++ src/s_advsound.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 7d6eff241..26b1c6b6b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ February 19, 2007 +- Fixed: $Ambient SNDINFO commands zeroed the AmbientSound structure, which + is a no-no when using FString. - Fixed: DEM_WIPEON/OFF commands should be ignored during demo playback and not pause the game, or the whole thing will be out of sync. - Fixed: Playing a demo in windowed mode no longer grabs the mouse. diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index ef64f5a9b..6789a9a79 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -901,7 +901,12 @@ static void S_AddSNDINFO (int lump) { ambient = Ambients[sc_Number]; } - memset (ambient, 0, sizeof(AmbientSound)); + ambient->type = 0; + ambient->periodmin = 0; + ambient->periodmax = 0; + ambient->volume = 0; + ambient->attenuation = 0; + ambient->sound = ""; SC_MustGetString (); ambient->sound = sc_String;