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;
|
||||
|
||||
// See if we have to subtract something from the offset.
|
||||
int baseOffset = 0;
|
||||
if (g_pGameConf->GetOffset("CHLTVDemoRecorder_BaseOffset", &baseOffset))
|
||||
{
|
||||
offset -= baseOffset;
|
||||
}
|
||||
}
|
||||
|
||||
if (hltv)
|
||||
{
|
||||
IServer *baseServer = hltv->GetBaseServer();
|
||||
#ifndef WIN32
|
||||
return (IDemoRecorder *)((intptr_t)baseServer + offset - 4);
|
||||
return (IDemoRecorder *)((intptr_t)baseServer + offset);
|
||||
#else
|
||||
#if SOURCE_ENGINE == SE_CSGO
|
||||
return (IDemoRecorder *)((intptr_t)hltv + offset);
|
||||
|
@ -91,6 +91,11 @@
|
||||
"windows" "52"
|
||||
"linux" "52"
|
||||
}
|
||||
"CHLTVDemoRecorder_BaseOffset"
|
||||
{
|
||||
"windows" "0"
|
||||
"linux" "12"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
@ -245,6 +250,11 @@
|
||||
"windows" "40"
|
||||
"linux" "40"
|
||||
}
|
||||
"CHLTVDemoRecorder_BaseOffset"
|
||||
{
|
||||
"windows" "0"
|
||||
"linux" "4"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user