- Make mod-specific stats toggleable via a dvar and disable it by default

- Disable D3D9Ex by default as it causes the client to not vid_restart correctly for many people
- Add more guids from shitty repacks that include a guid
This commit is contained in:
Dv4L 2020-08-08 12:19:55 +02:00
parent 6381826d1b
commit c9a75a71ba
4 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,9 @@ namespace Components
Utils::Cryptography::ECC::Key Auth::GuidKey;
std::vector<std::uint64_t> Auth::BannedUids = {
0xf4d2c30b712ac6e3
0xf4d2c30b712ac6e3,
0xf7e33c4081337fa3,
0x6f5597f103cc50e9
};
void Auth::Frame()

View File

@ -748,7 +748,7 @@ namespace Components
{
if (Dedicated::IsEnabled()) return;
Dvar::Register<bool>("r_useD3D9Ex", true, Game::dvar_flag::DVAR_FLAG_SAVED, "Use extended d3d9 interface!");
Dvar::Register<bool>("r_useD3D9Ex", false, Game::dvar_flag::DVAR_FLAG_SAVED, "Use extended d3d9 interface!");
// Hook Interface creation
Utils::Hook::Set(0x6D74D0, D3D9Ex::Direct3DCreate9Stub);

View File

@ -326,6 +326,9 @@ namespace Components
// Intermission time dvar
Game::Dvar_RegisterFloat("scr_intermissionTime", 10, 0, 120, Game::DVAR_FLAG_REPLICATED | Game::DVAR_FLAG_SAVED | Game::DVAR_FLAG_DEDISAVED, "Time in seconds before match server loads the next map");
//Dvar for enabling mod-specific stats
Game::Dvar_RegisterBool("scr_modStats", false, Game::DVAR_FLAG_REPLICATED, "Saves stats separately for the loaded mod");
// Disallow invalid player names
Utils::Hook(0x401983, QuickPatch::InvalidNameStub, HOOK_JUMP).install()->quick();

View File

@ -66,7 +66,8 @@ namespace Components
int Stats::SaveStats(char* dest, const char* folder, const char* buffer, size_t length)
{
const auto fs_game = Game::Dvar_FindVar("fs_game");
if (fs_game && fs_game->current.string && strlen(fs_game->current.string) && !strncmp(fs_game->current.string, "mods/", 5))
if (Dvar::Var("scr_modStats").get<bool>() && fs_game && fs_game->current.string && strlen(fs_game->current.string) && !strncmp(fs_game->current.string, "mods/", 5))
{
folder = fs_game->current.string;
}