mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
- fixed addition of main directory.
This commit is contained in:
parent
395ba5541c
commit
c5838df0c8
2 changed files with 8 additions and 7 deletions
|
@ -320,13 +320,14 @@ void InitFileSystem(TArray<GrpEntry>& groups)
|
|||
FString newname = fn + fname;
|
||||
D_AddFile(Files, newname);
|
||||
}
|
||||
bool insert = (!insertdirectoriesafter && &grp == &groups[0]) || (insertdirectoriesafter && &grp == &groups.Last());
|
||||
|
||||
// Add the game's main directory in the proper spot.
|
||||
if ((i == (insertdirectoriesafter ? 0 : dependencies.Size() - 1)) || grp.FileInfo.loaddirectory)
|
||||
if (insert)
|
||||
{
|
||||
// Build's original 'file system' loads all GRPs before the first external directory.
|
||||
// Do this only if explicitly requested because this severely limits the usability of GRP files.
|
||||
if (insertdirectoriesafter && i == 0) for (auto& file : *userConfig.AddFilesPre)
|
||||
if (insertdirectoriesafter) for (auto& file : *userConfig.AddFilesPre)
|
||||
{
|
||||
D_AddFile(Files, file);
|
||||
}
|
||||
|
|
|
@ -1086,7 +1086,7 @@ const char* G_DefaultConFile(void)
|
|||
|
||||
if (g_gameType & GAMEFLAG_WW2GI)
|
||||
{
|
||||
if (fileSystem.FindFile("ww2gi.con")) return "ww2gi.con";
|
||||
if (fileSystem.FindFile("ww2gi.con") >= 0) return "ww2gi.con";
|
||||
}
|
||||
|
||||
if (g_gameType & GAMEFLAG_SW)
|
||||
|
@ -1094,14 +1094,14 @@ const char* G_DefaultConFile(void)
|
|||
|
||||
if (g_gameType & GAMEFLAG_NAM)
|
||||
{
|
||||
if (fileSystem.FindFile("nam.def")) return "nam.def";
|
||||
if (fileSystem.FindFile("napalm.def")) return "napalm.def";
|
||||
if (fileSystem.FindFile("nam.con") >= 0) return "nam.con";
|
||||
if (fileSystem.FindFile("napalm.con") >= 0) return "napalm.con";
|
||||
}
|
||||
|
||||
if (g_gameType & GAMEFLAG_NAPALM)
|
||||
{
|
||||
if (fileSystem.FindFile("napalm.def")) return "napalm.def";
|
||||
if (fileSystem.FindFile("nam.def")) return "nam.def";
|
||||
if (fileSystem.FindFile("napalm.con") >= 0) return "napalm.con";
|
||||
if (fileSystem.FindFile("nam.con") >= 0) return "nam.con";
|
||||
}
|
||||
|
||||
// the other games only use game.con.
|
||||
|
|
Loading…
Reference in a new issue