mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-22 16:04:18 +00:00
Committing in a format that will work for direct download.
Added additional search settings to "FindSessionsAdvanced" Forcing presence off with dedicated servers even if they have it ticked on. Former-commit-id: dc9cae32716ecf50f6ab6be53c830e2e1ac54a6d
This commit is contained in:
@@ -0,0 +1 @@
|
||||
a76786bb53d1bc69ee7cdab9e4aa673802d31bf2
|
@@ -0,0 +1 @@
|
||||
21bebdf84ebf3baa91d180db157a1f2e0dfbc4c0
|
1
Binaries/Win32/UE4-AdvancedSessions.lib.REMOVED.git-id
Normal file
1
Binaries/Win32/UE4-AdvancedSessions.lib.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
4ace3e4516cc2a4e8f0b950cd9ceb22f25edfd00
|
@@ -0,0 +1 @@
|
||||
d2f96ab9defedded126a4780a18c04ff4d92b8bc
|
@@ -0,0 +1 @@
|
||||
aff3301f274803705d0ef3315be24a6b3be274cf
|
1
Binaries/Win64/UE4-AdvancedSessions.lib.REMOVED.git-id
Normal file
1
Binaries/Win64/UE4-AdvancedSessions.lib.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
e3d98226a589c3853040dbd109aec7be7dcc3742
|
BIN
Binaries/Win64/UE4Editor-AdvancedSessions-Win64-DebugGame.dll
Normal file
BIN
Binaries/Win64/UE4Editor-AdvancedSessions-Win64-DebugGame.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0f13228cdcdc42445bc1fe94748f423a786a21fe
|
BIN
Binaries/Win64/UE4Editor-AdvancedSessions.dll
Normal file
BIN
Binaries/Win64/UE4Editor-AdvancedSessions.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
a9c3ed5d5005d7bc7bc08b55f03238128b11d6f4
|
8
Binaries/Win64/UE4Editor-Win64-DebugGame.modules
Normal file
8
Binaries/Win64/UE4Editor-Win64-DebugGame.modules
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Changelist" : 3142249,
|
||||
"BuildId" : "8ec6c032-25a1-4060-b513-5852f4db170c",
|
||||
"Modules" :
|
||||
{
|
||||
"AdvancedSessions" : "UE4Editor-AdvancedSessions-Win64-DebugGame.dll"
|
||||
}
|
||||
}
|
8
Binaries/Win64/UE4Editor.modules
Normal file
8
Binaries/Win64/UE4Editor.modules
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Changelist" : 3142249,
|
||||
"BuildId" : "049386af-3641-4a3d-b799-3557f9ac0157",
|
||||
"Modules" :
|
||||
{
|
||||
"AdvancedSessions" : "UE4Editor-AdvancedSessions.dll"
|
||||
}
|
||||
}
|
@@ -51,11 +51,11 @@ namespace EBPServerPresenceSearchType
|
||||
enum Type
|
||||
{
|
||||
ClientServersOnly,
|
||||
DedicatedServersOnly
|
||||
DedicatedServersOnly,
|
||||
AllServers
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// Wanted this to be switchable in the editor
|
||||
UENUM(BlueprintType)
|
||||
namespace EBPOnlinePresenceState
|
||||
|
@@ -21,7 +21,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, TEnumAsByte<EBPServerPresenceSearchType::Type> ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters);
|
||||
static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, TEnumAsByte<EBPServerPresenceSearchType::Type> ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, int MinSlotsAvailable = 0);
|
||||
|
||||
static bool CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux::Type Comparator);
|
||||
|
||||
@@ -76,6 +76,18 @@ private:
|
||||
// Store extra settings
|
||||
TArray<FSessionsSearchSetting> SearchSettings;
|
||||
|
||||
// Search for empty servers only
|
||||
bool bEmptyServersOnly;
|
||||
|
||||
// Search for non empty servers only
|
||||
bool bNonEmptyServersOnly;
|
||||
|
||||
// Search for secure servers only
|
||||
bool bSecureServersOnly;
|
||||
|
||||
// Min slots requires to search
|
||||
int MinSlotsAvailable;
|
||||
|
||||
// The world context object in which this call is taking place
|
||||
UObject* WorldContextObject;
|
||||
};
|
||||
|
@@ -53,9 +53,14 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
|
||||
Settings.bShouldAdvertise = true;
|
||||
Settings.bAllowJoinInProgress = true;
|
||||
Settings.bIsLANMatch = bUseLAN;
|
||||
Settings.bUsesPresence = bUsePresence;
|
||||
Settings.bAllowJoinViaPresence = true;
|
||||
Settings.bIsDedicated = bDedicatedServer;
|
||||
|
||||
if (bDedicatedServer)
|
||||
Settings.bUsesPresence = false;
|
||||
else
|
||||
Settings.bUsesPresence = bUsePresence;
|
||||
|
||||
Settings.bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly;
|
||||
Settings.bAntiCheatProtected = bAntiCheatProtected;
|
||||
Settings.bUsesStats = bUsesStats;
|
||||
|
@@ -14,7 +14,7 @@ UFindSessionsCallbackProxyAdvanced::UFindSessionsCallbackProxyAdvanced(const FOb
|
||||
{
|
||||
}
|
||||
|
||||
UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, TEnumAsByte<EBPServerPresenceSearchType::Type> ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters)
|
||||
UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, TEnumAsByte<EBPServerPresenceSearchType::Type> ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, int MinSlotsAvailable)
|
||||
{
|
||||
UFindSessionsCallbackProxyAdvanced* Proxy = NewObject<UFindSessionsCallbackProxyAdvanced>();
|
||||
Proxy->PlayerControllerWeakPtr = PlayerController;
|
||||
@@ -23,6 +23,10 @@ UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSess
|
||||
Proxy->WorldContextObject = WorldContextObject;
|
||||
Proxy->SearchSettings = Filters;
|
||||
Proxy->ServerSearchType = ServerTypeToSearch;
|
||||
Proxy->bEmptyServersOnly = bEmptyServersOnly,
|
||||
Proxy->bNonEmptyServersOnly = bNonEmptyServersOnly;
|
||||
Proxy->bSecureServersOnly = bSecureServersOnly;
|
||||
Proxy->MinSlotsAvailable = MinSlotsAvailable;
|
||||
return Proxy;
|
||||
}
|
||||
|
||||
@@ -46,6 +50,37 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
||||
// Create temp filter variable, because I had to re-define a blueprint version of this, it is required.
|
||||
FOnlineSearchSettingsEx tem;
|
||||
|
||||
/* // Search only for dedicated servers (value is true/false)
|
||||
#define SEARCH_DEDICATED_ONLY FName(TEXT("DEDICATEDONLY"))
|
||||
// Search for empty servers only (value is true/false)
|
||||
#define SEARCH_EMPTY_SERVERS_ONLY FName(TEXT("EMPTYONLY"))
|
||||
// Search for non empty servers only (value is true/false)
|
||||
#define SEARCH_NONEMPTY_SERVERS_ONLY FName(TEXT("NONEMPTYONLY"))
|
||||
// Search for secure servers only (value is true/false)
|
||||
#define SEARCH_SECURE_SERVERS_ONLY FName(TEXT("SECUREONLY"))
|
||||
// Search for presence sessions only (value is true/false)
|
||||
#define SEARCH_PRESENCE FName(TEXT("PRESENCESEARCH"))
|
||||
// Search for a match with min player availability (value is int)
|
||||
#define SEARCH_MINSLOTSAVAILABLE FName(TEXT("MINSLOTSAVAILABLE"))
|
||||
// Exclude all matches where any unique ids in a given array are present (value is string of the form "uniqueid1;uniqueid2;uniqueid3")
|
||||
#define SEARCH_EXCLUDE_UNIQUEIDS FName(TEXT("EXCLUDEUNIQUEIDS"))
|
||||
// User ID to search for session of
|
||||
#define SEARCH_USER FName(TEXT("SEARCHUSER"))
|
||||
// Keywords to match in session search
|
||||
#define SEARCH_KEYWORDS FName(TEXT("SEARCHKEYWORDS"))*/
|
||||
|
||||
if(bEmptyServersOnly)
|
||||
tem.Set(SEARCH_EMPTY_SERVERS_ONLY, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
if (bNonEmptyServersOnly)
|
||||
tem.Set(SEARCH_NONEMPTY_SERVERS_ONLY, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
if (bSecureServersOnly)
|
||||
tem.Set(SEARCH_SECURE_SERVERS_ONLY, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
if (MinSlotsAvailable != 0)
|
||||
tem.Set(SEARCH_MINSLOTSAVAILABLE, MinSlotsAvailable, EOnlineComparisonOp::GreaterThanEquals);
|
||||
|
||||
switch (ServerSearchType)
|
||||
{
|
||||
|
||||
@@ -56,8 +91,18 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
||||
break;
|
||||
|
||||
case EBPServerPresenceSearchType::DedicatedServersOnly:
|
||||
{
|
||||
tem.Set(SEARCH_DEDICATED_ONLY, true, EOnlineComparisonOp::Equals);
|
||||
}
|
||||
break;
|
||||
|
||||
case EBPServerPresenceSearchType::AllServers:
|
||||
default:
|
||||
break;
|
||||
{
|
||||
// tem.Set(SEARCH_DEDICATED_ONLY, false, EOnlineComparisonOp::Equals);
|
||||
// tem.Set(SEARCH_PRESENCE, false, EOnlineComparisonOp::Equals);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user