Revert gsc patch as it doesn't fix anything on some maps

This commit is contained in:
FutureRave 2022-10-19 15:14:43 +01:00
parent b4121e9ad4
commit 8fb8cb98ad
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31

View File

@ -47,6 +47,17 @@ namespace gsc
return true;
}
// This will prevent 'fake' GSC raw files from being compiled.
// They are parsed by the game's own parser later as they are special files.
if (name.starts_with("maps/createfx") || name.starts_with("maps/createart") ||
(name.starts_with("maps/mp") && name.ends_with("_fx.gsc")))
{
#ifdef _DEBUG
console::info("Refusing to compile rawfile '%s\n", name.data());
#endif
return false;
}
const auto* name_str = name.data();
if (game::DB_XAssetExists(game::ASSET_TYPE_RAWFILE, name_str) &&
!game::DB_IsXAssetDefault(game::ASSET_TYPE_RAWFILE, name_str))
@ -73,17 +84,6 @@ namespace gsc
return got->second;
}
// This will prevent 'fake' GSC raw files from being compiled.
// The GSC fake files are leftovers and have an actual scriptfiles counterpart that we must load instead.
if (real_name.starts_with("maps/createfx") || real_name.starts_with("maps/createart") ||
(real_name.starts_with("maps/mp") && real_name.ends_with("_fx.gsc")))
{
if (game::DB_XAssetExists(game::ASSET_TYPE_SCRIPTFILE, real_name.data()))
{
return game::DB_FindXAssetHeader(game::ASSET_TYPE_SCRIPTFILE, real_name.data(), false).scriptfile;
}
}
std::string source_buffer{};
if (!read_script_file(real_name + ".gsc", &source_buffer))
{