Ensure that '+set game baseq2' doesn't break the search pathes.

This is the first step to fix issue #158, consistent behavior for all
cases. This problem was also reported by @lonkamikaze through IRC.
This commit is contained in:
Yamagi Burmeister 2017-03-13 13:52:11 +01:00
parent 45cc75d2d9
commit 4a54fdd0ed
1 changed files with 7 additions and 0 deletions

View File

@ -1083,6 +1083,13 @@ FS_SetGamedir(char *dir)
return;
}
/* Do not set BASEDIR as gamedir. It was already set by FS_InitFilesystem()
* and setting it again f*cks the search pathes up. Yes, this a hack. */
if(!Q_stricmp(dir, BASEDIRNAME))
{
return;
}
/* Free up any current game dir info. */
while (fs_searchPaths != fs_baseSearchPaths)
{