mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-24 17:04:18 +00:00
Compare commits
3 Commits
d9ca76cfde
...
4.26-Locke
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76cf3f6b4c | ||
|
|
9210d88f3f | ||
|
|
f9e794cd4a |
@@ -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);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user