Exemplo n.º 1
0
//*****************************************************************************
//
void DUEL_SetState( DUELSTATE_e State )
{
	if ( g_DuelState == State )
		return;

	g_DuelState = State;

	// Tell clients about the state change.
	if ( NETWORK_GetState( ) == NETSTATE_SERVER )
		SERVERCOMMANDS_SetGameModeState( State );

	switch ( State )
	{
	case DS_WINSEQUENCE:

		// If we've gotten to a win sequence, we've completed a duel.
		if ( NETWORK_GetState( ) != NETSTATE_CLIENT )
			DUEL_SetNumDuels( g_ulNumDuels + 1 );
		break;
	case DS_WAITINGFORPLAYERS:

		// Zero out the countdown ticker.
		DUEL_SetCountdownTicks( 0 );
		break;
	}
}
Exemplo n.º 2
0
//*****************************************************************************
//
void LASTMANSTANDING_SetState( LMSSTATE_e State )
{
	ULONG	ulIdx;

	g_LMSState = State;

	// Tell clients about the state change.
	if ( NETWORK_GetState( ) == NETSTATE_SERVER )
		SERVERCOMMANDS_SetGameModeState( State, g_ulLMSCountdownTicks );

	switch ( State )
	{
	case LMSS_WINSEQUENCE:

		break;
	case LMSS_WAITINGFORPLAYERS:

		// Zero out the countdown ticker.
		LASTMANSTANDING_SetCountdownTicks( 0 );

		if ( lastmanstanding || teamlms )
			GAMEMODE_RespawnDeadSpectatorsAndPopQueue();

		break;
	default:
		break;
	}

	// Since some players might have respawned, update the server console window.
	if ( NETWORK_GetState( ) == NETSTATE_SERVER )
	{
		for ( ulIdx = 0; ulIdx < MAXPLAYERS; ulIdx++ )
		{
			if ( playeringame[ulIdx] )
				SERVERCONSOLE_UpdatePlayerInfo( ulIdx, UDF_FRAGS );
		}
	}
}