Beispiel #1
0
/*
* SV_Netchan_Transmit
*/
bool SV_Netchan_Transmit( netchan_t *netchan, msg_t *msg )
{
	int zerror;

	// if we got here with unsent fragments, fire them all now
	if( !Netchan_PushAllFragments( netchan ) )
		return false;

	if( sv_compresspackets->integer )
	{
		zerror = Netchan_CompressMessage( msg );
		if( zerror < 0 )
		{          // it's compression error, just send uncompressed
			Com_DPrintf( "SV_Netchan_Transmit (ignoring compression): Compression error %i\n", zerror );
		}
	}

	return Netchan_Transmit( netchan, msg );
}
Beispiel #2
0
/*
* TV_Downstream_Netchan_Transmit
*/
static qboolean TV_Downstream_Netchan_Transmit( netchan_t *netchan, msg_t *msg )
{
	int zerror;

	// if we got here with unsent fragments, fire them all now
	if( !Netchan_PushAllFragments( netchan ) )
		return qfalse;

	if( tv_compresspackets->integer )
	{
		zerror = Netchan_CompressMessage( msg );
		if( zerror < 0 )
		{
			// it's compression error, just send uncompressed
			Com_Printf( "Compression error (%i), sending packet uncompressed\n", zerror );
		}
	}

	return Netchan_Transmit( netchan, msg );
}