update for latest sourcemod + cs:go update (thx Vauff)

This commit is contained in:
BotoX 2021-06-03 18:54:54 +02:00
parent 8b955e85a2
commit 6f0ce651eb
2 changed files with 7 additions and 6 deletions

View File

@ -178,7 +178,7 @@ class ExtensionConfig(object):
'-fvisibility=hidden',
]
cxx.cxxflags += [
'-std=c++11',
'-std=c++14',
'-fno-exceptions',
'-fno-threadsafe-statics',
'-Wno-non-virtual-dtor',
@ -266,6 +266,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']

View File

@ -84,8 +84,8 @@ struct SrcdsPatch
#elif SOURCE_ENGINE == SE_CSGO && defined PLATFORM_WINDOWS
{
"Physics_RunThinkFunctions",
(unsigned char *)"\x8B\xF0\x0F\x1F\x84\x00\x00\x00\x00\x00\x8B\x0D\xD0\x52\xA3\x10\xF3\x0F\x10\x45\xFC\xF3\x0F\x11\x41\x10\x8B\x0C\xBB\xE8\x18\xFE\xFF\xFF\x47\x3B\xFE\x7C\xE3\x8B\x75\xF4",
"xxxxxxxxxxxx????xxxxxxxxxxxxxx????xxxxxxxx",
(unsigned char *)"\x8B\xF0\x8B\x0D\xD0\x52\xA3\x10\xF3\x0F\x10\x45\xFC\xF3\x0F\x11\x41\x10\x8B\x0C\xBB\xE8\x18\xFE\xFF\xFF\x47\x3B\xFE\x7C\xE3\x8B\x75\xF4",
"xxxx????xxxxxxxxxxxxxx????xxxxxxxx",
NULL,
0, 0, 0, false
}
@ -529,8 +529,8 @@ bool PhysHooks::SDK_OnLoad(char *error, size_t maxlength, bool late)
// push ebx ; **list
// call NULL ; <- our func here
// add esp, 12 ; fix up stack
// jmp +17 ; jump over useless instructions
static unsigned char aPatch[] = "\x83\xEC\x04\xF3\x0F\x10\x45\xFC\xF3\x0F\x11\x04\x24\x50\x53\xE8\x00\x00\x00\x00\x83\xC4\x0C\xEB\x11\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";
// jmp +9 ; jump over useless instructions
static unsigned char aPatch[] = "\x83\xEC\x04\xF3\x0F\x10\x45\xFC\xF3\x0F\x11\x04\x24\x50\x53\xE8\x00\x00\x00\x00\x83\xC4\x0C\xEB\x09\x90\x90\x90\x90\x90\x90\x90\x90\x90";
gs_Patches[0].pPatch = aPatch;
// put our function address into the relative call instruction
@ -699,4 +699,4 @@ uintptr_t FindPattern(uintptr_t BaseAddr, const unsigned char *pData, const char
}
return 0x00;
}
}