Skip to content

Commit 66fd5bd

Browse files
committed
UNION_VDF_VERSION workaound
1 parent f9a4e61 commit 66fd5bd

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

game/resources.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,15 @@ void Resources::loadVdfs(const std::vector<std::u16string>& modvdfs, bool modFil
118118

119119
for(auto& i:archives) {
120120
try {
121-
inst->gothicAssets.merge(phoenix::vdf_file::open(i.name), false);
121+
const uint32_t UNION_VDF_VERSION = 160;
122+
auto in = phoenix::buffer::mmap(i.name);
123+
auto header = phoenix::vdf_header::read(in);
124+
if(header.version==UNION_VDF_VERSION) {
125+
Log::e("skip compressed archive: \"", TextCodec::toUtf8(i.name), "\"");
126+
continue;
127+
}
128+
in.rewind();
129+
inst->gothicAssets.merge(phoenix::vdf_file::open(in), false);
122130
}
123131
catch(const phoenix::vdfs_signature_error& err) {
124132
Log::e("unable to load archive: \"", TextCodec::toUtf8(i.name), "\", reason: ", err.what());

0 commit comments

Comments
 (0)