ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.34k stars 2.28k forks source link

Lazer Tournament Client automatically switches to Gameplay scene after every ban. #24857

Open DerHamm3r opened 1 year ago

DerHamm3r commented 1 year ago

Type

Game behaviour

Bug description

What is the bug?

Sometimes during match streams the client wants to switch back to the gameplay scene after every individual ban that gets input. This seems to happen both with and without warmups enabled. This usually seems to happen when a player gets to pick a warmup and still had a map selected that was part of the current mappool when they got host in the lobby. It also happens sometimes without that. This has turned into a small annoyance and makes the stream look a bit more scuffed.

How to recreate this?

Open a private tournament lobby and join it while having the spectator client and lazer client open. Have a stage with a mappool and a match selected, then give host to someone in the lobby that either still has it, or that selects a map in the pool while still in warmup phase and not having bans selected. After that it should jump back to the gameplay scene every time a single ban is entered.

Potential fixes?

Starting to switch to the gameplay scene when a map in the pool gets picked is the intended behavior, and having a player still have the map selected seems to be what causes this. One way to fix this would be to disable auto switching while warmup is still enabled (or make this something the streamer can enable), or add the new "disable auto switching" slider from the setup screen to the mappool scene too so that the streamer can just temporarily disable it there.

Last occurrence

This last happened during my last stream this sunday around 18:40 UTC (20:40 local time if thats what the logs note) in case the logs help with this.

Screenshots or videos

No response

Version

2023.815.0-lazer

Logs

legacy-ipc.log network.log performance.log runtime.log updater.log database.log input.log

peppy commented 1 year ago

I'm having trouble understanding your explanation, If you can reproduce it, can you make a video showing this?

DerHamm3r commented 1 year ago

Here's the VOD from my last stream https://www.twitch.tv/videos/1928107392 You can see it happen at around 10:20, 10:40 and 11:27. It also happens after the first ban but since the animation of the first ban was still playing when I entered the second ban it didn't change back for that one. The client always jumped to the gameplay scene, then I manually went back to the mappool scene.

DerHamm3r commented 1 year ago

Whoops missclick. I think this stream was one of the cases where it just started to happen randomly. As far as I am aware the intended behavior should be to auto switch scenes whenever a map is picked and not banned right? Since this is what usually happens.

peppy commented 1 year ago

Looking at the code, this can only feasibly happen if there's at least one "pick" (ie. not a ban) in the current match. From watching the stream, this doesn't seem like it's the case, but maybe you have some idea on how this happened with this added knowledge?

https://github.com/ppy/osu/blob/5ad80879b771015b757823b9fd322ebe7b1c87f1/osu.Game.Tournament/Screens/MapPool/MapPoolScreen.cs#L218-L222

DerHamm3r commented 1 year ago

The only thing that comes to my mind is this: When a referee opens a lobby with the !mp make command it doesn't have an active map. When the first player then gets the lobby host to pick their warmup map the last map that they played before joining is what becomes the "active map" until they start to change it to whatever they want to play as their warmup. Maybe if that last map they happened to play before joining the lobby was in the pool (aka if they practiced it before joining) then maybe it sees this map as a "pick" even tho it is not selected as one? Maybe that sets the pickType to Pick and something doesn't make it switch to ban when I select either "Red ban" or "Blue ban"?

peppy commented 1 year ago

In such a case, could you have removed a false pick using right mouse button?

peppy commented 1 year ago

Could you attach your backet.json file?

DerHamm3r commented 1 year ago

"In such a case, could you have removed a false pick using right mouse button?" I just tried that and that didn't fix it. One thing I noticed tho is that after entering the first ban (say red ban) it doesn't jumpt to the second ban (blue ban) but instead jumps to red pick after just entering one ban. Hitting "reset" fixed it tho.

Apparently github doesn't support .json so I uploaded it to google drive: https://drive.google.com/file/d/16QXT8SfzVJwfUbmVsQdSuolR8xn9ImBb/view?usp=sharing Note that you will probably need either a dummy ipc.txt or have the cutting edge spectator client set up and spectate a lobby to change beatmaps to reproduce this.

peppy commented 1 year ago

Yes, I think this is because we assume only one ban right now. But I'm also not sure that's related to the issue at hand.