mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-15 04:50:03 +01:00
engine: client: flush demoheader before copying it
This commit is contained in:
parent
efee8149e2
commit
fcb463d400
@ -153,12 +153,8 @@ we record a demo on this level
|
|||||||
*/
|
*/
|
||||||
void CL_StartupDemoHeader( void )
|
void CL_StartupDemoHeader( void )
|
||||||
{
|
{
|
||||||
if( cls.demoheader )
|
CL_CloseDemoHeader();
|
||||||
{
|
|
||||||
FS_Close( cls.demoheader );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: this is replacing tmpfile()
|
|
||||||
cls.demoheader = FS_Open( "demoheader.tmp", "w+b", true );
|
cls.demoheader = FS_Open( "demoheader.tmp", "w+b", true );
|
||||||
|
|
||||||
if( !cls.demoheader )
|
if( !cls.demoheader )
|
||||||
@ -427,6 +423,7 @@ static void CL_WriteDemoHeader( const char *name )
|
|||||||
|
|
||||||
// finish off the startup info.
|
// finish off the startup info.
|
||||||
CL_WriteDemoCmdHeader( dem_stop, cls.demoheader );
|
CL_WriteDemoCmdHeader( dem_stop, cls.demoheader );
|
||||||
|
FS_Flush( cls.demoheader );
|
||||||
|
|
||||||
// now copy the stuff we cached from the server.
|
// now copy the stuff we cached from the server.
|
||||||
copysize = savepos = FS_Tell( cls.demoheader );
|
copysize = savepos = FS_Tell( cls.demoheader );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user