engine: client: always write buffer.dat so we will be able to request it from users. Append protocol number to it

This commit is contained in:
Alibek Omarov 2025-01-14 11:30:06 +03:00
parent dcdca01e86
commit 4be75af214
2 changed files with 6 additions and 6 deletions

View file

@ -153,6 +153,7 @@ static void CL_WriteErrorMessage( int current_count, sizebuf_t *msg )
FS_Write( fp, &cls.starting_count, sizeof( int ));
FS_Write( fp, &current_count, sizeof( int ));
FS_Write( fp, &cls.legacymode, sizeof( cls.legacymode ));
FS_Write( fp, MSG_GetData( msg ), MSG_GetMaxBytes( msg ));
FS_Close( fp );
@ -168,7 +169,7 @@ list last 32 messages for debugging net troubleshooting
*/
void CL_WriteMessageHistory( void )
{
oldcmd_t *old, *failcommand;
oldcmd_t *old;
sizebuf_t *msg = &net_message;
int i, thecmd;
@ -192,9 +193,8 @@ void CL_WriteMessageHistory( void )
thecmd++;
}
failcommand = &cls_message_debug.oldcmd[thecmd];
Con_Printf( "BAD: %3i:%s\n", MSG_GetNumBytesRead( msg ) - 1, CL_MsgInfo( failcommand->command ));
if( host_developer.value >= DEV_EXTENDED )
CL_WriteErrorMessage( MSG_GetNumBytesRead( msg ) - 1, msg );
old = &cls_message_debug.oldcmd[thecmd];
Con_Printf( S_RED "BAD: " S_DEFAULT "%i %04i %s\n", old->frame_number, old->starting_offset, CL_MsgInfo( old->command ));
CL_WriteErrorMessage( old->starting_offset, msg );
cls_message_debug.parsing = false;
}

View file

@ -534,7 +534,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg )
{
if( MSG_CheckOverflow( msg ))
{
Host_Error( "CL_ParseServerMessage: overflow!\n" );
Host_Error( "%s: overflow!\n", __func__ );
return;
}