- fixed: The 'load' command in GAMEINFO only worked if the filename contained a slash.

This commit is contained in:
Christoph Oelckers 2014-01-26 14:32:44 +01:00
parent efa9e0c3ee
commit 4e53df8bca

View file

@ -1807,12 +1807,17 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
// Try looking for the wad in the same directory as the .wad
// before looking for it in the current directory.
FString checkpath;
if (lastSlash != NULL)
{
FString checkpath(fn, (lastSlash - fn) + 1);
checkpath = FString(fn, (lastSlash - fn) + 1);
checkpath += sc.String;
if (!FileExists (checkpath))
}
else
{
checkpath = sc.String;
}
if (!FileExists(checkpath))
{
pos += D_AddFile(pwads, sc.String, true, pos);
}
@ -1821,7 +1826,6 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
pos += D_AddFile(pwads, checkpath, true, pos);
}
}
}
while (sc.CheckToken(','));
}
else if (!nextKey.CompareNoCase("NOSPRITERENAME"))