summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/cl_main.c6
-rw-r--r--src/client/cl_parse.c3
-rw-r--r--src/client/client.h1
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;