mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09: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:
@ -319,6 +319,16 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
|
|
||||||
protected void StartPlay()
|
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();
|
sampleStart?.Play();
|
||||||
|
|
||||||
// fallback is to allow this class to operate when there is no parent OnlineScreen (testing purposes).
|
// fallback is to allow this class to operate when there is no parent OnlineScreen (testing purposes).
|
||||||
|
Reference in New Issue
Block a user