3 Commits

Author SHA1 Message Date
Joshua
76cf3f6b4c correct the create session node not passing on bAllowJoingViaPresence 2022-06-24 08:10:45 -04:00
Joshua (MordenTral) Statzer
9210d88f3f Merge pull request #30 from uno1982/master
Add server travel blueprint node.
2022-03-11 13:45:35 -05:00
mordentral
f9e794cd4a fixed wrong steam api call
fixed wrong steam api call
2021-10-19 21:32:24 -04:00
4 changed files with 19 additions and 2 deletions

View File

@@ -199,6 +199,12 @@ public:
// Checks if the stated session subsystem is active // Checks if the stated session subsystem is active
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|Misc") UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|Misc")
static bool HasOnlineSubsystem(FName SubSystemName); static bool HasOnlineSubsystem(FName SubSystemName);
//**** Seamless travel Functions ****//
//Exposes Server travel to blueprint
UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = "Online|AdvancedSessions|Seamless", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"))
static bool ServerTravel(UObject* WorldContextObject, const FString& InURL, bool bAbsolute, bool bShouldSkipGameNotify);
}; };

View File

@@ -528,3 +528,14 @@ void UAdvancedSessionsLibrary::GetNumberOfNetworkPlayers(UObject* WorldContextOb
NumNetPlayers = TheWorld->GetGameState()->PlayerArray.Num(); NumNetPlayers = TheWorld->GetGameState()->PlayerArray.Num();
} }
bool UAdvancedSessionsLibrary::ServerTravel(UObject* WorldContextObject, const FString& FURL, bool bAbsolute, bool bShouldSkipGameNotify)
{
if (!WorldContextObject) return false;
//using a context object to get the world
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::ReturnNull);
if (!World) return false;
World->ServerTravel(FURL,bAbsolute,bShouldSkipGameNotify);
return true;
}

View File

@@ -53,7 +53,7 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
Settings.bShouldAdvertise = true; Settings.bShouldAdvertise = true;
Settings.bAllowJoinInProgress = true; Settings.bAllowJoinInProgress = true;
Settings.bIsLANMatch = bUseLAN; Settings.bIsLANMatch = bUseLAN;
Settings.bAllowJoinViaPresence = true; Settings.bAllowJoinViaPresence = bAllowJoinViaPresence;
Settings.bIsDedicated = bDedicatedServer; Settings.bIsDedicated = bDedicatedServer;
if (bDedicatedServer) if (bDedicatedServer)

View File

@@ -395,7 +395,7 @@ bool UAdvancedSteamFriendsLibrary::FilterText(FString TextToFilter, EBPTextFilte
id = *((uint64*)TextSourceID.UniqueNetId->GetBytes()); id = *((uint64*)TextSourceID.UniqueNetId->GetBytes());
} }
int FilterCount = SteamUtils()->FilterText((ETextFilteringContext)Context, id, TCHAR_TO_ANSI(*TextToFilter), OutText, BufferLen); int FilterCount = SteamUtils()->FilterText(OutText, BufferLen, TCHAR_TO_ANSI(*TextToFilter), Context == EBPTextFilteringContext::FContext_GameContent);
if (FilterCount > 0) if (FilterCount > 0)
{ {