mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
prevent squirrel compiler errors from killing game process (#43)
This commit is contained in:
parent
a3025e76de
commit
06127dee1d
@ -36,6 +36,10 @@ namespace
|
|||||||
MemoryAddress FairFight_Init = r5_op.PatternSearch("40 53 48 83 EC 20 8B 81 B0 03 ? ? 48 8B D9 C6");
|
MemoryAddress FairFight_Init = r5_op.PatternSearch("40 53 48 83 EC 20 8B 81 B0 03 ? ? 48 8B D9 C6");
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
#pragma region Squirrel
|
||||||
|
MemoryAddress Squirrel_CompileError = r5_op.PatternSearch("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 81 EC ? ? ? ? 48 8B D9 4C 8B F2");
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
void PrintOAddress() // Test the sigscan results
|
void PrintOAddress() // Test the sigscan results
|
||||||
{
|
{
|
||||||
std::cout << "+--------------------------------------------------------+" << std::endl;
|
std::cout << "+--------------------------------------------------------+" << std::endl;
|
||||||
@ -46,6 +50,7 @@ namespace
|
|||||||
PRINT_ADDRESS("Host_NewGame", Host_NewGame.GetPtr());
|
PRINT_ADDRESS("Host_NewGame", Host_NewGame.GetPtr());
|
||||||
PRINT_ADDRESS("CServer_Auth", CServer_Auth.GetPtr());
|
PRINT_ADDRESS("CServer_Auth", CServer_Auth.GetPtr());
|
||||||
PRINT_ADDRESS("FairFight_Init", FairFight_Init.GetPtr());
|
PRINT_ADDRESS("FairFight_Init", FairFight_Init.GetPtr());
|
||||||
|
PRINT_ADDRESS("Squirrel_CompileError", Squirrel_CompileError.GetPtr());
|
||||||
std::cout << "+--------------------------------------------------------+" << std::endl;
|
std::cout << "+--------------------------------------------------------+" << std::endl;
|
||||||
|
|
||||||
// TODO implement error handling when sigscan fails or result is 0
|
// TODO implement error handling when sigscan fails or result is 0
|
||||||
|
@ -26,4 +26,7 @@ void InstallOpcodes() /* .TEXT */
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// JA --> JMP | Prevent FairFight anti-cheat from initializing on the server
|
// JA --> JMP | Prevent FairFight anti-cheat from initializing on the server
|
||||||
FairFight_Init.Offset(0x61).Patch({ 0xE9, 0xED, 0x00, 0x00, 0x00, 0x00 });
|
FairFight_Init.Offset(0x61).Patch({ 0xE9, 0xED, 0x00, 0x00, 0x00, 0x00 });
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
// CALL --> NOP | Prevent squirrel compiler errors from calling Error
|
||||||
|
Squirrel_CompileError.Offset(0x12C).Patch({ 0x90, 0x90, 0x90, 0x90, 0x90 });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user