[Dedicated] Add com_logFilter dvar

This commit is contained in:
momo5502 2017-01-14 12:32:44 +01:00
parent ef3fb631d5
commit 0aaf8b8730
3 changed files with 16 additions and 3 deletions

View File

@ -16,12 +16,14 @@ This is the first public Beta version, it mostly consists of bug fixes.
### Added ### Added
- Add peacekeeper - Add peacekeeper.
- Add com_logFilter dvar.
### Changed ### Changed
- Optimize fastfiles, they are now a lot smaller. - Optimize fastfiles, they are now a lot smaller.
- Improve security by modifying guids to allow 64 bit certificate fingerprints. - Improve security by modifying guids to allow 64 bit certificate fingerprints.
- Improve node synchronization handling.
### Fixed ### Fixed

View File

@ -28,6 +28,12 @@ namespace Components
std::memcpy(reinterpret_cast<void*>(0x66E1CB0), &fastfiles, sizeof(fastfiles)); std::memcpy(reinterpret_cast<void*>(0x66E1CB0), &fastfiles, sizeof(fastfiles));
Game::R_LoadGraphicsAssets(); Game::R_LoadGraphicsAssets();
if (Dvar::Var("com_logFilter").get<bool>())
{
Utils::Hook::Nop(0x647466, 5); // 'dvar set' lines
Utils::Hook::Nop(0x5DF4F2, 5); // 'sending splash open' lines
}
Utils::Hook::Call<void()>(0x4F84C0)(); Utils::Hook::Call<void()>(0x4F84C0)();
} }
@ -272,6 +278,7 @@ namespace Components
// Map rotation // Map rotation
Utils::Hook::Set(0x4152E8, Dedicated::MapRotate); Utils::Hook::Set(0x4152E8, Dedicated::MapRotate);
Dvar::Register<bool>("sv_dontrotate", false, Game::dvar_flag::DVAR_FLAG_CHEAT, ""); Dvar::Register<bool>("sv_dontrotate", false, Game::dvar_flag::DVAR_FLAG_CHEAT, "");
Dvar::Register<bool>("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 if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled()) // Run zonebuilder as dedi :P
{ {

View File

@ -337,8 +337,12 @@ namespace Components
Utils::Hook::Nop(0x4CA1FA, 6); Utils::Hook::Nop(0x4CA1FA, 6);
// Filter log (initially com_logFilter, but I don't see why that dvar is needed) // Filter log (initially com_logFilter, but I don't see why that dvar is needed)
// 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(0x647466, 5); // 'dvar set' lines
Utils::Hook::Nop(0x5DF4F2, 5); // 'sending splash open' lines Utils::Hook::Nop(0x5DF4F2, 5); // 'sending splash open' lines
}
// intro stuff // intro stuff
Utils::Hook::Nop(0x60BEE9, 5); // Don't show legals Utils::Hook::Nop(0x60BEE9, 5); // Don't show legals