From f2a33fe1c6e2d11b7f4e1d9ce8275cd482ceda32 Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 22 Oct 2021 15:50:52 -0400 Subject: [PATCH] Revert "update for new session option" This reverts commit b72b0d59fefceb53c770703d0052121219796b57. --- .../Classes/CreateSessionCallbackProxyAdvanced.h | 6 +----- .../Private/CreateSessionCallbackProxyAdvanced.cpp | 9 +-------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/AdvancedSessions/Source/AdvancedSessions/Classes/CreateSessionCallbackProxyAdvanced.h b/AdvancedSessions/Source/AdvancedSessions/Classes/CreateSessionCallbackProxyAdvanced.h index 6be8624..067d6e1 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Classes/CreateSessionCallbackProxyAdvanced.h +++ b/AdvancedSessions/Source/AdvancedSessions/Classes/CreateSessionCallbackProxyAdvanced.h @@ -24,11 +24,10 @@ class UCreateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase * @param PublicConnections When doing a 'listen' server, this must be >=2 (ListenServer itself counts as a connection) * @param bUseLAN When you want to play LAN, the level to play on must be loaded with option 'bIsLanMatch' * @param bUsePresence Must be true for a 'listen' server (Map must be loaded with option 'listen'), false for a 'dedicated' server. - * @param bUseLobbiesIfAvailable Used to flag the subsystem to use a lobby api instead of general hosting if the API supports it. * @param bShouldAdvertise Set to true when the OnlineSubsystem should list your server when someone is searching for servers. Otherwise the server is hidden and only join via invite is possible. */ UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions") - static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray &ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = true, bool bIsDedicatedServer = false, bool bUsePresence = true, bool bUseLobbiesIfAvailable = false, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true); + static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray &ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = true, bool bIsDedicatedServer = false, bool bUsePresence = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true); // UOnlineBlueprintCallProxyBase interface virtual void Activate() override; @@ -72,9 +71,6 @@ private: // Whether to use the presence option bool bUsePresence; - // Whether to prefer the use of lobbies for hosting if the api supports them - bool bUseLobbiesIfAvailable; - // Whether to allow joining via presence bool bAllowJoinViaPresence; diff --git a/AdvancedSessions/Source/AdvancedSessions/Private/CreateSessionCallbackProxyAdvanced.cpp b/AdvancedSessions/Source/AdvancedSessions/Private/CreateSessionCallbackProxyAdvanced.cpp index e6b46ee..086b8f6 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Private/CreateSessionCallbackProxyAdvanced.cpp +++ b/AdvancedSessions/Source/AdvancedSessions/Private/CreateSessionCallbackProxyAdvanced.cpp @@ -13,7 +13,7 @@ UCreateSessionCallbackProxyAdvanced::UCreateSessionCallbackProxyAdvanced(const F { } -UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray &ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, bool bUsePresence, bool bUseLobbiesIfAvailable, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise) +UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray &ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, bool bUsePresence, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise) { UCreateSessionCallbackProxyAdvanced* Proxy = NewObject(); Proxy->PlayerControllerWeakPtr = PlayerController; @@ -25,7 +25,6 @@ UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::Create Proxy->ExtraSettings = ExtraSettings; Proxy->bDedicatedServer = bIsDedicatedServer; Proxy->bUsePresence = bUsePresence; - Proxy->bUseLobbiesIfAvailable = bUseLobbiesIfAvailable; Proxy->bAllowJoinViaPresence = bAllowJoinViaPresence; Proxy->bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly; Proxy->bAntiCheatProtected = bAntiCheatProtected; @@ -58,15 +57,9 @@ void UCreateSessionCallbackProxyAdvanced::Activate() Settings.bIsDedicated = bDedicatedServer; if (bDedicatedServer) - { Settings.bUsesPresence = false; - Settings.bUseLobbiesIfAvailable = false; - } else - { Settings.bUsesPresence = bUsePresence; - Settings.bUseLobbiesIfAvailable = bUseLobbiesIfAvailable; - } Settings.bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly; Settings.bAntiCheatProtected = bAntiCheatProtected;