diff --git a/Content/Blueprints/Game/GameInstance_TD.uasset b/Content/Blueprints/Game/GameInstance_TD.uasset index a753450..7bfb297 100644 Binary files a/Content/Blueprints/Game/GameInstance_TD.uasset and b/Content/Blueprints/Game/GameInstance_TD.uasset differ diff --git a/Content/Blueprints/Widgets/IngameHud.uasset b/Content/Blueprints/Widgets/IngameHud.uasset index 677ed12..e928a15 100644 Binary files a/Content/Blueprints/Widgets/IngameHud.uasset and b/Content/Blueprints/Widgets/IngameHud.uasset differ diff --git a/Content/Blueprints/Widgets/LobbyMenu.uasset b/Content/Blueprints/Widgets/LobbyMenu.uasset index 2a8b6fe..634024f 100644 Binary files a/Content/Blueprints/Widgets/LobbyMenu.uasset and b/Content/Blueprints/Widgets/LobbyMenu.uasset differ diff --git a/Source/OdinUnrealSample/Private/EosPlayerController.cpp b/Source/OdinUnrealSample/Private/EosPlayerController.cpp index f5b9dbe..846172e 100644 --- a/Source/OdinUnrealSample/Private/EosPlayerController.cpp +++ b/Source/OdinUnrealSample/Private/EosPlayerController.cpp @@ -35,6 +35,7 @@ void AEosPlayerController::Login() { UE_LOG(LogTemp, Log, TEXT("Already logged in. Finding sessions.")); FindSessions(); + return; } /* This binds a delegate so we can run our function when the callback completes. 0 represents the player number. @@ -106,7 +107,7 @@ void AEosPlayerController::Logout() Session->DestroySession(LobbyName); } -void AEosPlayerController::HandleLogoutCompleted(FName SessionNameD, bool bWasSuccessful) +void AEosPlayerController::HandleLogoutCompleted(FName SessionName, bool bWasSuccessful) { } @@ -293,7 +294,6 @@ void AEosPlayerController::HandleFindSessionsCompleted(bool bWasSuccessful, TSha if (Session->GetResolvedConnectString(SessionInSearchResult, NAME_GamePort, ConnectString)) { SessionToJoin = &SessionInSearchResult; - SessionNameT = FName(SessionInSearchResult.GetSessionIdStr()); } // For the tutorial we will join the first session found automatically. Usually you would loop through all the sessions and determine which one is best to join. @@ -328,7 +328,7 @@ void AEosPlayerController::JoinSession() &ThisClass::HandleJoinSessionCompleted)); UE_LOG(LogTemp, Log, TEXT("Joining session.")); - if (!Session->JoinSession(0, "SessionName", *SessionToJoin)) + if (!Session->JoinSession(0, LobbyName, *SessionToJoin)) { UE_LOG(LogTemp, Warning, TEXT("Join session failed")); } diff --git a/Source/OdinUnrealSample/Private/EosPlayerController.h b/Source/OdinUnrealSample/Private/EosPlayerController.h index 81014b0..ba9511d 100644 --- a/Source/OdinUnrealSample/Private/EosPlayerController.h +++ b/Source/OdinUnrealSample/Private/EosPlayerController.h @@ -88,6 +88,4 @@ class AEosPlayerController : public APlayerController FDelegateHandle JoinSessionDelegateHandle; FDelegateHandle DestroySessionDelegateHandle; - - FName SessionNameT; };