diff --git a/src/client/component/fastfiles.cpp b/src/client/component/fastfiles.cpp index b0c08b8b..4e955778 100644 --- a/src/client/component/fastfiles.cpp +++ b/src/client/component/fastfiles.cpp @@ -263,6 +263,12 @@ namespace fastfiles if (is_builtin_map) { + const auto name_ = "h2_mod_patch_"s + name; + if (fastfiles::exists(name_)) + { + add_custom_level_load_zone(load, name_.data(), true, size_est); + } + game::DB_LevelLoadAddZone(load, name, alloc_flags, size_est); } else diff --git a/src/client/component/updater.cpp b/src/client/component/updater.cpp index ed4cdf75..aa157692 100644 --- a/src/client/component/updater.cpp +++ b/src/client/component/updater.cpp @@ -240,6 +240,14 @@ namespace updater #ifdef DEBUG console::info("[Updater] Found extra file %s\n", file.data()); #endif + if (file.ends_with(".ff")) + { + update_data.access([](update_data_t& data_) + { + data_.restart_required = true; + }); + } + garbage_files.push_back(file); } } @@ -410,7 +418,7 @@ namespace updater { update_data.access([](update_data_t& data_) { - data_.restart_required = true;// + data_.restart_required = true; }); } @@ -454,6 +462,14 @@ namespace updater return data_.garbage_files; }); + update_data.access([](update_data_t& data_) + { + if (data_.restart_required) + { + database::close_fastfile_handles(); + } + }); + for (const auto& file : garbage_files) { try @@ -505,14 +521,6 @@ namespace updater for (const auto& download : downloads) { - update_data.access([](update_data_t& data_) - { - if (data_.restart_required) - { - database::close_fastfile_handles(); - } - }); - if (!write_file(download.name, download.data)) { set_update_download_status(true, false, ERR_WRITE_FAIL + download.name);