mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-23 08:24:18 +00:00
sf
This commit is contained in:
@@ -20,7 +20,7 @@ class UCreateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
||||
|
||||
// Creates a session with the default online subsystem with advanced optional inputs
|
||||
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
|
||||
static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, bool bUseLAN = false, bool bAllowInvites = true, bool bIsDedicatedServer = false);
|
||||
static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, 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;
|
||||
@@ -58,6 +58,24 @@ private:
|
||||
// Whether this is a dedicated server or not
|
||||
bool bDedicatedServer;
|
||||
|
||||
// Whether to use the presence option
|
||||
bool bUsePresence;
|
||||
|
||||
// Whether to allow joining via presence
|
||||
bool bAllowJoinViaPresence;
|
||||
|
||||
// Allow joining via presence for friends only
|
||||
bool bAllowJoinViaPresenceFriendsOnly;
|
||||
|
||||
// Delcare the server to be anti cheat protected
|
||||
bool bAntiCheatProtected;
|
||||
|
||||
// Record Stats
|
||||
bool bUsesStats;
|
||||
|
||||
// Should advertise server?
|
||||
bool bShouldAdvertise;
|
||||
|
||||
// Store extra settings
|
||||
TArray<FSessionPropertyKeyPair> ExtraSettings;
|
||||
|
||||
|
@@ -13,7 +13,7 @@ UCreateSessionCallbackProxyAdvanced::UCreateSessionCallbackProxyAdvanced(const F
|
||||
{
|
||||
}
|
||||
|
||||
UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer)
|
||||
UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, bool bUsePresence, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise)
|
||||
{
|
||||
UCreateSessionCallbackProxyAdvanced* Proxy = NewObject<UCreateSessionCallbackProxyAdvanced>();
|
||||
Proxy->PlayerControllerWeakPtr = PlayerController;
|
||||
@@ -23,7 +23,12 @@ UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::Create
|
||||
Proxy->bAllowInvites = bAllowInvites;
|
||||
Proxy->ExtraSettings = ExtraSettings;
|
||||
Proxy->bDedicatedServer = bIsDedicatedServer;
|
||||
|
||||
Proxy->bUsePresence = bUsePresence;
|
||||
Proxy->bAllowJoinViaPresence = bAllowJoinViaPresence;
|
||||
Proxy->bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly;
|
||||
Proxy->bAntiCheatProtected = bAntiCheatProtected;
|
||||
Proxy->bUsesStats = bUsesStats;
|
||||
Proxy->bShouldAdvertise = bShouldAdvertise;
|
||||
return Proxy;
|
||||
}
|
||||
|
||||
@@ -46,9 +51,13 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
|
||||
Settings.bShouldAdvertise = true;
|
||||
Settings.bAllowJoinInProgress = true;
|
||||
Settings.bIsLANMatch = bUseLAN;
|
||||
Settings.bUsesPresence = true;
|
||||
Settings.bUsesPresence = bUsePresence;
|
||||
Settings.bAllowJoinViaPresence = true;
|
||||
Settings.bIsDedicated = bDedicatedServer;
|
||||
Settings.bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly;
|
||||
Settings.bAntiCheatProtected = bAntiCheatProtected;
|
||||
Settings.bUsesStats = bUsesStats;
|
||||
Settings.bShouldAdvertise = bShouldAdvertise;
|
||||
|
||||
// These are about the only changes over the standard Create Sessions Node
|
||||
Settings.bAllowInvites = bAllowInvites;
|
||||
|
Reference in New Issue
Block a user