Exemplo n.º 1
0
/*
* TV_Lobby_WriteFrameSnapToClient
*/
static void TV_Lobby_WriteFrameSnapToClient( client_t *client, msg_t *msg )
{
    ginfo_t gi;

    memset( &gi, 0, sizeof( ginfo_t ) );

    SNAP_WriteFrameSnapToClient( &gi, client, msg, tvs.lobby.framenum, tvs.realtime, NULL, NULL, 0, NULL, NULL );
}
Exemplo n.º 2
0
/*
* TV_Relay_SendClientDatagram
*/
static bool TV_Relay_SendClientDatagram( relay_t *relay, client_t *client ) {
	uint8_t msg_buf[MAX_MSGLEN];
	msg_t msg;
	snapshot_t *frame;

	assert( relay );
	assert( client );
	assert( relay == client->relay );

	TV_Downstream_InitClientMessage( client, &msg, msg_buf, sizeof( msg_buf ) );

	TV_Downstream_AddReliableCommandsToMessage( client, &msg );

	// send over all the relevant entity_state_t
	// and the player_state_t
	TV_Relay_BuildClientFrameSnap( relay, client );

	frame = relay->curFrame;
	SNAP_WriteFrameSnapToClient( &relay->gi, client, &msg, relay->framenum, relay->serverTime, relay->baselines,
								 &relay->client_entities, frame->numgamecommands, frame->gamecommands, frame->gamecommandsData );

	return TV_Downstream_SendMessageToClient( client, &msg );
}
Exemplo n.º 3
0
/*
* SV_WriteFrameSnapToClient
*/
void SV_WriteFrameSnapToClient( client_t *client, msg_t *msg )
{
	SNAP_WriteFrameSnapToClient( &sv.gi, client, msg, sv.framenum, svs.gametime, sv.baselines,
		&svs.client_entities, 0, NULL, NULL );
}