| 38 | } |
| 39 | |
| 40 | void 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected