mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Revert gsc patch as it doesn't fix anything on some maps
This commit is contained in:
parent
b4121e9ad4
commit
8fb8cb98ad
@ -47,6 +47,17 @@ namespace gsc
|
|||||||
return true;
|
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();
|
const auto* name_str = name.data();
|
||||||
if (game::DB_XAssetExists(game::ASSET_TYPE_RAWFILE, name_str) &&
|
if (game::DB_XAssetExists(game::ASSET_TYPE_RAWFILE, name_str) &&
|
||||||
!game::DB_IsXAssetDefault(game::ASSET_TYPE_RAWFILE, name_str))
|
!game::DB_IsXAssetDefault(game::ASSET_TYPE_RAWFILE, name_str))
|
||||||
@ -73,17 +84,6 @@ namespace gsc
|
|||||||
return got->second;
|
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{};
|
std::string source_buffer{};
|
||||||
if (!read_script_file(real_name + ".gsc", &source_buffer))
|
if (!read_script_file(real_name + ".gsc", &source_buffer))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user