-
Notifications
You must be signed in to change notification settings - Fork 2.9k
DolphinQt/NetPlay: Allow users to join passwordless in-progress netplay rooms #14002
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
base: master
Are you sure you want to change the base?
DolphinQt/NetPlay: Allow users to join passwordless in-progress netplay rooms #14002
Conversation
85ef7e0
to
0341e74
Compare
allows players to join in-progress netplay rooms while setting their pad to none. If the game isn't running the original behavior of auto assigning a GC pad to new entrants isn't changed.
0341e74
to
dd838c4
Compare
Source/Core/Core/NetPlayServer.cpp
Outdated
if (m_start_pending) | ||
return ConnectionError::GameRunning; | ||
|
||
if (m_is_running && !Config::Get(Config::NETPLAY_INDEX_PASSWORD).empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale for requiring the room be without a password?
Other than that, this looks fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I guess I didn't think of the use case of wanting to join a friend's passworded in-progress session. All of line 451 and the resulting error message could be removed without issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash the commits and remove mention of the fixup in the commit message though. ;)
Please also put NetPlay:
at the start of the commit message.
removed m_is_running check and empty password check
|
||
AssignNewUserAPad(new_player); | ||
if (!m_is_running) | ||
AssignNewUserAPad(new_player); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second look of the existing NetPlay code, I don't think this is really enough to properly let a player join without them being part of the game session.
The main issue I see right now is that the odd player is still going to receive all the pad data reports, with NetPlayClient::OnPadData
causing forever growing buffers.
There may be other problems too. The NetPlay code has become hard to maintain and it wasn't really designed to do what you are are trying to do here.
I have plans to rewrite the whole thing at some point.
Allows players to join in-progress netplay rooms while setting their pad type to "none" so they can join and leave without affecting the in-progress game. If the game isn't running the original behavior of auto assigning a GC pad to new entrants isn't changed.
This is mainly just for chat, so people can enter public rooms and ask to join. The host can stop the emulation to pick them up into the game after assigning them a pad.
Dolphin.Netplay.Jip.mp4