Fix getting IDemoRecorder in CS:GO linux
This commit is contained in:
parent
3aa53e4baf
commit
7fb0e7bf23
@ -430,13 +430,20 @@ IDemoRecorder *HLTVServerWrapperManager::GetDemoRecorderPtr(IHLTVServer *hltv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
*(int **)&offset = (int *)addr;
|
*(int **)&offset = (int *)addr;
|
||||||
|
|
||||||
|
// See if we have to subtract something from the offset.
|
||||||
|
int baseOffset = 0;
|
||||||
|
if (g_pGameConf->GetOffset("CHLTVDemoRecorder_BaseOffset", &baseOffset))
|
||||||
|
{
|
||||||
|
offset -= baseOffset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hltv)
|
if (hltv)
|
||||||
{
|
{
|
||||||
IServer *baseServer = hltv->GetBaseServer();
|
IServer *baseServer = hltv->GetBaseServer();
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
return (IDemoRecorder *)((intptr_t)baseServer + offset - 4);
|
return (IDemoRecorder *)((intptr_t)baseServer + offset);
|
||||||
#else
|
#else
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE == SE_CSGO
|
||||||
return (IDemoRecorder *)((intptr_t)hltv + offset);
|
return (IDemoRecorder *)((intptr_t)hltv + offset);
|
||||||
|
@ -91,6 +91,11 @@
|
|||||||
"windows" "52"
|
"windows" "52"
|
||||||
"linux" "52"
|
"linux" "52"
|
||||||
}
|
}
|
||||||
|
"CHLTVDemoRecorder_BaseOffset"
|
||||||
|
{
|
||||||
|
"windows" "0"
|
||||||
|
"linux" "12"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
@ -245,6 +250,11 @@
|
|||||||
"windows" "40"
|
"windows" "40"
|
||||||
"linux" "40"
|
"linux" "40"
|
||||||
}
|
}
|
||||||
|
"CHLTVDemoRecorder_BaseOffset"
|
||||||
|
{
|
||||||
|
"windows" "0"
|
||||||
|
"linux" "4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user