- let the sound code use the current UI level.

This is what should be audible. To prevent other levels from playing sound, all entry points check whether the sound playing entity belongs to the current UI level.
This commit is contained in:
Christoph Oelckers 2019-01-27 19:32:38 +01:00
commit 4d98c10ea3
6 changed files with 44 additions and 35 deletions

View file

@ -701,7 +701,7 @@ void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1,
{
if (shortest == NULL || shortest->sounddist > seg.sounddist) shortest = &seg;
}
S_Sound (DVector3(shortest->soundpos, r_viewpoint.Pos.Z), CHAN_WEAPON, sound, 1, ATTN_NORM);
S_Sound (source->Level, DVector3(shortest->soundpos, r_viewpoint.Pos.Z), CHAN_WEAPON, sound, 1, ATTN_NORM);
}
}
}