[quake3-commits] r2346 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Oct 30 12:51:07 EDT 2012
Author: ztm
Date: 2012-10-30 12:51:06 -0400 (Tue, 30 Oct 2012)
New Revision: 2346
Modified:
trunk/code/client/cl_main.c
trunk/code/client/cl_parse.c
trunk/code/client/client.h
Log:
Fix restoring old fs_game upon leaving a server. Patch by Ensiform.
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2012-10-30 09:00:58 UTC (rev 2345)
+++ trunk/code/client/cl_main.c 2012-10-30 16:51:06 UTC (rev 2346)
@@ -125,6 +125,9 @@
clientStatic_t cls;
vm_t *cgvm;
+char cl_oldGame[MAX_QPATH];
+qboolean cl_oldGameSet;
+
// Structure containing functions exported from refresh DLL
refexport_t re;
#ifdef USE_RENDERER_DLOPEN
@@ -1362,11 +1365,11 @@
static void CL_OldGame(void)
{
- if(cls.oldGameSet)
+ if(cl_oldGameSet)
{
// change back to previous fs_game
- cls.oldGameSet = qfalse;
- Cvar_Set2("fs_game", cls.oldGame, qtrue);
+ cl_oldGameSet = qfalse;
+ Cvar_Set2("fs_game", cl_oldGame, qtrue);
FS_ConditionalRestart(clc.checksumFeed, qfalse);
}
}
@@ -3437,7 +3440,7 @@
{
CL_ClearState();
clc.state = CA_DISCONNECTED; // no longer CA_UNINITIALIZED
- cls.oldGameSet = qfalse;
+ cl_oldGameSet = qfalse;
}
cls.realtime = 0;
Modified: trunk/code/client/cl_parse.c
===================================================================
--- trunk/code/client/cl_parse.c 2012-10-30 09:00:58 UTC (rev 2345)
+++ trunk/code/client/cl_parse.c 2012-10-30 16:51:06 UTC (rev 2346)
@@ -538,10 +538,10 @@
CL_StopRecord_f();
// reinitialize the filesystem if the game directory has changed
- if(!cls.oldGameSet && (Cvar_Flags("fs_game") & CVAR_MODIFIED))
+ if(!cl_oldGameSet && (Cvar_Flags("fs_game") & CVAR_MODIFIED))
{
- cls.oldGameSet = qtrue;
- Q_strncpyz(cls.oldGame, oldGame, sizeof(cls.oldGame));
+ cl_oldGameSet = qtrue;
+ Q_strncpyz(cl_oldGame, oldGame, sizeof(cl_oldGame));
}
FS_ConditionalRestart(clc.checksumFeed, qfalse);
Modified: trunk/code/client/client.h
===================================================================
--- trunk/code/client/client.h 2012-10-30 09:00:58 UTC (rev 2345)
+++ trunk/code/client/client.h 2012-10-30 16:51:06 UTC (rev 2346)
@@ -280,6 +280,7 @@
the clientStatic_t structure is never wiped, and is used even when
no client connection is active at all
+(except when CL_Shutdown is called)
==================================================================
*/
@@ -338,9 +339,6 @@
serverInfo_t favoriteServers[MAX_OTHER_SERVERS];
int pingUpdateSource; // source currently pinging or updating
-
- char oldGame[MAX_QPATH];
- qboolean oldGameSet;
// update server info
netadr_t updateServer;
@@ -358,6 +356,9 @@
extern clientStatic_t cls;
+extern char cl_oldGame[MAX_QPATH];
+extern qboolean cl_oldGameSet;
+
//=============================================================================
extern vm_t *cgvm; // interface to cgame dll or vm
More information about the quake3-commits
mailing list