void AShooterGameMode::HandleMatchHasStarted() { bNeedsBotCreation = true; Super::HandleMatchHasStarted(); AShooterGameState* const MyGameState = Cast<AShooterGameState>(GameState); MyGameState->RemainingTime = RoundTime; StartBots(); // notify players for (FConstControllerIterator It = GetWorld()->GetControllerIterator(); It; ++It) { AShooterPlayerController* PC = Cast<AShooterPlayerController>(*It); if (PC) { PC->ClientGameStarted(); } } }
void ALabyrinthGameMode::HandleMatchHasStarted() { bNeedsBotCreation = true; Super::HandleMatchHasStarted(); ALGameState* const MyGameState = Cast<ALGameState>(GameState); MyGameState->RemainingTime = RoundTime; StartBots(); // notify players for (FConstPlayerControllerIterator It = GetWorld()->GetPlayerControllerIterator(); It; It++) { ALPlayerController* PC = Cast<ALPlayerController>(*It); if (PC) { // TO-Do: Add this to ALPlayerController //PC->ClientGameStarted(); } } }