mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
Ensure user is returned to the RoomSubScreen
before gameplay is started
This covers the scenario where a user may be at the song select screen while another user (the room host) starts the match. This was only made possible with the new queue modes, so is quite a recent regression.
This commit is contained in:
parent
a76cfbea21
commit
0ea7a69084
@ -319,6 +319,16 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
|
||||
protected void StartPlay()
|
||||
{
|
||||
// User may be at song select or otherwise when the host starts gameplay.
|
||||
// Ensure that they first return to this screen, else global bindables (beatmap etc.) may be in a bad state.
|
||||
if (!this.IsCurrentScreen())
|
||||
{
|
||||
this.MakeCurrent();
|
||||
|
||||
Schedule(StartPlay);
|
||||
return;
|
||||
}
|
||||
|
||||
sampleStart?.Play();
|
||||
|
||||
// fallback is to allow this class to operate when there is no parent OnlineScreen (testing purposes).
|
||||
|
Loading…
Reference in New Issue
Block a user