Exemple #1
0
// join game (enter game from entry mode in already allocated slot) -----------
//
int NETs_Join()
{
	ASSERT( NetConnected && !NetJoined );
	ASSERT( LocalPlayerId >= 0 && LocalPlayerId < MAX_NET_PROTO_PLAYERS );
	ASSERT( Player_Status[ LocalPlayerId ] == PLAYER_CONNECTED );

	{
		// update player status
		Player_Status[ LocalPlayerId ] = PLAYER_JOINED;
		Player_Ship  [ LocalPlayerId ] = MyShip;
		Player_ShipId[ LocalPlayerId ] = SHIPID_LOCALPLAYER;

		// set global flags
		NetJoined = TRUE;
		//HaveFullPlayerState = FALSE;
		//FIXME Put this back one day when the server actually verifies this stuff (which it currently doesn't)
		//but for now this fixes/works around stargate jump sync issues
		HaveFullPlayerState = TRUE;
		
		// open stargate
		if ( !AUX_DISABLE_LOCAL_STARGATE ) {
			SFX_CreateStargate( MyShip );
		}

		// record join
		Record_Join();
	}

	// store the message # that contains this state change
	g_dwLastStatusChangeMsg = ServerStream.GetNextOutMessageId(); 

	// send join message to server
	DBGTXT( MSGOUT( "sending join message to server." ); );
Exemple #2
0
// join game (enter game from entry mode in already allocated slot) -----------
//
int NETs_Join()
{
	ASSERT( NetConnected && !NetJoined );
	ASSERT( LocalPlayerId >= 0 && LocalPlayerId < MAX_NET_PROTO_PLAYERS );
	ASSERT( Player_Status[ LocalPlayerId ] == PLAYER_CONNECTED );

	{
		// update player status
		Player_Status[ LocalPlayerId ] = PLAYER_JOINED;
		Player_Ship  [ LocalPlayerId ] = MyShip;
		Player_ShipId[ LocalPlayerId ] = SHIPID_LOCALPLAYER;

		// set global flags
		NetJoined = TRUE;
		HaveFullPlayerState = FALSE;
		
		// open stargate
		if ( !AUX_DISABLE_LOCAL_STARGATE ) {
			SFX_CreateStargate( MyShip );
		}

		// record join
		Record_Join();
	}

	// store the message # that contains this state change
	g_dwLastStatusChangeMsg = ServerStream.GetNextOutMessageId(); 

	// send join message to server
	DBGTXT( MSGOUT( "sending join message to server." ); );