From cf9ce3b054115a6c838b2f56bd6efb53bee4ef8c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 6 Jun 2008 02:34:14 +0000 Subject: [PATCH] - Fixed: When following links in S_StartSound(), the function used sfx instead of S_Sfx as the array base for getting the NearLimit. SVN r1023 (trunk) --- docs/rh-log.txt | 4 +++- src/s_sound.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 1e12bdde7..ac19c9363 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,6 +1,8 @@ June 5, 2008 +- Fixed: When following links in S_StartSound(), the function used sfx + instead of S_Sfx as the array base for getting the NearLimit. - Repositioned the declaration of the file string in D_DoomMain() so that it - won't be left around on the stack at exit. + won't be left on the stack at exit. - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can free its Arguments. - Symbols for native classes are now freed on exit. diff --git a/src/s_sound.cpp b/src/s_sound.cpp index b9cc4f864..b9cd58091 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -709,17 +709,17 @@ static void S_StartSound (fixed_t *pt, AActor *mover, int channel, if (sfx->bPlayerReserve) { sound_id = S_FindSkinnedSound (mover, sound_id); - NearLimit = sfx[sound_id].NearLimit; + NearLimit = S_sfx[sound_id].NearLimit; } else if (sfx->bRandomHeader) { sound_id = S_PickReplacement (sound_id); - if (NearLimit < 0) NearLimit = sfx[sound_id].NearLimit; + if (NearLimit < 0) NearLimit = S_sfx[sound_id].NearLimit; } else { sound_id = sfx->link; - if (NearLimit < 0) NearLimit = sfx[sound_id].NearLimit; + if (NearLimit < 0) NearLimit = S_sfx[sound_id].NearLimit; } sfx = &S_sfx[sound_id]; }