- Improve game_restart:
* differing screen resolutions and network settings are now honoured when changing fs_game * Fix hunk memory leak on game_restart * Move cls.state and cls.servername to clc so connection state is fully preserved over game_restart * Revert back to previous fs_game after disconnecting from a server that triggered a game_restart * Fix error dialog popping up after every game_restart if an error happened previously (reported by Ensiform) - Fixed that not all commands added by CL_Init() would be removed by CL_Shutdown()
This commit is contained in:
1 parent
adc143e050
commit
dee3724a13
17 files changed
+354
-191
No files matched your search
@@ -463,6 +463,7 @@ void CL_ParseGamestate( msg_t *msg ) {
|
||||
entityState_t nullstate;
|
||||
int cmd;
|
||||
char *s;
|
||||
char oldGame[MAX_QPATH];
|
||||
|
||||
Con_Close();
|
||||
|
||||
@@ -518,6 +519,9 @@ void CL_ParseGamestate( msg_t *msg ) {
|
||||
// read the checksum feed
|
||||
clc.checksumFeed = MSG_ReadLong( msg );
|
||||
|
||||
// save old gamedir
|
||||
Cvar_VariableStringBuffer("fs_game", oldGame, sizeof(oldGame));
|
||||
|
||||
// parse useful values out of CS_SERVERINFO
|
||||
CL_ParseServerInfo();
|
||||
|
||||
@@ -529,7 +533,8 @@ void CL_ParseGamestate( msg_t *msg ) {
|
||||
CL_StopRecord_f();
|
||||
|
||||
// reinitialize the filesystem if the game directory has changed
|
||||
FS_ConditionalRestart( clc.checksumFeed );
|
||||
if(FS_ConditionalRestart(clc.checksumFeed, qfalse) && !cls.oldGame[0])
|
||||
Q_strncpyz(cls.oldGame, oldGame, sizeof(cls.oldGame));
|
||||
|
||||
// This used to call CL_StartHunkUsers, but now we enter the download state before loading the
|
||||
// cgame
|
||||
|
||||
Reference in new issue
Block a user