mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fixed: The pitch shifting info for sounds needs to be taken from the sfxinfo currently being played, not the one it links to.
This commit is contained in:
parent
5327055495
commit
58316c821d
1 changed files with 3 additions and 2 deletions
|
@ -917,6 +917,7 @@ static FSoundChan *S_StartSound(AActor *actor, const sector_t *sec, const FPolyO
|
||||||
// the referenced sound so some additional checks are required
|
// the referenced sound so some additional checks are required
|
||||||
int near_limit = sfx->NearLimit;
|
int near_limit = sfx->NearLimit;
|
||||||
float limit_range = sfx->LimitRange;
|
float limit_range = sfx->LimitRange;
|
||||||
|
auto pitchmask = sfx->PitchMask;
|
||||||
rolloff = &sfx->Rolloff;
|
rolloff = &sfx->Rolloff;
|
||||||
|
|
||||||
// Resolve player sounds, random sounds, and aliases
|
// Resolve player sounds, random sounds, and aliases
|
||||||
|
@ -1081,9 +1082,9 @@ static FSoundChan *S_StartSound(AActor *actor, const sector_t *sec, const FPolyO
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vary the sfx pitches.
|
// Vary the sfx pitches.
|
||||||
if (sfx->PitchMask != 0)
|
if (pitchmask != 0)
|
||||||
{
|
{
|
||||||
pitch = NORM_PITCH - (M_Random() & sfx->PitchMask) + (M_Random() & sfx->PitchMask);
|
pitch = NORM_PITCH - (M_Random() & pitchmask) + (M_Random() & pitchmask);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue