Merge pull request #751 from diamante0018/develop

[Assets]: Save dump of clip map correctly
This commit is contained in:
Edo 2023-02-04 17:46:49 +00:00 committed by GitHub
commit 79b743c651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2180,7 +2180,9 @@ namespace Assets
// Write to disk
constexpr auto* prefix = "maps/mp/";
constexpr auto* suffix = ".d3dbsp";
Utils::IO::WriteFile(std::format("raw/clipmap/{}{}{}.iw4x.json", prefix, header.clipMap->name, suffix), output.dump(4));
std::string basename(header.clipMap->name);
basename = basename.substr(std::strlen(prefix), basename.size() - std::strlen(suffix) - std::strlen(prefix));
Utils::IO::WriteFile(std::format("raw/clipmap/{}.iw4x.json", basename), output.dump(4));
}
}