Merge pull request #673 from diamante0018/develop
[Dvar]: Protect special dvar
This commit is contained in:
commit
12a488a297
@ -321,7 +321,7 @@ namespace Components
|
||||
{
|
||||
if (AreArchiveDvarsProtected())
|
||||
{
|
||||
Logger::Print(Game::CON_CHANNEL_CONSOLEONLY, "Not allowing server to override saved dvar '{}'\n", dvarName);
|
||||
Logger::Print(Game::CON_CHANNEL_CONSOLEONLY, "Not allowing server to override saved dvar '{}'\n", dvar->name);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -331,6 +331,12 @@ namespace Components
|
||||
SaveArchiveDvar(dvar);
|
||||
}
|
||||
|
||||
if (dvar != nullptr && std::strcmp(dvar->name, "com_errorResolveCommand") == 0)
|
||||
{
|
||||
Logger::Print(Game::CON_CHANNEL_CONSOLEONLY, "Not allowing server to set '{}'\n", dvar->name);
|
||||
return;
|
||||
}
|
||||
|
||||
Utils::Hook::Call<void(const char*, const char*)>(0x4F52E0)(dvarName, value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user