Exemple #1
0
void AUTDomGameMode::AnnounceMatchStart()
{
	if (bAnnounceTeam)
	{
		for (FConstPlayerControllerIterator Iterator = GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)
		{
			AUTPlayerController* NextPlayer = Cast<AUTPlayerController>(*Iterator);
			AUTTeamInfo* Team = (NextPlayer && Cast<AUTPlayerState>(NextPlayer->PlayerState)) ? Cast<AUTPlayerState>(NextPlayer->PlayerState)->Team : NULL;
			if (Team)
			{
				NextPlayer->ClientReceiveLocalizedMessage(GameMessageClass, Team->TeamIndex + 9, NextPlayer->PlayerState, NULL, NULL);
			}
		}
	}
	else
	{
		BroadcastLocalized(this, UUTGameMessage::StaticClass(), 0, NULL, NULL, NULL);
	}
}
void AUTBetrayalPlayerState::RogueTimer()
{
	AUTPlayerController* PC = Cast<AUTPlayerController>(GetOwner());

	RemainingRogueTime--;
	if (RemainingRogueTime < 0)
	{
		RogueExpired();
		if (PC != NULL)
		{
			AUTBetrayalGameMode* Game = GetWorld()->GetAuthGameMode<AUTBetrayalGameMode>();
			if (Game != NULL)
			{
				PC->ClientReceiveLocalizedMessage(Game->AnnouncerMessageClass, 5);
			}
		}
	}
	else if (RemainingRogueTime < 3 && PC != NULL)
	{
		PC->ClientPlaySound(RogueFadingSound);
	}
}