From 295ab98a9113e00a40c7951ced589f6b974df6a0 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 7 Mar 2022 09:22:25 -0500 Subject: [PATCH] correct this pull request for ue5 --- .../Private/LoginUserCallbackProxy.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/AdvancedSessions/Source/AdvancedSessions/Private/LoginUserCallbackProxy.cpp b/AdvancedSessions/Source/AdvancedSessions/Private/LoginUserCallbackProxy.cpp index bae5184..4f08f1f 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Private/LoginUserCallbackProxy.cpp +++ b/AdvancedSessions/Source/AdvancedSessions/Private/LoginUserCallbackProxy.cpp @@ -64,7 +64,8 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu if (PlayerControllerWeakPtr.IsValid()) { ULocalPlayer* Player = Cast(PlayerControllerWeakPtr->Player); - auto uniqueId = UserId.AsShared(); + + FUniqueNetIdRepl UniqueID(UserId.AsShared()); if (Player) { @@ -74,15 +75,13 @@ void ULoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSuccessfu { Identity->ClearOnLoginCompleteDelegate_Handle(Player->GetControllerId(), DelegateHandle); } - Player->SetCachedUniqueNetId(uniqueId); + Player->SetCachedUniqueNetId(UniqueID); } - APlayerState* State = PlayerControllerWeakPtr->PlayerState; - - if (State) + if (APlayerState* State = PlayerControllerWeakPtr->PlayerState) { // Update UniqueId. See also ShowLoginUICallbackProxy.cpp - State->SetUniqueId((const FUniqueNetIdPtr&) uniqueId); + State->SetUniqueId(UniqueID); } }