Merge branch 'fedddddd:develop' into locale

This commit is contained in:
Vlad 2022-08-22 18:43:19 +03:00 committed by GitHub
commit 09b0a6d028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 9 deletions

View File

@ -263,6 +263,12 @@ namespace fastfiles
if (is_builtin_map) 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); game::DB_LevelLoadAddZone(load, name, alloc_flags, size_est);
} }
else else

View File

@ -240,6 +240,14 @@ namespace updater
#ifdef DEBUG #ifdef DEBUG
console::info("[Updater] Found extra file %s\n", file.data()); console::info("[Updater] Found extra file %s\n", file.data());
#endif #endif
if (file.ends_with(".ff"))
{
update_data.access([](update_data_t& data_)
{
data_.restart_required = true;
});
}
garbage_files.push_back(file); garbage_files.push_back(file);
} }
} }
@ -410,7 +418,7 @@ namespace updater
{ {
update_data.access([](update_data_t& data_) 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; 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) for (const auto& file : garbage_files)
{ {
try try
@ -505,14 +521,6 @@ namespace updater
for (const auto& download : downloads) 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)) if (!write_file(download.name, download.data))
{ {
set_update_download_status(true, false, ERR_WRITE_FAIL + download.name); set_update_download_status(true, false, ERR_WRITE_FAIL + download.name);