rename global to ui and ignore it for dedi

This commit is contained in:
quaK 2024-07-17 01:41:15 +03:00
parent 7dd908e6cc
commit 486b09f40f
3 changed files with 28 additions and 0 deletions

View File

@ -217,6 +217,11 @@ namespace fastfiles
add_zone("iw7mod_global_mp", game::DB_ZONE_GLOBAL_TIER1 | game::DB_ZONE_CUSTOM, 1); add_zone("iw7mod_global_mp", game::DB_ZONE_GLOBAL_TIER1 | game::DB_ZONE_CUSTOM, 1);
if (!game::environment::is_dedi())
{
add_zone("iw7mod_ui_mp", game::DB_ZONE_UI | game::DB_ZONE_CUSTOM, 0);
}
game::DB_LoadXAssets(data.data(), static_cast<std::uint32_t>(data.size()), syncMode); game::DB_LoadXAssets(data.data(), static_cast<std::uint32_t>(data.size()), syncMode);
} }
} }

View File

@ -29,6 +29,24 @@ namespace updater
{ {
namespace namespace
{ {
std::vector<std::string> dedi_ignore =
{
"zone/iw7mod_ui_mp.ff",
};
bool is_dedi_ignore_file(const std::string& name)
{
for (auto& ignore_file : dedi_ignore)
{
if (name == CLIENT_DATA_FOLDER + "/"s + ignore_file)
{
return true;
}
}
return false;
}
constexpr auto override_cache = true; constexpr auto override_cache = true;
struct file_data struct file_data
@ -251,6 +269,11 @@ namespace updater
const auto name = file[0].GetString(); const auto name = file[0].GetString();
const auto sha = file[2].GetString(); const auto sha = file[2].GetString();
if (is_dedi_ignore_file(name))
{
continue;
}
console::info("[Updater] Add file \"%s\"\n", name); console::info("[Updater] Add file \"%s\"\n", name);
parsed_list.emplace_back(name, sha); parsed_list.emplace_back(name, sha);