From ec5dc504bf91b494069b03e7903e89eff951b46c Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Sun, 25 Feb 2024 13:29:38 -0500 Subject: Fix bad offsets of `sq_getfunction` (#672) and remove duplicate assignment --- primedev/squirrel/squirrel.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/primedev/squirrel/squirrel.cpp b/primedev/squirrel/squirrel.cpp index 70dedcb8..259d0f43 100644 --- a/primedev/squirrel/squirrel.cpp +++ b/primedev/squirrel/squirrel.cpp @@ -715,7 +715,7 @@ ON_DLL_LOAD_RELIESON("client.dll", ClientSquirrel, ConCommand, (CModule module)) // Message buffer stuff g_pSquirrel->messageBuffer = g_pSquirrel->messageBuffer; - g_pSquirrel->__sq_getfunction = module.Offset(0x572FB0).RCast(); + g_pSquirrel->__sq_getfunction = module.Offset(0x6CB0).RCast(); g_pSquirrel->__sq_getfunction = g_pSquirrel->__sq_getfunction; g_pSquirrel->__sq_stackinfos = module.Offset(0x35970).RCast(); g_pSquirrel->__sq_stackinfos = g_pSquirrel->__sq_stackinfos; @@ -756,9 +756,6 @@ ON_DLL_LOAD_RELIESON("client.dll", ClientSquirrel, ConCommand, (CModule module)) StubUnsafeSQFuncs(); StubUnsafeSQFuncs(); - - g_pSquirrel->__sq_getfunction = module.Offset(0x6CB0).RCast(); - g_pSquirrel->__sq_getfunction = g_pSquirrel->__sq_getfunction; } ON_DLL_LOAD_RELIESON("server.dll", ServerSquirrel, ConCommand, (CModule module)) @@ -808,7 +805,7 @@ ON_DLL_LOAD_RELIESON("server.dll", ServerSquirrel, ConCommand, (CModule module)) g_pSquirrel->logger = NS::log::SCRIPT_SV; // Message buffer stuff - g_pSquirrel->__sq_getfunction = module.Offset(0x6C85).RCast(); + g_pSquirrel->__sq_getfunction = module.Offset(0x6C80).RCast(); g_pSquirrel->__sq_stackinfos = module.Offset(0x35920).RCast(); // Structs -- cgit v1.2.3