-void QE_InitVFS(){
- // VFS initialization -----------------------
- // we will call GlobalFileSystem().initDirectory, giving the directories to look in (for files in pk3's and for standalone files)
- // we need to call in order, the mod ones first, then the base ones .. they will be searched in this order
- // *nix systems have a dual filesystem in ~/.q3a, which is searched first .. so we need to add that too
-
- const char* gamename = gamename_get();
- const char* basegame = basegame_get();
- const char* userRoot = g_qeglobals.m_userEnginePath.c_str();
- const char* globalRoot = EnginePath_get();
-
- // if we have a mod dir
- if ( !string_equal( gamename, basegame ) ) {
- // ~/.<gameprefix>/<fs_game>
- if ( userRoot ) {
- StringOutputStream userGamePath( 256 );
- userGamePath << userRoot << gamename << '/';
- GlobalFileSystem().initDirectory( userGamePath.c_str() );
- }
-
- // <fs_basepath>/<fs_game>
- {
- StringOutputStream globalGamePath( 256 );
- globalGamePath << globalRoot << gamename << '/';
- GlobalFileSystem().initDirectory( globalGamePath.c_str() );
- }
- }
-
- // ~/.<gameprefix>/<fs_main>
- if ( userRoot ) {
- StringOutputStream userBasePath( 256 );
- userBasePath << userRoot << basegame << '/';
- GlobalFileSystem().initDirectory( userBasePath.c_str() );
- }
-
- // <fs_basepath>/<fs_main>
- {
- StringOutputStream globalBasePath( 256 );
- globalBasePath << globalRoot << basegame << '/';
- GlobalFileSystem().initDirectory( globalBasePath.c_str() );
- }
+void QE_InitVFS()
+{
+ // VFS initialization -----------------------
+ // we will call GlobalFileSystem().initDirectory, giving the directories to look in (for files in pk3's and for standalone files)
+ // we need to call in order, the mod ones first, then the base ones .. they will be searched in this order
+ // *nix systems have a dual filesystem in ~/.q3a, which is searched first .. so we need to add that too
+
+ const char *gamename = gamename_get();
+ const char *basegame = basegame_get();
+ const char *userRoot = g_qeglobals.m_userEnginePath.c_str();
+ const char *globalRoot = EnginePath_get();
+
+ // if we have a mod dir
+ if (!string_equal(gamename, basegame)) {
+ // ~/.<gameprefix>/<fs_game>
+ if (userRoot && !g_disableHomePath) {
+ StringOutputStream userGamePath(256);
+ userGamePath << userRoot << gamename << '/';
+ GlobalFileSystem().initDirectory(userGamePath.c_str());
+ }
+
+ // <fs_basepath>/<fs_game>
+ if (!g_disableEnginePath) {
+ StringOutputStream globalGamePath(256);
+ globalGamePath << globalRoot << gamename << '/';
+ GlobalFileSystem().initDirectory(globalGamePath.c_str());
+ }
+ }
+
+ // ~/.<gameprefix>/<fs_main>
+ if (userRoot && !g_disableHomePath) {
+ StringOutputStream userBasePath(256);
+ userBasePath << userRoot << basegame << '/';
+ GlobalFileSystem().initDirectory(userBasePath.c_str());
+ }
+
+ // <fs_basepath>/<fs_main>
+ if (!g_disableEnginePath) {
+ StringOutputStream globalBasePath(256);
+ globalBasePath << globalRoot << basegame << '/';
+ GlobalFileSystem().initDirectory(globalBasePath.c_str());
+ }
+
+ // extra pakpaths
+ for (int i = 0; i < g_pakPathCount; i++) {
+ if (g_strcmp0(g_strPakPath[i].c_str(), "")) {
+ GlobalFileSystem().initDirectory(g_strPakPath[i].c_str());
+ }
+ }