[quake3-commits] r2046 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jun 21 07:29:31 EDT 2011


Author: thilo
Date: 2011-06-21 07:29:31 -0400 (Tue, 21 Jun 2011)
New Revision: 2046

Modified:
   trunk/code/client/cl_main.c
   trunk/code/client/cl_parse.c
   trunk/code/client/client.h
Log:
Fix unnoticed bug in game_restart


Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2011-06-21 11:18:35 UTC (rev 2045)
+++ trunk/code/client/cl_main.c	2011-06-21 11:29:31 UTC (rev 2046)
@@ -1223,11 +1223,10 @@
 
 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);
 	}
@@ -3160,6 +3159,7 @@
 	{
 		CL_ClearState();
 		clc.state = CA_DISCONNECTED;	// no longer CA_UNINITIALIZED
+		cls.oldGameSet = qfalse;
 	}
 
 	cls.realtime = 0;

Modified: trunk/code/client/cl_parse.c
===================================================================
--- trunk/code/client/cl_parse.c	2011-06-21 11:18:35 UTC (rev 2045)
+++ trunk/code/client/cl_parse.c	2011-06-21 11:29:31 UTC (rev 2046)
@@ -534,7 +534,10 @@
 	
 	// 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

Modified: trunk/code/client/client.h
===================================================================
--- trunk/code/client/client.h	2011-06-21 11:18:35 UTC (rev 2045)
+++ trunk/code/client/client.h	2011-06-21 11:29:31 UTC (rev 2046)
@@ -334,6 +334,7 @@
 	int pingUpdateSource;		// source currently pinging or updating
 	
 	char		oldGame[MAX_QPATH];
+	qboolean	oldGameSet;
 
 	// update server info
 	netadr_t	updateServer;



More information about the quake3-commits mailing list