summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-08-03 00:58:33 +0000
committerTim Angus <tim@ngus.net>2013-01-10 23:26:55 +0000
commit3eae34acfd6561c6dea659f5660c2f3437b28a0b (patch)
tree81866813974d292c2d45295fb9a39acc18836995 /src/qcommon
parentb92938cc6f3622058bef8a98bf1c600e40c63c5d (diff)
Don't do game_restart if game directory changed from "" to "baseq3" or "baseq3" to ""
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/files.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c
index f18b96a3..10e00f11 100644
--- a/src/qcommon/files.c
+++ b/src/qcommon/files.c
@@ -3591,12 +3591,27 @@ restart if necessary
*/
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();