mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- Duke: Fixed WT fallback for classic sounds in cases the user data does not exist.
currently that's only the case for CRANEGRAB which is aliased because of differences between Duke and RR.
This commit is contained in:
parent
0480a5e992
commit
4bb66fb44e
1 changed files with 9 additions and 0 deletions
|
@ -132,6 +132,15 @@ static FSoundID GetReplacementSound(FSoundID soundNum)
|
|||
if (wt_forcevoc && isWorldTour() && soundEngine->isValidSoundId(soundNum))
|
||||
{
|
||||
auto const* snd = soundEngine->GetUserData(soundNum);
|
||||
if (snd == nullptr)
|
||||
{
|
||||
auto S_sfx = soundEngine->GetSfx(soundNum);
|
||||
if (!S_sfx->bRandomHeader && S_sfx->link != sfxinfo_t::NO_LINK)
|
||||
{
|
||||
snd = soundEngine->GetUserData(S_sfx->link);
|
||||
if (snd == nullptr) return soundNum;
|
||||
}
|
||||
}
|
||||
int sndx = snd[kWorldTourMapping];
|
||||
if (sndx > 0) soundNum = FSoundID::fromInt(sndx);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue