Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Using disconnect button in main menu opens multiplayer lobby #12482

Open
ldpl opened this issue Apr 12, 2024 · 2 comments
Open

[Bug]: Using disconnect button in main menu opens multiplayer lobby #12482

ldpl opened this issue Apr 12, 2024 · 2 comments

Comments

@ldpl
Copy link
Contributor

ldpl commented Apr 12, 2024

Version of OpenTTD

master(bb9b8b9)

Expected result

Connection window is closed and game stays in the main menu like it dose in case of connection error.

Actual result

Game opens multiplayer lobby.

Steps to reproduce

  1. In the main menu open console and use connect command, for example connect citymania.org:3980
  2. Quickly press the disconnect button before connection is made.
@TrueBrain
Copy link
Member

I would not consider this a bug. The console is not meant for normal use, and sure, if you know your way around you can use it for shortcuts like that. But the game is designed around the GUIs, and from a code-flow perspective it makes most sense to open the multiplayer window when you disconnect from a server.

And yes, one can argue the same should happen on a connection error, and maybe we should.

Either way, fixing this "bug" is most likely more trouble than worth.

My 2 cents.

@ldpl
Copy link
Contributor Author

ldpl commented Apr 12, 2024

Despite being named "Disconnect" it's logically a button to cancel connection attempt as you're not fully connected to the server yet. So it should bring you back where you started, not open some marginally related windows.

Also, fixing it may be as simple as just removing two lines.
So I guess question is why it even opening that window in the first place as it's should already be open if you're using GUI to connect. And connect command kicks you out of the active game anyway. It seems to be in the code since r1 so whatever reason was there may not even be relevant anymore, especially considering 05394d5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants