pack_t *packlist = NULL;
-searchpath_t *fs_searchpaths;
+searchpath_t *fs_searchpaths = NULL;
#define MAX_FILES_IN_PACK 65536
separator = backslash;
if (separator < colon)
separator = colon;
- if (dot < separator)
+ if (dot == NULL || dot < separator)
return "";
dot++;
for (i = 0;i < 7 && dot[i];i++)
Cmd_AddCommand ("ls", FS_Ls_f);
strcpy(fs_basedir, ".");
+ strcpy(fs_gamedir, ".");
PK3_OpenLibrary ();
// -basedir <path>
// Overrides the system supplied base directory (under GAMENAME)
i = COM_CheckParm ("-basedir");
- if (i && i < com_argc-1)
- strlcpy (fs_basedir, com_argv[i+1], sizeof (fs_basedir));
-
- i = strlen (fs_basedir);
- if (i > 0 && (fs_basedir[i-1] == '\\' || fs_basedir[i-1] == '/'))
- fs_basedir[i-1] = 0;
-
- // start up with GAMENAME by default (id1)
- strlcpy (com_modname, GAMENAME, sizeof (com_modname));
- FS_AddGameDirectory (va("%s/"GAMENAME, fs_basedir));
- if (gamedirname[0])
- {
- fs_modified = true;
- strlcpy (com_modname, gamedirname, sizeof (com_modname));
- FS_AddGameDirectory (va("%s/%s", fs_basedir, gamedirname));
- }
-
- // -game <gamedir>
- // Adds basedir/gamedir as an override game
- i = COM_CheckParm ("-game");
if (i && i < com_argc-1)
{
- fs_modified = true;
- strlcpy (com_modname, com_argv[i+1], sizeof (com_modname));
- FS_AddGameDirectory (va("%s/%s", fs_basedir, com_argv[i+1]));
+ strlcpy (fs_basedir, com_argv[i+1], sizeof (fs_basedir));
+ i = strlen (fs_basedir);
+ if (i > 0 && (fs_basedir[i-1] == '\\' || fs_basedir[i-1] == '/'))
+ fs_basedir[i-1] = 0;
}
// -path <dir or packfile> [<dir or packfile>] ...
if (i)
{
fs_modified = true;
- fs_searchpaths = NULL;
while (++i < com_argc)
{
if (!com_argv[i] || com_argv[i][0] == '+' || com_argv[i][0] == '-')
search->next = fs_searchpaths;
fs_searchpaths = search;
}
+ return;
+ }
+
+ // start up with GAMENAME by default (id1)
+ strlcpy (com_modname, GAMENAME, sizeof (com_modname));
+ FS_AddGameDirectory (va("%s/"GAMENAME, fs_basedir));
+
+ // add the game-specific path, if any
+ if (gamedirname[0])
+ {
+ fs_modified = true;
+ strlcpy (com_modname, gamedirname, sizeof (com_modname));
+ FS_AddGameDirectory (va("%s/%s", fs_basedir, gamedirname));
+ }
+
+ // -game <gamedir>
+ // Adds basedir/gamedir as an override game
+ i = COM_CheckParm ("-game");
+ if (i && i < com_argc-1)
+ {
+ fs_modified = true;
+ strlcpy (com_modname, com_argv[i+1], sizeof (com_modname));
+ FS_AddGameDirectory (va("%s/%s", fs_basedir, com_argv[i+1]));
}
}
const char *name;
char linebuf[4096];
fssearch_t *search;
- search = FS_Search(pattern, true, false);
+ search = FS_Search(pattern, true, true);
if (!search)
return 0;
numfiles = search->numfilenames;
0 darkplaces: clean up Collision_TraceBrushBrush to have another temp variable besides f and clean up the enterfrac2 handling (Vic)
0 darkplaces: client colors are being reset to "15 15" each level in prydon gate? (FrikaC)
0 darkplaces: corona on your own muzzleflash is annoying when looking down because it can be seen (flum)
-0 darkplaces: darkplaces-glx -path transfusion crashes, fix the crash even though it's not going to work anyway (Todd)
+-n darkplaces: darkplaces-glx -path transfusion crashes, fix the crash even though it's not going to work anyway (Todd)
0 darkplaces: delay "connect" and "playdemo" and "timedemo" until after video init to cause quicker video startup (KrimZon)
0 darkplaces: document the TEI stuff used in Nexuiz? check telejano site first (SeienAbunae)
0 darkplaces: don't complain if lightning bolt models are missing in client (Electro, Sajt)