예제 #1
0
void G_Gametype_GENERIC_SetUpCountdown( void )
{
	bool any = false;
	int team;

	G_Match_RemoveAllProjectiles();
	G_Items_RespawnByType( 0, 0, 0 ); // respawn all items

	level.gametype.readyAnnouncementEnabled = false;
	level.gametype.scoreAnnouncementEnabled = false;
	level.gametype.countdownEnabled = true;
	level.gametype.pickableItemsMask = 0; // disallow item pickup

	if( GS_TeamBasedGametype() )
	{
		for( team = TEAM_ALPHA; team < GS_MAX_TEAMS; team++ )
			if( G_Teams_LockTeam( team ) )
				any = true;
	}
	else
	{
		if( G_Teams_LockTeam( TEAM_PLAYERS ) )
			any = true;
	}

	if( any )
		G_PrintMsg( NULL, "Teams locked.\n" );

	G_AnnouncerSound( NULL, trap_SoundIndex( va( S_ANNOUNCER_COUNTDOWN_GET_READY_TO_FIGHT_1_to_2, ( rand()&1 )+1 ) ),
		GS_MAX_TEAMS, true, NULL );
}
예제 #2
0
void G_Teams_CoachLockTeam( edict_t *ent )
{
	if( ent->r.client->teamstate.is_coach )
	{
		if( !G_Teams_TeamIsLocked( ent->s.team ) )
		{
			G_Teams_LockTeam( ent->s.team );
			G_PrintMsg( NULL, "%s%s locked the %s team.\n", ent->r.client->netname,
				S_COLOR_WHITE, GS_TeamName( ent->s.team ) );
		}
	}
}