mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- added missing game specific autoload handler.
This commit is contained in:
parent
45cc95401f
commit
683672a1be
2 changed files with 10 additions and 10 deletions
|
@ -475,7 +475,7 @@ void FGameConfigFile::AddAutoexec (FArgs *list, const char *game)
|
|||
const char *key;
|
||||
const char *value;
|
||||
|
||||
snprintf (section, countof(section), "%s.AutoLoad", game);
|
||||
snprintf (section, countof(section), "%s.AutoExec", game);
|
||||
|
||||
// If <game>.AutoLoad section does not exist, create it
|
||||
// with a default autoexec.cfg file present.
|
||||
|
|
|
@ -324,16 +324,16 @@ void InitFileSystem(TArray<GrpEntry>& groups)
|
|||
|
||||
const char* key;
|
||||
const char* value;
|
||||
if (GameConfig->SetSection("global.Autoload"))
|
||||
D_AddConfigFiles(Files, "Global.Autoload", "*.grp", GameConfig);
|
||||
|
||||
long len;
|
||||
int lastpos = 0;
|
||||
|
||||
while (lastpos < LumpFilter.Len() && (len = strcspn(LumpFilter.GetChars() + lastpos, ".")) > 0)
|
||||
{
|
||||
while (GameConfig->NextInSection(key, value))
|
||||
{
|
||||
if (stricmp(key, "Path") == 0)
|
||||
{
|
||||
FString nice = NicePath(value);
|
||||
D_AddFile(Files, nice, true, -1, GameConfig);
|
||||
}
|
||||
}
|
||||
auto file = LumpFilter.Left(len + lastpos) + ".Autoload";
|
||||
D_AddConfigFiles(Files, file, "*.grp", GameConfig);
|
||||
lastpos += len + 1;
|
||||
}
|
||||
|
||||
if (!insertdirectoriesafter && userConfig.AddFilesPre) for (auto& file : *userConfig.AddFilesPre)
|
||||
|
|
Loading…
Reference in a new issue