mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
Only one signature search is needed on Windows (so far)
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40202
This commit is contained in:
parent
e7f62bcc60
commit
0c1f160f97
@ -238,16 +238,26 @@ bool CSmmAPI::CacheCmds()
|
|||||||
//callback = //*((FnCommandCallback *)((char *)pBase + offsetof(ConCommand, m_fnCommandCallback)));
|
//callback = //*((FnCommandCallback *)((char *)pBase + offsetof(ConCommand, m_fnCommandCallback)));
|
||||||
callback = ((ConCommand *)pBase)->GetCallback();
|
callback = ((ConCommand *)pBase)->GetCallback();
|
||||||
ptr = (unsigned char *)callback;
|
ptr = (unsigned char *)callback;
|
||||||
|
#ifdef OS_LINUX
|
||||||
if (vcmp(ptr, ENGINE486_SIG, SIGLEN))
|
if (vcmp(ptr, ENGINE486_SIG, SIGLEN))
|
||||||
{
|
{
|
||||||
offs = ENGINE486_OFFS;
|
offs = ENGINE486_OFFS;
|
||||||
} else if (vcmp(ptr, ENGINE686_SIG, SIGLEN)) {
|
}
|
||||||
|
else if (vcmp(ptr, ENGINE686_SIG, SIGLEN))
|
||||||
|
{
|
||||||
offs = ENGINE686_OFFS;
|
offs = ENGINE686_OFFS;
|
||||||
} else if (vcmp(ptr, ENGINEAMD_SIG, SIGLEN)) {
|
}
|
||||||
|
else if (vcmp(ptr, ENGINEAMD_SIG, SIGLEN))
|
||||||
|
{
|
||||||
offs = ENGINEAMD_OFFS;
|
offs = ENGINEAMD_OFFS;
|
||||||
} else if (vcmp(ptr, ENGINEW32_SIG, SIGLEN)) {
|
}
|
||||||
|
#elif defined OS_WIN32 // Only one Windows engine binary so far...
|
||||||
|
if (vcmp(ptr, ENGINEW32_SIG, SIGLEN))
|
||||||
|
{
|
||||||
offs = ENGINEW32_OFFS;
|
offs = ENGINEW32_OFFS;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!offs || ptr[offs-1] != IA32_CALL)
|
if (!offs || ptr[offs-1] != IA32_CALL)
|
||||||
{
|
{
|
||||||
m_ConPrintf = (CONPRINTF_FUNC)Msg;
|
m_ConPrintf = (CONPRINTF_FUNC)Msg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user