Load MPQ file overrides without StormLib

Also logs the overrides in verbose mode.
This commit is contained in:
Gleb Mazovetskiy 2021-10-23 10:12:14 +01:00
commit a97ffd1640
7 changed files with 57 additions and 64 deletions

View file

@ -65,7 +65,7 @@ HANDLE LoadMPQ(const std::vector<std::string> &paths, const char *mpqName)
mpqAbsPath = path + mpqName;
if (SFileOpenArchive(mpqAbsPath.c_str(), 0, MPQ_OPEN_READ_ONLY, &archive)) {
LogVerbose(" Found: {} in {}", mpqName, path);
SFileSetBasePath(path);
paths::SetMpqDir(path);
return archive;
}
if (SErrGetLastError() != STORM_ERROR_FILE_NOT_FOUND) {