mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 16:11:23 +00:00
fixed handling of DSDHacked sound replacement in the index range between the regular sounds and the MBF21 extensions.
This commit is contained in:
parent
4d88e82e32
commit
478a832515
1 changed files with 7 additions and 4 deletions
|
@ -152,9 +152,12 @@ static PClassActor* FindInfoName(int index, bool mustexist = false)
|
|||
static FSoundID DehFindSound(int index,bool mustexist = false)
|
||||
{
|
||||
if (index < 0) return NO_SOUND;
|
||||
if (index < (int) SoundMap.Size()) return SoundMap[index];
|
||||
if (index < (int) SoundMap.Size() && SoundMap[index].isvalid()) return SoundMap[index];
|
||||
if (dsdhacked && !mustexist)
|
||||
{
|
||||
FStringf name("~dsdhacked/#%d", index);
|
||||
if (dsdhacked && !mustexist) return soundEngine->FindSoundTentative(name.GetChars());
|
||||
return soundEngine->FindSoundTentative(name.GetChars());
|
||||
}
|
||||
return NO_SOUND;
|
||||
}
|
||||
|
||||
|
@ -1476,7 +1479,7 @@ static int PatchThing (int thingy)
|
|||
}
|
||||
else if (stricmp (Line1 + linelen - 6, " sound") == 0)
|
||||
{
|
||||
FSoundID snd = DehFindSound(val - 1);
|
||||
FSoundID snd = DehFindSound(val - 1, false);
|
||||
|
||||
if (snd == NO_SOUND) // This won't trigger for dsdhacked patches!
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue