diff --git a/AMBuildScript b/AMBuildScript index 2506d84..852be34 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -158,7 +158,7 @@ class ExtensionConfig(object): '-fvisibility=hidden', ] cxx.cxxflags += [ - '-std=c++11', + '-std=c++14', '-fno-exceptions', '-fno-threadsafe-statics', '-Wno-non-virtual-dtor', @@ -246,6 +246,7 @@ class ExtensionConfig(object): cxx.linkflags += ['-static-libgcc'] elif cxx.vendor == 'clang': cxx.linkflags += ['-lgcc_eh'] + cxx.linkflags += ['-static-libstdc++'] def configure_mac(self, cxx): cxx.defines += ['OSX', '_OSX', 'POSIX'] diff --git a/extension.cpp b/extension.cpp index 564aa07..cdb2b73 100644 --- a/extension.cpp +++ b/extension.cpp @@ -164,6 +164,22 @@ static struct SrcdsPatch "xxxxxx", (unsigned char *)"\x90\x90\x90\x90\x90\x90", 0, 0, 0, true + }, + // 10: fix server lagging resulting from too many ConMsgs due to packet spam ("%s:corrupted packet %i at %i\n") + { + "_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 + }, + // 11: fix server lagging resulting from too many ConMsgs due to packet spam ("Invalid split packet length %i\n") + { + "_Z11NET_GetLongiP11netpacket_s", + (unsigned char *)"\x89\x44\x24\x04\xC7\x04\x24\x98\x64\x24\x00\xE8\xFE\x20\x22\x00\x89\xF8\x8B\x5D\xF4\x8B\x75\xF8\x8B\x7D\xFC", + "xxxx???????x????xxxxxxxxxxx", + (unsigned char *)"\x89\x44\x24\x04\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x89\xF8\x8B\x5D\xF4\x8B\x75\xF8\x8B\x7D\xFC", + 0, 0, 0, true } }; @@ -559,7 +575,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late) return false; } - pPatch->pPatchAddress = FindPattern(pPatch->pAddress, pPatch->pPatchSignature, pPatch->pPatchPattern, 1024); + pPatch->pPatchAddress = FindPattern(pPatch->pAddress, pPatch->pPatchSignature, pPatch->pPatchPattern, 0x1000); if(!pPatch->pPatchAddress) { snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature); diff --git a/smsdk_config.h b/smsdk_config.h index c1141c5..3b64c1b 100644 --- a/smsdk_config.h +++ b/smsdk_config.h @@ -40,7 +40,7 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "CSSFixes" #define SMEXT_CONF_DESCRIPTION "Patches bugs in the CSS server binary and more..." -#define SMEXT_CONF_VERSION "1.16" +#define SMEXT_CONF_VERSION "1.17" #define SMEXT_CONF_AUTHOR "BotoX" #define SMEXT_CONF_URL "" #define SMEXT_CONF_LOGTAG "CSSFIXES"