MCPcopy Create free account
hub / github.com/DruidMech/MultiplayerCourseMenuSystem / Logout

Method Logout

Source/MenuSystem/LobbyGameMode.cpp:40–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void ALobbyGameMode::Logout(AController* Exiting)
41{
42 Super::Logout(Exiting);
43
44 APlayerState* PlayerState = Exiting->GetPlayerState<APlayerState>();
45 if (PlayerState)
46 {
47 int32 NumberOfPlayers = GameState.Get()->PlayerArray.Num();
48 GEngine->AddOnScreenDebugMessage(
49 1,
50 600.f,
51 FColor::Yellow,
52 FString::Printf(TEXT("Players in game: %d"), NumberOfPlayers - 1)
53 );
54
55 FString PlayerName = PlayerState->GetPlayerName();
56 GEngine->AddOnScreenDebugMessage(
57 2,
58 60.f,
59 FColor::Cyan,
60 FString::Printf(TEXT("%s has exited the game!"), *PlayerName)
61 );
62 }
63}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected