Dont always load eng ff

This commit is contained in:
Federico Cecchetto 2022-09-03 02:11:00 +02:00
parent 28bac8266a
commit 7f2d79349b

View File

@ -110,9 +110,7 @@ namespace fastfiles
if (localized)
{
const auto language = game::SEH_GetCurrentLanguageCode();
try_load_zone(language + "_"s + name, false);
if (language != "eng"s)
if (!try_load_zone(language + "_"s + name, false) && language != "eng"s)
{
try_load_zone("eng_" + name, false);
}
@ -327,17 +325,12 @@ namespace fastfiles
if (localized)
{
const auto language = game::SEH_GetCurrentLanguageCode();
const auto eng_name = "eng_"s + name;
const auto lang_name = language + "_"s + name;
if (fastfiles::exists(lang_name))
{
add_custom_level_load_zone(load, lang_name.data(), false, size_est);
}
else if (fastfiles::exists(eng_name))
{
add_custom_level_load_zone(load, eng_name.data(), false, size_est);
}
}
game::DB_LevelLoadAddZone(load, name, game::DB_ZONE_GAME | game::DB_ZONE_CUSTOM, size_est);