2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

engine: client: ensure demoheader will be written when we're recording demo and changed level

This commit is contained in:
Alibek Omarov 2024-08-14 19:10:00 +03:00
parent ac487a2133
commit 22d3ba674e
2 changed files with 4 additions and 11 deletions

View File

@ -327,10 +327,6 @@ void CL_WriteDemoMessage( qboolean startup, int start, sizebuf_t *msg )
if( !file ) return;
// past the start but not recording a demo.
if( !startup && !cls.demorecording )
return;
swlen = MSG_GetNumBytesWritten( msg ) - start;
if( swlen <= 0 ) return;

View File

@ -2347,14 +2347,11 @@ static void CL_ParseNetMessage( sizebuf_t *msg, void (*parsefn)( sizebuf_t * ))
// after we have parsed the frame
if( !cls.demoplayback )
{
if( cls.demorecording && !cls.demowaiting )
{
CL_WriteDemoMessage( false, cls.starting_count, msg );
}
else if( cls.state != ca_active )
{
if( cls.state != ca_active )
CL_WriteDemoMessage( true, cls.starting_count, msg );
}
if( cls.demorecording && !cls.demowaiting )
CL_WriteDemoMessage( false, cls.starting_count, msg );
}
}