- 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:
parent
b4a95ccaa9
commit
4d98c10ea3
6 changed files with 44 additions and 35 deletions
|
|
@ -302,7 +302,7 @@ bool P_ChangeSwitchTexture (side_t *side, int useAgain, uint8_t special, bool *q
|
|||
}
|
||||
if (playsound)
|
||||
{
|
||||
S_Sound (DVector3(pt, 0), CHAN_VOICE|CHAN_LISTENERZ, sound, 1, ATTN_STATIC);
|
||||
S_Sound (side->GetLevel(), DVector3(pt, 0), CHAN_VOICE|CHAN_LISTENERZ, sound, 1, ATTN_STATIC);
|
||||
}
|
||||
if (quest != NULL)
|
||||
{
|
||||
|
|
@ -398,7 +398,7 @@ void DActiveButton::Tick ()
|
|||
if (def != NULL)
|
||||
{
|
||||
m_Frame = -1;
|
||||
S_Sound (DVector3(m_Pos, 0), CHAN_VOICE|CHAN_LISTENERZ,
|
||||
S_Sound (Level, DVector3(m_Pos, 0), CHAN_VOICE|CHAN_LISTENERZ,
|
||||
def->Sound != 0 ? FSoundID(def->Sound) : FSoundID("switches/normbutn"),
|
||||
1, ATTN_STATIC);
|
||||
bFlippable = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue