diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-06-21 11:29:31 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 21:47:34 +0000 |
commit | 2dfaa74758a8e1910f7cea78f72cb0ed7603c4c0 (patch) | |
tree | 06ee035b70ec2079fba6646107ad1baa9b92ff02 /src/client | |
parent | 555eaebb1b7cb7c4a5e1036892b0effbd62766ae (diff) |
Fix unnoticed bug in game_restart
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/cl_main.c | 6 | ||||
-rw-r--r-- | src/client/cl_parse.c | 3 | ||||
-rw-r--r-- | src/client/client.h | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 24043f88..3b30625d 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -1319,11 +1319,10 @@ static void CL_UpdateGUID( const char *prefix, int prefix_len ) static void CL_OldGame(void) { - char *curGame = Cvar_VariableString("fs_game"); - - if(cls.oldGame[0] || *curGame) + if(cls.oldGameSet) { // change back to previous fs_game + cls.oldGameSet = qfalse; Cvar_Set("fs_game", cls.oldGame); Com_GameRestart(0, qtrue); } @@ -3387,6 +3386,7 @@ void CL_Init( void ) { { CL_ClearState(); clc.state = CA_DISCONNECTED; // no longer CA_UNINITIALIZED + cls.oldGameSet = qfalse; } cls.realtime = 0; diff --git a/src/client/cl_parse.c b/src/client/cl_parse.c index 12d2baab..03967927 100644 --- a/src/client/cl_parse.c +++ b/src/client/cl_parse.c @@ -531,7 +531,10 @@ void CL_ParseGamestate( msg_t *msg ) { // reinitialize the filesystem if the game directory has changed if(FS_ConditionalRestart(clc.checksumFeed, qfalse) && !cls.oldGame[0]) + { + cls.oldGameSet = qtrue; 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 diff --git a/src/client/client.h b/src/client/client.h index 059167e3..3e243df2 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -340,6 +340,7 @@ typedef struct { int pingUpdateSource; // source currently pinging or updating char oldGame[MAX_QPATH]; + qboolean oldGameSet; // update server info netadr_t updateServer; |