-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(matchmake-extension): Support additionalParticipants in AutoMatchmakeWithParamPostpone #40
base: main
Are you sure you want to change the base?
Conversation
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.
Only some minor things from me
…hmakeWithParamPostpone
2c01a31
to
943d8a4
Compare
@@ -37,10 +64,19 @@ func (commonProtocol *CommonProtocol) autoMatchmakeWithParamPostpone(err error, | |||
session = sessions[0] | |||
} | |||
|
|||
errCode := common_globals.AddPlayersToSession(session, []uint32{connection.ID}, connection, "") |
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.
Try something like
var errCode nex.Error // I think thats what the type is, assuming based off the diff
if useAdditionalParticipants {
errCode = common_globals.MovePlayersToSession(session, additionalParticipants, connection, autoMatchmakeParam.JoinMessage.Value)
} else {
errCode = common_globals.AddPlayersToSession(session, []uint32{connection.ID}, connection, autoMatchmakeParam.JoinMessage.Value)
}
if errCode != nil {
common_globals.Logger.Error(errCode.Error())
return nil, errCode
}
to prevent the repetitiveness. not sure if go will let you get away with this
Focusing on #35 for the time being |
Resolves PretendoNetwork/splatoon#3
Changes:
Implements moving players between sessions via additionalParticipants. Moving involves skipping disconnecting and migrating hosts, and just moves the connection from one room to another (with an accompanying SwitchGathering call). This happens for all participants and the caller.
Code is pretty thoroughly commented so I won't wax on it too much here.