chore: update

This commit is contained in:
6arelyFuture 2025-05-21 18:51:02 +02:00
parent 84d7702ba2
commit d6c93e6966
Signed by: Future
GPG Key ID: F2000F181A4F7C85
3 changed files with 7 additions and 15 deletions

View File

@ -357,7 +357,7 @@ namespace gsc
build = static_cast<xsk::gsc::build>(static_cast<unsigned int>(build) | static_cast<unsigned int>(xsk::gsc::build::dev_maps));
}
if (dvars::com_developer_script && dvars::com_developer_script->current.enabled)
if (dvars::com_developer_script && dvars::com_developer_script->current.integer > 0)
{
build = static_cast<xsk::gsc::build>(static_cast<unsigned int>(build) | static_cast<unsigned int>(xsk::gsc::build::dev_blocks));
}
@ -434,8 +434,11 @@ namespace gsc
utils::hook::call(SELECT_VALUE(0x14031AB47, 0x1403F7317), find_script);
utils::hook::call(SELECT_VALUE(0x14031AB57, 0x1403F7327), db_is_x_asset_default);
// Enable development options
dvars::com_developer = game::Dvar_RegisterInt("developer", 0, 0, 2, game::DVAR_FLAG_NONE);
dvars::com_developer_script = game::Dvar_RegisterBool("developer_script", false, game::DVAR_FLAG_NONE);
// Enable developer script comments: 0 disabled, 1 full developer script, 2 only dev scripts required by art/lighting tweaks.
// gsc-tool will only have one mode which supports both 1 and 2 dev blocks in the code simultaneously.
dvars::com_developer_script = game::Dvar_RegisterInt("developer_script", 0, 0, 2, game::DVAR_FLAG_NONE);
if (game::environment::is_sp())
{

View File

@ -163,17 +163,6 @@ namespace patches
}
}
void set_client_dvar_from_server_stub(void* a1, void* a2, const char* dvar, const char* value)
{
if (utils::string::to_lower(dvar) == "cg_fov")
{
return;
}
// CG_SetClientDvarFromServer
reinterpret_cast<void(*)(void*, void*, const char*, const char*)>(0x1401BF0A0)(a1, a2, dvar, value);
}
utils::hook::detour cmd_lui_notify_server_hook;
void cmd_lui_notify_server_stub(game::mp::gentity_s* ent)
{
@ -298,9 +287,8 @@ namespace patches
utils::hook::inject(0x1404398B2, VERSION);
// prevent servers overriding our fov
utils::hook::call(0x1401BB782, set_client_dvar_from_server_stub);
utils::hook::nop(0x1403D1195, 5);
utils::hook::nop(0x1400FAE36, 5);
utils::hook::nop(0x1400FAE36, 5); // Dvar_SetFloat inside LUI_CoD_LuaCall_StopFollow (function doesn't exist on dev builds)
utils::hook::set<uint8_t>(0x14019B9B9, 0xEB);
// some anti tamper thing that kills performance

View File

@ -913,6 +913,7 @@ namespace game
DVAR_FLAG_LATCHED = 0x2,
DVAR_FLAG_CHEAT = 0x4,
DVAR_FLAG_REPLICATED = 0x8,
DVAR_FLAG_SCRIPTINFO = 0x10,
DVAR_FLAG_SERVERINFO = 0x400,
DVAR_FLAG_WRITE = 0x800,
DVAR_FLAG_READ = 0x2000,