From 579e2a1f60a071ed55ab885a80a5bf72881e308f Mon Sep 17 00:00:00 2001 From: Joshua Date: Wed, 2 Oct 2024 09:46:58 -0400 Subject: [PATCH] update AS for the new presence changes update AS for the new presence changes, with no SEARCH_PRESENCE and only bSearchLobbies being used, we don't need to actually set it manually, but rather just allow the type of search to handle whether it should be set or not. --- AdvancedSessions/AdvancedSessions.uplugin | 4 ++-- .../Classes/FindSessionsCallbackProxyAdvanced.h | 4 ++-- .../Private/FindSessionsCallbackProxyAdvanced.cpp | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AdvancedSessions/AdvancedSessions.uplugin b/AdvancedSessions/AdvancedSessions.uplugin index 7dc2e3a..a970a4a 100644 --- a/AdvancedSessions/AdvancedSessions.uplugin +++ b/AdvancedSessions/AdvancedSessions.uplugin @@ -1,8 +1,8 @@ { "FileVersion": 3, "FriendlyName": "Advanced Sessions", - "Version": 5.4, - "VersionName": "5.4", + "Version": 5.5, + "VersionName": "5.5", "Description": "Adds new blueprint functions to handle more advanced session operations.", "Category": "Advanced Sessions Plugin", "CreatedBy": "Joshua Statzer", diff --git a/AdvancedSessions/Source/AdvancedSessions/Classes/FindSessionsCallbackProxyAdvanced.h b/AdvancedSessions/Source/AdvancedSessions/Classes/FindSessionsCallbackProxyAdvanced.h index e610277..5d225d8 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Classes/FindSessionsCallbackProxyAdvanced.h +++ b/AdvancedSessions/Source/AdvancedSessions/Classes/FindSessionsCallbackProxyAdvanced.h @@ -28,7 +28,7 @@ class UFindSessionsCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase // Searches for advertised sessions with the default online subsystem and includes an array of filters UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", AutoCreateRefTerm="Filters"), Category = "Online|AdvancedSessions") - static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, bool bSearchLobbies = true, int MinSlotsAvailable = 0); + static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, /*bool bSearchLobbies = true,*/ int MinSlotsAvailable = 0); static bool CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux Comparator); @@ -99,7 +99,7 @@ private: bool bSecureServersOnly; // Search through lobbies - bool bSearchLobbies; + //bool bSearchLobbies; // Min slots requires to search int MinSlotsAvailable; diff --git a/AdvancedSessions/Source/AdvancedSessions/Private/FindSessionsCallbackProxyAdvanced.cpp b/AdvancedSessions/Source/AdvancedSessions/Private/FindSessionsCallbackProxyAdvanced.cpp index dc0dc4b..7325caa 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Private/FindSessionsCallbackProxyAdvanced.cpp +++ b/AdvancedSessions/Source/AdvancedSessions/Private/FindSessionsCallbackProxyAdvanced.cpp @@ -16,7 +16,7 @@ UFindSessionsCallbackProxyAdvanced::UFindSessionsCallbackProxyAdvanced(const FOb bIsOnSecondSearch = false; } -UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, bool bSearchLobbies, int MinSlotsAvailable) +UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, /*bool bSearchLobbies,*/ int MinSlotsAvailable) { UFindSessionsCallbackProxyAdvanced* Proxy = NewObject(); Proxy->PlayerControllerWeakPtr = PlayerController; @@ -28,7 +28,7 @@ UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSess Proxy->bEmptyServersOnly = bEmptyServersOnly, Proxy->bNonEmptyServersOnly = bNonEmptyServersOnly; Proxy->bSecureServersOnly = bSecureServersOnly; - Proxy->bSearchLobbies = bSearchLobbies; + //Proxy->bSearchLobbies = bSearchLobbies; Proxy->MinSlotsAvailable = MinSlotsAvailable; return Proxy; } @@ -114,9 +114,9 @@ void UFindSessionsCallbackProxyAdvanced::Activate() case EBPServerPresenceSearchType::ClientServersOnly: { - tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals); + //tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals); - if (bSearchLobbies && !IOnlineSubsystem::DoesInstanceExist("STEAM")) + //if (bSearchLobbies)// && !IOnlineSubsystem::DoesInstanceExist("STEAM")) tem.Set(SEARCH_LOBBIES, true, EOnlineComparisonOp::Equals); } break; @@ -140,9 +140,9 @@ void UFindSessionsCallbackProxyAdvanced::Activate() FOnlineSearchSettingsEx DedicatedOnly = tem; - tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals); + //tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals); - if (bSearchLobbies && !IOnlineSubsystem::DoesInstanceExist("STEAM")) + //if (bSearchLobbies)// && !IOnlineSubsystem::DoesInstanceExist("STEAM")) tem.Set(SEARCH_LOBBIES, true, EOnlineComparisonOp::Equals); //DedicatedOnly.Set(SEARCH_DEDICATED_ONLY, true, EOnlineComparisonOp::Equals);