engine: client: fix broken legacy demos playing

Fixes: ff4221fbe7 ("engine: client: write correct cls.legacymode/net_protocol value for demos")
This commit is contained in:
Alibek Omarov 2024-06-22 07:29:16 +03:00
parent d56e53a347
commit d054782693
1 changed files with 3 additions and 1 deletions

View File

@ -1577,9 +1577,11 @@ void CL_PlayDemo_f( void )
FS_Seek( cls.demofile, demo.entry->offset, SEEK_SET );
cls.legacymode = CL_GetProtocolFromDemo( demo.header.net_protocol );
CL_DemoStartPlayback( DEMO_XASH3D );
// must be after DemoStartPlayback, as CL_Disconnect_f resets the protocol
cls.legacymode = CL_GetProtocolFromDemo( demo.header.net_protocol );
// g-cont. is this need?
Q_strncpy( cls.servername, demoname, sizeof( cls.servername ));