Fix: 2024/04/18 update (#21)

* Fix signatures

* Use offset instead off midfunc signature

* Split signature + offset for games
This commit is contained in:
Natanel Shitrit
2024-04-23 13:48:58 -04:00
committed by GitHub
parent 3c2c79cb07
commit b563b80bae
2 changed files with 38 additions and 9 deletions
+8 -1
View File
@@ -359,8 +359,15 @@ bool Connect::SDK_OnLoad(char *error, size_t maxlen, bool late)
return false;
}
int steam3ServerFuncOffset = 0;
if (!g_pGameConf->GetOffset("CheckMasterServerRequestRestart_Steam3ServerFuncOffset", &steam3ServerFuncOffset) || steam3ServerFuncOffset == 0)
{
snprintf(error, maxlen, "Failed to find CheckMasterServerRequestRestart_Steam3ServerFuncOffset offset.\n");
return false;
}
//META_CONPRINTF("CheckMasterServerRequestRestart: %p\n", address);
address = (void *)((intptr_t)address + 1); // Skip CALL opcode
address = (void *)((intptr_t)address + steam3ServerFuncOffset);
intptr_t offset = (intptr_t)(*(void **)address); // Get offset
g_pSteam3ServerFunc = (Steam3ServerFunc)((intptr_t)address + offset + sizeof(intptr_t));