game / pragma.gameinstance / GameInstanceService / foundMorePlayersV1 /
foundMorePlayersV1 #
suspend fun foundMorePlayersV1(session: ServiceSession, request: GameInstanceRpc.FoundMorePlayersV1Request): GameInstanceRpc.FoundMorePlayersV1Response
Called by the MatchmakingService when matchmaking has found additional players for the game instance.
This endpoint will send the found players information to the game server to confirm their connection. For the selection of players being added, the GameInstancePlugin.buildExtGameServerPlayer method is invoked to provide an opportunity to edit the ExtGameServerPlayer for each player before being sent to the game server.
This endpoint will also kick off a background task to track the players being added to the game instance. A timeout of length GameInstanceServiceConfig.connectPlayersTimeoutMillis is set to wait for a game server to call GameInstanceRpc.ConnectMorePlayersV1Request for these players. If a GameInstanceRpc.ConnectMorePlayersV1Request call is not received within the timeout, the players who did not connect will be released from the game instance.
Each player will have their player session mutated; they are removed from matchmaking and added to the requested game instance.
Plugins
- GameInstancePlugin.buildExtGameServerPlayer - Provide ext data of each player to the game server before connecting the player.
PragmaResultErrors
- PragmaError.GameInstanceService_UnknownGameInstanceId - If the game instance id is not found in the list of tracked games.
- PragmaError.GameInstanceService_InternalError - If a lock on the specified game instance could not be held.