mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 05:02:56 +08:00
Merge pull request #17572 from peppy/fix-multi-sounds-explosion
Fix multiplayer sounds playing too much after gameplay
This commit is contained in:
commit
140eaa6039
@ -37,21 +37,21 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
{
|
{
|
||||||
base.UserJoined(user);
|
base.UserJoined(user);
|
||||||
|
|
||||||
userJoinedSample?.Play();
|
Scheduler.AddOnce(() => userJoinedSample?.Play());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UserLeft(MultiplayerRoomUser user)
|
protected override void UserLeft(MultiplayerRoomUser user)
|
||||||
{
|
{
|
||||||
base.UserLeft(user);
|
base.UserLeft(user);
|
||||||
|
|
||||||
userLeftSample?.Play();
|
Scheduler.AddOnce(() => userLeftSample?.Play());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UserKicked(MultiplayerRoomUser user)
|
protected override void UserKicked(MultiplayerRoomUser user)
|
||||||
{
|
{
|
||||||
base.UserKicked(user);
|
base.UserKicked(user);
|
||||||
|
|
||||||
userKickedSample?.Play();
|
Scheduler.AddOnce(() => userKickedSample?.Play());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hostChanged(ValueChangedEvent<APIUser> value)
|
private void hostChanged(ValueChangedEvent<APIUser> value)
|
||||||
@ -59,7 +59,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
// only play sound when the host changes from an already-existing host.
|
// only play sound when the host changes from an already-existing host.
|
||||||
if (value.OldValue == null) return;
|
if (value.OldValue == null) return;
|
||||||
|
|
||||||
hostChangedSample?.Play();
|
Scheduler.AddOnce(() => hostChangedSample?.Play());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user