diff --git a/CHANGELOG.md b/CHANGELOG.md index 609ec03c..6c725235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,12 +16,14 @@ This is the first public Beta version, it mostly consists of bug fixes. ### Added -- Add peacekeeper +- Add peacekeeper. +- Add com_logFilter dvar. ### Changed - Optimize fastfiles, they are now a lot smaller. - Improve security by modifying guids to allow 64 bit certificate fingerprints. +- Improve node synchronization handling. ### Fixed diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index 882ad1f0..1980ec79 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -28,6 +28,12 @@ namespace Components std::memcpy(reinterpret_cast(0x66E1CB0), &fastfiles, sizeof(fastfiles)); Game::R_LoadGraphicsAssets(); + if (Dvar::Var("com_logFilter").get()) + { + Utils::Hook::Nop(0x647466, 5); // 'dvar set' lines + Utils::Hook::Nop(0x5DF4F2, 5); // 'sending splash open' lines + } + Utils::Hook::Call(0x4F84C0)(); } @@ -272,6 +278,7 @@ namespace Components // Map rotation Utils::Hook::Set(0x4152E8, Dedicated::MapRotate); Dvar::Register("sv_dontrotate", false, Game::dvar_flag::DVAR_FLAG_CHEAT, ""); + Dvar::Register("com_logFilter", true, Game::dvar_flag::DVAR_FLAG_LATCHED, "Removes ~95% of unneeded lines from the log"); if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled()) // Run zonebuilder as dedi :P { diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 1790ad3e..8d646737 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -337,8 +337,12 @@ namespace Components Utils::Hook::Nop(0x4CA1FA, 6); // Filter log (initially com_logFilter, but I don't see why that dvar is needed) - Utils::Hook::Nop(0x647466, 5); // 'dvar set' lines - Utils::Hook::Nop(0x5DF4F2, 5); // 'sending splash open' lines + // Seems like it's needed for B3, so there is a separate handling for dedicated servers in Dedicated.cpp + if (!Dedicated::IsEnabled()) + { + Utils::Hook::Nop(0x647466, 5); // 'dvar set' lines + Utils::Hook::Nop(0x5DF4F2, 5); // 'sending splash open' lines + } // intro stuff Utils::Hook::Nop(0x60BEE9, 5); // Don't show legals