void AGameModeBase::GenericPlayerInitialization(AController* C)
{
	APlayerController* PC = Cast<APlayerController>(C);
	if (PC != nullptr)
	{
		InitializeHUDForPlayer(PC);

		// Notify the game that we can now be muted and mute others
		UpdateGameplayMuteList(PC);

		// Tell the player to enable voice by default or use the push to talk method
		PC->ClientEnableNetworkVoice(!GameSession->RequiresPushToTalk());

		ReplicateStreamingStatus(PC);

		bool HidePlayer = false, HideHUD = false, DisableMovement = false, DisableTurning = false;

		// Check to see if we should start in cinematic mode (matinee movie capture)
		if (ShouldStartInCinematicMode(PC, HidePlayer, HideHUD, DisableMovement, DisableTurning))
		{
			PC->SetCinematicMode(true, HidePlayer, HideHUD, DisableMovement, DisableTurning);
		}

		// Add the player to any matinees running so that it gets in on any cinematics already running, etc
		TArray<AMatineeActor*> AllMatineeActors;
		GetWorld()->GetMatineeActors(AllMatineeActors);
		for (int32 i = 0; i < AllMatineeActors.Num(); i++)
		{
			AllMatineeActors[i]->AddPlayerToDirectorTracks(PC);
		}
	}
}
Beispiel #2
0
void AATGameGameMode::GenericPlayerInitialization(AController* C)
{
	AATPlayerController* PC = Cast<AATPlayerController>(C);
	if (PC != NULL)
	{
		// Notify the game that we can now be muted and mute others
		UpdateGameplayMuteList(PC);
		
		PC->ClientSetHUD(HUDClass);

		ReplicateStreamingStatus(PC);
	}
}