Surface lobby ServerData updates in FOnlineSessionSettings#88
Open
maryammadzadeh wants to merge 1 commit into
Open
Surface lobby ServerData updates in FOnlineSessionSettings#88maryammadzadeh wants to merge 1 commit into
maryammadzadeh wants to merge 1 commit into
Conversation
72a90f3 to
0b50353
Compare
FOnlineSessionPlayFab::OnLobbyUpdate mirrors most PFLobbyUpdatedStateChange fields into FNamedOnlineSession::SessionSettings but silently ignores the three fields added for the server-on-client-owned-lobby feature (PFMultiplayerJoinLobbyAsServer + PFLobbyServerPostUpdateAsServer). As a result, a game_server entity's data, presence, and liveness on a client-owned lobby are invisible to Unreal game code even though the SDK delivers them on every state change. Changes (all in OnLobbyUpdate, matching the style of the existing loops/flag handlers): (1) updatedServerPropertyKeys -- new loop reads each updated server property via PFLobbyGetServerProperty and writes it into SessionSettings.Settings, mirroring the existing lobby/search property loops; nullptr values remove the key. (2) serverUpdated -- calls PFLobbyGetServer and exposes the joined server's entity id under the reserved key _server_entity; on departure the key is removed along with _server_connection_status. (3) serverConnectionStatusUpdated -- calls PFLobbyGetServerConnectionStatus and exposes Connected/NotConnected under the reserved key _server_connection_status so clients can detect when the server's link drops and ServerData may go stale. No public API change, no header change, no SDK version bump. No behavior change when no game_server has joined the lobby. Reserved key naming follows the existing _flags convention.
0b50353 to
11338b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FOnlineSessionPlayFab::OnLobbyUpdatemirrors mostPFLobbyUpdatedStateChangefields intoFNamedOnlineSession::SessionSettingsbut silently ignores the three fields added for the server-on-client-owned-lobby feature (PFMultiplayerJoinLobbyAsServer+PFLobbyServerPostUpdateAsServer). As a result, agame_serverentity's data, presence, and liveness on a client-owned lobby are invisible to Unreal game code even though the SDK delivers them on every state change.Changes
All in
Source/Private/OnlineSessionInterfacePlayFab.cpp, insideOnLobbyUpdate, matching the style of the existing loops/flag handlers:updatedServerPropertyKeys— new loop reads each updated server property viaPFLobbyGetServerPropertyand writes it intoSessionSettings.Settings, mirroring the existingupdatedLobbyPropertyKeysandupdatedSearchPropertyKeysloops.nullptrvalues remove the key.serverUpdated— callsPFLobbyGetServerand exposes the joined server's entity id under the reserved key_server_entity. On departure the key is removed (along with_server_connection_status).serverConnectionStatusUpdated— callsPFLobbyGetServerConnectionStatusand exposes"Connected"/"NotConnected"under the reserved key_server_connection_status, so clients can detect when the server's link to the lobby service drops and ServerData may go stale.ate.