- 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)
This commit is contained in:
Randy Heit 2008-06-06 02:34:14 +00:00
parent 2e28b0c9ce
commit cf9ce3b054
2 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,8 @@
June 5, 2008 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 - 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 - Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can
free its Arguments. free its Arguments.
- Symbols for native classes are now freed on exit. - Symbols for native classes are now freed on exit.

View file

@ -709,17 +709,17 @@ static void S_StartSound (fixed_t *pt, AActor *mover, int channel,
if (sfx->bPlayerReserve) if (sfx->bPlayerReserve)
{ {
sound_id = S_FindSkinnedSound (mover, sound_id); sound_id = S_FindSkinnedSound (mover, sound_id);
NearLimit = sfx[sound_id].NearLimit; NearLimit = S_sfx[sound_id].NearLimit;
} }
else if (sfx->bRandomHeader) else if (sfx->bRandomHeader)
{ {
sound_id = S_PickReplacement (sound_id); sound_id = S_PickReplacement (sound_id);
if (NearLimit < 0) NearLimit = sfx[sound_id].NearLimit; if (NearLimit < 0) NearLimit = S_sfx[sound_id].NearLimit;
} }
else else
{ {
sound_id = sfx->link; 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]; sfx = &S_sfx[sound_id];
} }