[quake3-commits] r2130 - in trunk/code: client qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Aug 2 20:58:33 EDT 2011
Author: thilo
Date: 2011-08-02 20:58:33 -0400 (Tue, 02 Aug 2011)
New Revision: 2130
Modified:
trunk/code/client/cl_main.c
trunk/code/qcommon/files.c
Log:
Don't do game_restart if game directory changed from "" to "baseq3" or "baseq3" to ""
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2011-08-02 23:34:50 UTC (rev 2129)
+++ trunk/code/client/cl_main.c 2011-08-03 00:58:33 UTC (rev 2130)
@@ -1362,8 +1362,8 @@
{
// change back to previous fs_game
cls.oldGameSet = qfalse;
- Cvar_Set("fs_game", cls.oldGame);
- Com_GameRestart(0, qtrue);
+ Cvar_Set2("fs_game", cls.oldGame, qtrue);
+ FS_ConditionalRestart(clc.checksumFeed, qfalse);
}
}
Modified: trunk/code/qcommon/files.c
===================================================================
--- trunk/code/qcommon/files.c 2011-08-02 23:34:50 UTC (rev 2129)
+++ trunk/code/qcommon/files.c 2011-08-03 00:58:33 UTC (rev 2130)
@@ -3884,12 +3884,27 @@
*/
qboolean FS_ConditionalRestart(int checksumFeed, qboolean disconnect)
{
+ int retval;
+
if(fs_gamedirvar->modified)
{
- Com_GameRestart(checksumFeed, disconnect);
- return qtrue;
+ if(FS_FilenameCompare(lastValidGame, fs_gamedirvar->string) &&
+ (*lastValidGame || FS_FilenameCompare(fs_gamedirvar->string, com_basegame->string)) &&
+ (*fs_gamedirvar->string || FS_FilenameCompare(lastValidGame, com_basegame->string)))
+ {
+ Com_GameRestart(checksumFeed, disconnect);
+ return qtrue;
+ }
+ else
+ {
+ fs_gamedirvar->modified = qfalse;
+ retval = qtrue;
+ }
}
- else if(checksumFeed != fs_checksumFeed)
+ else
+ retval = qfalse;
+
+ if(checksumFeed != fs_checksumFeed)
FS_Restart(checksumFeed);
else if(fs_numServerPaks && !fs_reordered)
FS_ReorderPurePaks();
More information about the quake3-commits
mailing list