engine: server: fix message trace output

This commit is contained in:
Alibek Omarov 2022-01-27 03:48:54 +03:00
parent 0891356ec5
commit 36d757c74a

View File

@ -2727,7 +2727,7 @@ void GAME_EXPORT pfnWriteByte( int iValue )
{
if( iValue == -1 ) iValue = 0xFF; // convert char to byte
MSG_WriteByte( &sv.multicast, (byte)iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )", __FUNCTION__, iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )\n", __FUNCTION__, iValue );
svgame.msg_realsize++;
}
@ -2740,7 +2740,7 @@ pfnWriteChar
void GAME_EXPORT pfnWriteChar( int iValue )
{
MSG_WriteChar( &sv.multicast, (signed char)iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )", __FUNCTION__, iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )\n", __FUNCTION__, iValue );
svgame.msg_realsize++;
}
@ -2753,7 +2753,7 @@ pfnWriteShort
void GAME_EXPORT pfnWriteShort( int iValue )
{
MSG_WriteShort( &sv.multicast, (short)iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )", __FUNCTION__, iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )\n", __FUNCTION__, iValue );
svgame.msg_realsize += 2;
}
@ -2766,7 +2766,7 @@ pfnWriteLong
void GAME_EXPORT pfnWriteLong( int iValue )
{
MSG_WriteLong( &sv.multicast, iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )", __FUNCTION__, iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )\n", __FUNCTION__, iValue );
svgame.msg_realsize += 4;
}
@ -2782,7 +2782,7 @@ void GAME_EXPORT pfnWriteAngle( float flValue )
int iAngle = ((int)(( flValue ) * 256 / 360) & 255);
MSG_WriteChar( &sv.multicast, iAngle );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %f )", __FUNCTION__, flValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %f )\n", __FUNCTION__, flValue );
svgame.msg_realsize += 1;
}
@ -2795,7 +2795,7 @@ pfnWriteCoord
void GAME_EXPORT pfnWriteCoord( float flValue )
{
MSG_WriteCoord( &sv.multicast, flValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %f )", __FUNCTION__, flValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %f )\n", __FUNCTION__, flValue );
svgame.msg_realsize += 2;
}
@ -2808,7 +2808,7 @@ pfnWriteBytes
void pfnWriteBytes( const byte *bytes, int count )
{
MSG_WriteBytes( &sv.multicast, bytes, count );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )", __FUNCTION__, count );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )\n", __FUNCTION__, count );
svgame.msg_realsize += count;
}
@ -2870,7 +2870,7 @@ void GAME_EXPORT pfnWriteString( const char *src )
*dst = '\0'; // string end (not included in count)
MSG_WriteString( &sv.multicast, string );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %s )", __FUNCTION__, string );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %s )\n", __FUNCTION__, string );
// NOTE: some messages with constant string length can be marked as known sized
svgame.msg_realsize += len;
@ -2887,7 +2887,7 @@ void GAME_EXPORT pfnWriteEntity( int iValue )
if( iValue < 0 || iValue >= svgame.numEntities )
Host_Error( "MSG_WriteEntity: invalid entnumber %i\n", iValue );
MSG_WriteShort( &sv.multicast, (short)iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )", __FUNCTION__, iValue );
if( svgame.msg_trace ) Con_Printf( "\t^3%s( %i )\n", __FUNCTION__, iValue );
svgame.msg_realsize += 2;
}