Fix demo recording natives on CS:GO linux

This commit is contained in:
Peace-Maker 2016-05-04 16:11:19 +02:00
parent c0f634005d
commit b8e9696875

View File

@ -416,16 +416,16 @@ IDemoRecorder *HLTVServerWrapperManager::GetDemoRecorderPtr(IHLTVServer *hltv)
if (hltv) if (hltv)
{ {
#if SOURCE_ENGINE == SE_CSGO
return (IDemoRecorder *)((intptr_t)hltv + offset);
#else
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 - 4);
#else
#if SOURCE_ENGINE == SE_CSGO
return (IDemoRecorder *)((intptr_t)hltv + offset);
#else #else
return (IDemoRecorder *)((intptr_t)baseServer + offset); return (IDemoRecorder *)((intptr_t)baseServer + offset);
#endif // WIN32
#endif // SOURCE_ENGINE == SE_CSGO #endif // SOURCE_ENGINE == SE_CSGO
#endif // !WIN32
} }
else else
{ {