mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-23 00:14:24 +00:00
Converted over to using the newer session names
Former-commit-id: f6d820a363d9e6881c647d9d29059ade0ac05746
This commit is contained in:
@@ -124,7 +124,7 @@ void UAdvancedExternalUILibrary::ShowInviteUI(APlayerController *PlayerControlle
|
||||
return;
|
||||
}
|
||||
|
||||
ExternalUIInterface->ShowInviteUI(Player->GetControllerId(), GameSessionName);
|
||||
ExternalUIInterface->ShowInviteUI(Player->GetControllerId(), NAME_GameSession);
|
||||
Result = EBlueprintResultSwitch::OnSuccess;
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *Play
|
||||
List.Add(val);
|
||||
}
|
||||
|
||||
if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), GameSessionName, List))
|
||||
if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), NAME_GameSession, List))
|
||||
{
|
||||
Result = EBlueprintResultSwitch::OnSuccess;
|
||||
return;
|
||||
@@ -94,7 +94,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController *Playe
|
||||
return;
|
||||
}
|
||||
|
||||
if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), GameSessionName, *FriendUniqueNetId.GetUniqueNetId()))
|
||||
if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), NAME_GameSession, *FriendUniqueNetId.GetUniqueNetId()))
|
||||
{
|
||||
Result = EBlueprintResultSwitch::OnSuccess;
|
||||
return;
|
||||
|
@@ -136,7 +136,7 @@ void UAdvancedSessionsLibrary::GetSessionState(EBPOnlineSessionState &SessionSta
|
||||
return;
|
||||
}
|
||||
|
||||
SessionState = ((EBPOnlineSessionState)SessionInterface->GetSessionState(GameSessionName));
|
||||
SessionState = ((EBPOnlineSessionState)SessionInterface->GetSessionState(NAME_GameSession));
|
||||
}
|
||||
|
||||
void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result)
|
||||
@@ -150,7 +150,7 @@ void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &
|
||||
return;
|
||||
}
|
||||
|
||||
FOnlineSessionSettings* settings = SessionInterface->GetSessionSettings(GameSessionName);
|
||||
FOnlineSessionSettings* settings = SessionInterface->GetSessionSettings(NAME_GameSession);
|
||||
if (!settings)
|
||||
{
|
||||
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetSessionSettings couldn't get the session settings!"));
|
||||
@@ -190,7 +190,7 @@ void UAdvancedSessionsLibrary::IsPlayerInSession(const FBPUniqueNetId &PlayerToC
|
||||
return;
|
||||
}
|
||||
|
||||
bIsInSession = SessionInterface->IsPlayerInSession(GameSessionName, *PlayerToCheck.GetUniqueNetId());
|
||||
bIsInSession = SessionInterface->IsPlayerInSession(NAME_GameSession, *PlayerToCheck.GetUniqueNetId());
|
||||
}
|
||||
|
||||
FSessionsSearchSetting UAdvancedSessionsLibrary::MakeLiteralSessionSearchProperty(FSessionPropertyKeyPair SessionSearchProperty, EOnlineComparisonOpRedux ComparisonOp)
|
||||
|
@@ -83,7 +83,7 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
|
||||
{
|
||||
if (PlayerControllerWeakPtr.IsValid() && Helper.UserID.IsValid())
|
||||
{
|
||||
Sessions->CreateSession(*Helper.UserID, GameSessionName, Settings);
|
||||
Sessions->CreateSession(*Helper.UserID, NAME_GameSession, Settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -95,7 +95,7 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
|
||||
}
|
||||
}
|
||||
else
|
||||
Sessions->CreateSession(0, GameSessionName, Settings);
|
||||
Sessions->CreateSession(0, NAME_GameSession, Settings);
|
||||
|
||||
// OnCreateCompleted will get called, nothing more to do now
|
||||
return;
|
||||
@@ -125,7 +125,7 @@ void UCreateSessionCallbackProxyAdvanced::OnCreateCompleted(FName SessionName, b
|
||||
if (bWasSuccessful)
|
||||
{
|
||||
StartCompleteDelegateHandle = Sessions->AddOnStartSessionCompleteDelegate_Handle(StartCompleteDelegate);
|
||||
Sessions->StartSession(GameSessionName);
|
||||
Sessions->StartSession(NAME_GameSession);
|
||||
|
||||
// OnStartCompleted will get called, nothing more to do now
|
||||
return;
|
||||
|
@@ -30,12 +30,12 @@ void UEndSessionCallbackProxy::Activate()
|
||||
auto Sessions = Helper.OnlineSub->GetSessionInterface();
|
||||
if (Sessions.IsValid())
|
||||
{
|
||||
FNamedOnlineSession* Session = Sessions->GetNamedSession(GameSessionName);
|
||||
FNamedOnlineSession* Session = Sessions->GetNamedSession(NAME_GameSession);
|
||||
if (Session &&
|
||||
Session->SessionState == EOnlineSessionState::InProgress)
|
||||
{
|
||||
DelegateHandle = Sessions->AddOnEndSessionCompleteDelegate_Handle(Delegate);
|
||||
Sessions->EndSession(GameSessionName);
|
||||
Sessions->EndSession(NAME_GameSession);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -42,8 +42,8 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
|
||||
}
|
||||
|
||||
// This gets the actual session itself
|
||||
//FNamedOnlineSession * curSession = Sessions->GetNamedSession(GameSessionName);
|
||||
FOnlineSessionSettings* Settings = Sessions->GetSessionSettings(GameSessionName);
|
||||
//FNamedOnlineSession * curSession = Sessions->GetNamedSession(NAME_GameSession);
|
||||
FOnlineSessionSettings* Settings = Sessions->GetSessionSettings(NAME_GameSession);
|
||||
|
||||
if (!Settings)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
|
||||
}
|
||||
}
|
||||
|
||||
Sessions->UpdateSession(GameSessionName, *Settings, bRefreshOnlineData);
|
||||
Sessions->UpdateSession(NAME_GameSession, *Settings, bRefreshOnlineData);
|
||||
|
||||
// OnUpdateCompleted will get called, nothing more to do now
|
||||
return;
|
||||
|
Reference in New Issue
Block a user