0

- Fixed a bug in the filesystem that broke "+set game".

- cddir no longer requires baseq2 at the end of the value.
- Updated README to reflect above change and to correct the credits.
- The shell scripts now actually accept parameters.
This commit is contained in:
Ethan Lee
2012-02-12 00:45:07 -05:00
parent 7b4507d00d
commit 614b7a38d5
5 changed files with 21 additions and 10 deletions

View File

@@ -925,10 +925,7 @@ public final class FS extends Globals {
markBaseSearchPaths();
// check for game override
fs_gamedirvar = Cvar.Get("game", "", CVAR_LATCH | CVAR_SERVERINFO);
if (fs_gamedirvar.string.length() > 0)
SetGamedir(fs_gamedirvar.string);
checkOverride();
}
/**
@@ -937,7 +934,15 @@ public final class FS extends Globals {
static void setCDDir() {
fs_cddir = Cvar.Get("cddir", "", CVAR_ARCHIVE);
if (fs_cddir.string.length() > 0)
AddGameDirectory(fs_cddir.string);
AddGameDirectory(fs_cddir.string + '/' + Globals.BASEDIRNAME);
}
/** Check for "+set game" override - Used to properly set gamedir */
static void checkOverride() {
fs_gamedirvar = Cvar.Get("game", "", CVAR_LATCH | CVAR_SERVERINFO);
if (fs_gamedirvar.string.length() > 0)
SetGamedir(fs_gamedirvar.string);
}
static void markBaseSearchPaths() {

View File

@@ -69,11 +69,14 @@ public final class Qcommon extends Globals {
Cbuf.Execute();
FS.InitFilesystem();
System.out.println(FS.fs_gamedir);
reconfigure(false);
FS.setCDDir(); // use cddir from config.cfg
FS.markBaseSearchPaths(); // mark the default search paths
FS.checkOverride();
reconfigure(true); // reload default.cfg and config.cfg