fix server lagging as a result from too many ConMsgs due to packet spam

This commit is contained in:
hubdom 2021-06-02 23:10:57 +02:00
parent d9da094430
commit deca47cb54
2 changed files with 11 additions and 3 deletions

View File

@ -158,7 +158,7 @@ class ExtensionConfig(object):
'-fvisibility=hidden', '-fvisibility=hidden',
] ]
cxx.cxxflags += [ cxx.cxxflags += [
'-std=c++11', '-std=c++14',
'-fno-exceptions', '-fno-exceptions',
'-fno-threadsafe-statics', '-fno-threadsafe-statics',
'-Wno-non-virtual-dtor', '-Wno-non-virtual-dtor',

View File

@ -206,6 +206,14 @@ static struct SrcdsPatch
"xxxxxxxxxxx", "xxxxxxxxxxx",
(unsigned char *)"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90", (unsigned char *)"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90",
0, 0, 0, false 0, 0, 0, false
},
// 10: fix server lagging resulting from too many ConMsgs due to packet spam
{
"_ZN8CNetChan19ProcessPacketHeaderEP11netpacket_s",
(unsigned char *)"\x89\x44\x24\x04\x89\x5C\x24\x0C\x89\x54\x24\x08\xE8\xE0\xAB\x22\x00",
"xxxxxxxxxxxxx????",
(unsigned char *)"\x89\x44\x24\x04\x89\x5C\x24\x0C\x89\x54\x24\x08\x90\x90\x90\x90\x90",
0, 0, 0, true
} }
}; };
@ -724,7 +732,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
return false; return false;
} }
pPatch->pPatchAddress = FindPattern(pPatch->pAddress, pPatch->pPatchSignature, pPatch->pPatchPattern, 1024); pPatch->pPatchAddress = FindPattern(pPatch->pAddress, pPatch->pPatchSignature, pPatch->pPatchPattern, 4096);
if(!pPatch->pPatchAddress) if(!pPatch->pPatchAddress)
{ {
snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature); snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature);