2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

Remove hookers stuff

This commit is contained in:
s1lentq 2021-04-16 00:35:45 +07:00
parent 13e2db3423
commit 41f635869a
45 changed files with 14 additions and 4265 deletions

View File

@ -128,18 +128,6 @@
<ClCompile Include="..\..\..\common\ObjectList.cpp" />
<ClCompile Include="..\..\..\common\TokenLine.cpp" />
<ClCompile Include="..\..\..\engine\mem.cpp" />
<ClCompile Include="..\..\..\hookers\HLTV\Core\DeltaEx.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Core\hooklist.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Core\main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\common\BitBuffer.cpp" />
<ClCompile Include="..\..\common\byteorder.cpp" />
<ClCompile Include="..\..\common\common.cpp" />
@ -202,14 +190,6 @@
<ClInclude Include="..\..\..\common\ObjectList.h" />
<ClInclude Include="..\..\..\common\TokenLine.h" />
<ClInclude Include="..\..\..\engine\mem.h" />
<ClInclude Include="..\..\..\hookers\HLTV\Core\DeltaEx.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\..\..\hookers\HLTV\Core\hooklist.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\..\common\BitBuffer.h" />
<ClInclude Include="..\..\common\byteorder.h" />
<ClInclude Include="..\..\common\common_hltv.h" />

View File

@ -10,9 +10,6 @@
<Filter Include="HLTV\common">
<UniqueIdentifier>{664fe3c6-46ae-4fa5-bf0c-f70873228f5e}</UniqueIdentifier>
</Filter>
<Filter Include="src\hookers">
<UniqueIdentifier>{fb482bcd-a131-4e66-be87-c7b0ffe6a4cf}</UniqueIdentifier>
</Filter>
<Filter Include="engine">
<UniqueIdentifier>{0997bc0d-a67f-47eb-abc1-3c7ebb128beb}</UniqueIdentifier>
</Filter>
@ -78,12 +75,6 @@
<ClCompile Include="..\src\public_amalgamation.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Core\hooklist.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Core\main.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\common\BaseSystemModule.cpp">
<Filter>common</Filter>
</ClCompile>
@ -99,9 +90,6 @@
<ClCompile Include="..\..\common\md5.cpp">
<Filter>HLTV\common</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Core\DeltaEx.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\engine\mem.cpp">
<Filter>engine</Filter>
</ClCompile>
@ -164,9 +152,6 @@
<ClInclude Include="..\src\Delta.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\hookers\HLTV\Core\hooklist.h">
<Filter>src\hookers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\common\BaseSystemModule.h">
<Filter>common</Filter>
</ClInclude>
@ -182,9 +167,6 @@
<ClInclude Include="..\..\common\md5.h">
<Filter>HLTV\common</Filter>
</ClInclude>
<ClInclude Include="..\..\..\hookers\HLTV\Core\DeltaEx.h">
<Filter>src\hookers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\engine\mem.h">
<Filter>engine</Filter>
</ClInclude>

View File

@ -28,8 +28,6 @@
#include "precompiled.h"
#ifndef HOOK_HLTV
delta_t *Delta::m_EntityDelta = nullptr;
delta_t *Delta::m_PlayerDelta = nullptr;
delta_t *Delta::m_ClientDelta = nullptr;
@ -1510,5 +1508,3 @@ void Delta::SetLargeTimeBufferSize(bool bigBuffers)
{
m_LargeTime_Buffers = bigBuffers;
}
#endif // HOOK_HLTV

View File

@ -95,10 +95,6 @@ typedef struct delta_s
delta_description_t *pdd;
} delta_t;
#include "hookers/HLTV/Core/DeltaEx.h"
#ifndef HOOK_HLTV
class Delta {
public:
void Init(IBaseSystem *system);
@ -204,5 +200,3 @@ private:
double m_Time;
bool m_LargeTime_Buffers;
};
#endif // HOOK_HLTV

View File

@ -449,6 +449,4 @@ IBaseInterface *CreateNetwork()
return (IBaseInterface *)pNetwork;
}
#ifndef HOOK_HLTV
EXPOSE_INTERFACE_FN(CreateNetwork, Network, NETWORK_INTERFACE_VERSION);
#endif // HOOK_HLTV

View File

@ -2411,6 +2411,4 @@ IBaseInterface *CreateServer()
return (IBaseInterface *)pServer;
}
#ifndef HOOK_HLTV
EXPOSE_INTERFACE_FN(CreateServer, Server, SERVER_INTERFACE_VERSION);
#endif // HOOK_HLTV

View File

@ -2338,7 +2338,6 @@ IBaseInterface *CreateWorld()
return (IBaseInterface *)pWorld;
}
#ifndef HOOK_HLTV
bool World::IsDeltaEncoder() const
{
if (Delta::m_CustomentityDelta
@ -2379,4 +2378,3 @@ delta_t *World::GetWeaponDelta() const {
}
EXPOSE_INTERFACE_FN(CreateWorld, World, WORLD_INTERFACE_VERSION);
#endif // HOOK_HLTV

View File

@ -252,7 +252,7 @@ protected:
int m_MaxInstanced_BaseLine;
#if defined(HLTV_FIXES) && !defined(HOOK_HLTV)
#if defined(HLTV_FIXES)
char m_Lightstyles[MAX_LIGHTSTYLES][64];
#else
char m_Lightstyles[MAX_LIGHTSTYLES][65];
@ -303,13 +303,7 @@ protected:
char m_HostName[255];
NetAddress m_GameServerAddress;
#ifdef HOOK_HLTV
static DeltaWrapper m_Delta;
#else
Delta m_Delta;
#endif // HOOK_HLTV
};
extern char g_DownloadURL[128];

View File

@ -10,9 +10,6 @@
#include "mem.h"
#include "common.h"
// Hooks stuff
#include "hookers/HLTV/Core/hooklist.h"
#include "common/md5.h"
#include "common/random.h"
#include "common/byteorder.h"

View File

@ -16,14 +16,6 @@
<ClCompile Include="..\..\..\common\ObjectList.cpp" />
<ClCompile Include="..\..\..\common\TokenLine.cpp" />
<ClCompile Include="..\..\..\engine\mem.cpp" />
<ClCompile Include="..\..\..\hookers\HLTV\DemoPlayer\hooklist.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\DemoPlayer\main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\common\BitBuffer.cpp" />
<ClCompile Include="..\..\common\byteorder.cpp" />
<ClCompile Include="..\..\common\common.cpp" />
@ -42,10 +34,6 @@
<ClInclude Include="..\..\..\common\ObjectList.h" />
<ClInclude Include="..\..\..\common\TokenLine.h" />
<ClInclude Include="..\..\..\engine\mem.h" />
<ClInclude Include="..\..\..\hookers\HLTV\DemoPlayer\hooklist.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\..\common\BitBuffer.h" />
<ClInclude Include="..\..\common\byteorder.h" />
<ClInclude Include="..\..\common\common_hltv.h" />

View File

@ -10,9 +10,6 @@
<Filter Include="HLTV\common">
<UniqueIdentifier>{ca1c7722-8e65-480d-9e3c-34f7f2524372}</UniqueIdentifier>
</Filter>
<Filter Include="src\hookers">
<UniqueIdentifier>{1f62aa80-c3f7-4f97-a93e-5b67b153a751}</UniqueIdentifier>
</Filter>
<Filter Include="engine">
<UniqueIdentifier>{8712d29d-6fec-42fb-9f6e-5618302f3203}</UniqueIdentifier>
</Filter>
@ -45,12 +42,6 @@
<ClCompile Include="..\..\common\mathlib.cpp">
<Filter>HLTV\common</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\DemoPlayer\hooklist.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\DemoPlayer\main.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\common\BaseSystemModule.cpp">
<Filter>common</Filter>
</ClCompile>
@ -89,9 +80,6 @@
<ClInclude Include="..\..\common\mathlib_internal.h">
<Filter>HLTV\common</Filter>
</ClInclude>
<ClInclude Include="..\..\..\hookers\HLTV\DemoPlayer\hooklist.h">
<Filter>src\hookers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\common\BaseSystemModule.h">
<Filter>common</Filter>
</ClInclude>

View File

@ -172,7 +172,6 @@ private:
unsigned int m_Outgoing_sequence;
};
#ifndef HOOK_HLTV
// Use this to expose a singleton interface. This creates the global variable for you automatically.
#define EXPOSE_SINGLE_INTERFACE2(className, interfaceName, versionName) \
static className __g_##className##_singleton;\
@ -180,4 +179,3 @@ private:
static InterfaceReg __g_Create##className##interfaceName##_reg(__Create##className##interfaceName##_interface, versionName);
EXPOSE_SINGLE_INTERFACE2(DemoPlayer, IDemoPlayer, DEMOPLAYER_INTERFACE_VERSION);
#endif // HOOK_HLTV

View File

@ -18,6 +18,3 @@
#include "common/DemoFile.h"
#include "DemoPlayer.h"
// Hooks stuff
#include "hookers/HLTV/DemoPlayer/hooklist.h"

View File

@ -36,14 +36,6 @@
</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\engine\mem.cpp" />
<ClCompile Include="..\..\..\hookers\HLTV\Proxy\hooklist.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Proxy\main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\common\BaseClient.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
@ -213,10 +205,6 @@
<ClInclude Include="..\..\..\common\ObjectList.h" />
<ClInclude Include="..\..\..\common\TokenLine.h" />
<ClInclude Include="..\..\..\engine\mem.h" />
<ClInclude Include="..\..\..\hookers\HLTV\Proxy\hooklist.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\..\common\BaseClient.h" />
<ClInclude Include="..\..\common\BitBuffer.h" />
<ClInclude Include="..\..\common\byteorder.h" />

View File

@ -10,9 +10,6 @@
<Filter Include="HLTV\common">
<UniqueIdentifier>{feda00f0-7c09-4c63-b5a1-e4fbcdfc6b69}</UniqueIdentifier>
</Filter>
<Filter Include="src\hookers">
<UniqueIdentifier>{199d99ef-8924-48fc-8c8a-2859f8d40c82}</UniqueIdentifier>
</Filter>
<Filter Include="engine">
<UniqueIdentifier>{1777708a-8593-40c0-8caa-9154180854dc}</UniqueIdentifier>
</Filter>
@ -84,12 +81,6 @@
<ClCompile Include="..\..\common\byteorder.cpp">
<Filter>HLTV\common</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Proxy\hooklist.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\HLTV\Proxy\main.cpp">
<Filter>src\hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\Director\src\Director.cpp">
<Filter>src</Filter>
</ClCompile>
@ -173,9 +164,6 @@
<ClInclude Include="..\..\common\NetAddress.h">
<Filter>HLTV\common</Filter>
</ClInclude>
<ClInclude Include="..\..\..\hookers\HLTV\Proxy\hooklist.h">
<Filter>src\hookers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\common\BaseSystemModule.h">
<Filter>common</Filter>
</ClInclude>

View File

@ -83,9 +83,7 @@ Proxy::LocalCommandID_s Proxy::m_LocalCmdReg[] = {
{ "chatdelay", CMD_ID_CHATDELAY, &Proxy::CMD_ChatDelay },
};
#ifndef HOOK_HLTV
EXPOSE_SINGLE_INTERFACE(Proxy, IProxy, PROXY_INTERFACE_VERSION);
#endif // HOOK_HLTV
bool Proxy::Init(IBaseSystem *system, int serial, char *name)
{

View File

@ -18,9 +18,6 @@
#include "common/net_internal.h"
#include "common/mathlib_internal.h"
// Hooks stuff
#include "hookers/HLTV/Proxy/hooklist.h"
#include "common/DirectorCmd.h"
#include "common/NetAddress.h"
#include "common/NetChannel.h"

View File

@ -130,14 +130,6 @@
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\hookers\filesystem\hooklist.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\hookers\filesystem\main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\src\BaseFileSystem.cpp" />
<ClCompile Include="..\src\filesystem_helpers.cpp" />
<ClCompile Include="..\src\FileSystem_Stdio.cpp" />
@ -156,10 +148,6 @@
<ClCompile Include="..\src\public_amalgamation.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\hookers\filesystem\hooklist.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\src\BaseFileSystem.h" />
<ClInclude Include="..\src\filesystem_helpers.h" />
<ClInclude Include="..\src\FileSystem_Stdio.h" />

View File

@ -4,9 +4,6 @@
<Filter Include="src">
<UniqueIdentifier>{3f7611e3-cf43-4956-a8a1-b6efbcf1a63d}</UniqueIdentifier>
</Filter>
<Filter Include="hookers">
<UniqueIdentifier>{cacc7b07-9ac2-42d5-bba3-14c061a19d11}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\BaseFileSystem.cpp">
@ -30,12 +27,6 @@
<ClCompile Include="..\src\filesystem_helpers.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\filesystem\hooklist.cpp">
<Filter>hookers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\hookers\filesystem\main.cpp">
<Filter>hookers</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\BaseFileSystem.h">
@ -50,9 +41,6 @@
<ClInclude Include="..\src\filesystem_helpers.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\hookers\filesystem\hooklist.h">
<Filter>hookers</Filter>
</ClInclude>
<ClInclude Include="..\src\FileSystem_Stdio.h">
<Filter>src</Filter>
</ClInclude>

View File

@ -227,6 +227,4 @@ bool CFileSystem_Stdio::IsAppReadyForOfflinePlay(int appID)
return true;
}
#ifndef HOOK_FILESYSTEM
EXPOSE_SINGLE_INTERFACE(CFileSystem_Stdio, IFileSystem, FILESYSTEM_INTERFACE_VERSION);
#endif // HOOK_FILESYSTEM

View File

@ -33,8 +33,5 @@
#include "interface.h"
#include "strtools.h"
// Hooks stuff
#include "hookers/filesystem/hooklist.h"
// FileSystem stuff
#include "FileSystem_Stdio.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,163 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#pragma once
#ifdef HOOK_HLTV
#include "event_args.h"
#define g_defs (*pg_defs)
#define g_encoders (*pg_encoders)
#define g_deltaregistry (*pg_deltaregistry)
#define g_pplayerdelta (*pg_pplayerdelta)
#define g_pentitydelta (*pg_pentitydelta)
#define g_pcustomentitydelta (*pg_pcustomentitydelta)
#define g_pclientdelta (*pg_pclientdelta)
#define g_pweapondelta (*pg_pweapondelta)
#define g_peventdelta (*pg_peventdelta)
#define g_delta_Time (*pg_delta_Time)
#define g_large_Time_Buffers (*pg_large_Time_Buffers)
typedef struct delta_link_s
{
struct delta_link_s *next;
delta_description_t *delta;
} delta_link_t;
typedef struct delta_definition_s
{
char *fieldName;
size_t fieldOffset;
} delta_definition_t;
typedef struct delta_definition_list_s
{
struct delta_definition_list_s *next;
char *ptypename;
int numelements;
delta_definition_t *pdefinition;
} delta_definition_list_t;
typedef struct delta_registry_s
{
struct delta_registry_s *next;
char *name;
delta_t *pdesc;
} delta_registry_t;
namespace Delta {
#define m_MetaDelta g_MetaDelta
extern delta_t g_MetaDelta[];
};
#define m_EntityDelta g_pentitydelta
#define m_PlayerDelta g_pplayerdelta
#define m_CustomentityDelta g_pcustomentitydelta
#define m_ClientDelta g_pclientdelta
#define m_WeaponDelta g_pweapondelta
#define m_EventDelta g_peventdelta
extern delta_definition_list_t *g_defs;
extern delta_encoder_t *g_encoders;
extern delta_registry_t *g_deltaregistry;
extern delta_t *g_pentitydelta;
extern delta_t *g_pplayerdelta;
extern delta_t *g_pcustomentitydelta;
extern delta_t *g_pclientdelta;
extern delta_t *g_pweapondelta;
extern delta_t *g_peventdelta;
extern double g_delta_Time;
extern bool g_large_Time_Buffers;
delta_description_t *DELTA_FindField(delta_t *pFields, const char *pszField);
int DELTA_FindFieldIndex(delta_t *pFields, const char *fieldname);
void DELTA_SetField(delta_t *pFields, const char *fieldname);
void DELTA_UnsetField(delta_t *pFields, const char *fieldname);
void DELTA_SetFieldByIndex(delta_t *pFields, int fieldNumber);
void DELTA_UnsetFieldByIndex(delta_t *pFields, int fieldNumber);
void DELTA_ClearFlags(delta_t *pFields);
int DELTA_CountSendFields(delta_t *pFields);
void DELTA_MarkSendFields(unsigned char *from, unsigned char *to, delta_t *pFields);
void DELTA_SetSendFlagBits(delta_t *pFields, int *bits, int *bytecount);
void DELTA_WriteMarkedFields(BitBuffer *stream, unsigned char *from, unsigned char *to, delta_t *pFields);
int DELTA_CheckDelta(unsigned char *from, unsigned char *to, delta_t *pFields);
void DELTA_WriteHeader(BitBuffer *stream, deltacallback_t *header);
qboolean DELTA_WriteDelta(BitBuffer *stream, unsigned char *from, unsigned char *to, bool force, delta_t *pFields, deltacallback_t *header = nullptr);
int DELTA_ParseDelta(BitBuffer *stream, unsigned char *from, unsigned char *to, delta_t *pFields);
int DELTA_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields);
void DELTA_AddEncoder(char *name, encoder_t conditionalencode);
void DELTA_ClearEncoders();
encoder_t DELTA_LookupEncoder(char *name);
int DELTA_CountLinks(delta_link_t *plinks);
void DELTA_ReverseLinks(delta_link_t **plinks);
void DELTA_ClearLinks(delta_link_t **plinks);
delta_t *DELTA_BuildFromLinks(delta_link_t **pplinks);
int DELTA_FindOffset(int count, delta_definition_t *pdef, char *fieldname);
bool DELTA_ParseType(delta_description_t *pdelta, char **pstream);
bool DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link_t *pField, char **pstream);
void DELTA_FreeDescription(delta_t **ppdesc);
void DELTA_AddDefinition(char *name, delta_definition_t *pdef, int numelements);
void DELTA_ClearDefinitions();
delta_definition_t *DELTA_FindDefinition(char *name, int *count);
void DELTA_SkipDescription(char **pstream);
bool DELTA_ParseOneField(char **ppstream, delta_link_t **pplist, int count, delta_definition_t *pdefinition);
bool DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream);
bool DELTA_Load(char *name, delta_t **ppdesc, char *pszFile);
void DELTA_RegisterDescription(char *name);
void DELTA_ClearRegistrations();
delta_t **DELTA_LookupRegistration(char *name);
void DELTA_ClearStats(delta_t *p);
void DELTA_Init();
void DELTA_UpdateDescriptions();
void DELTA_Shutdown();
void DELTA_SetTime(double time);
void DELTA_SetLargeTimeBufferSize(bool bigBuffers);
class DeltaWrapper {
public:
void Init(IBaseSystem *system) { DELTA_Init(); }
void Shutdown() { DELTA_Shutdown(); }
void UpdateDescriptions() { DELTA_UpdateDescriptions(); }
void WriteHeader(BitBuffer *stream, deltacallback_t *header) { DELTA_WriteHeader(stream, header); }
bool WriteDelta(BitBuffer *stream, unsigned char *from, unsigned char *to, bool force, delta_t *pFields, deltacallback_t *header = nullptr) { return DELTA_WriteDelta(stream, from, to, force, pFields, header) ? true : false; }
int ParseDelta(BitBuffer *stream, unsigned char *from, unsigned char *to, delta_t *pFields) { return DELTA_ParseDelta(stream, from, to, pFields); }
void SetTime(double time) { DELTA_SetTime(time); }
void SetLargeTimeBufferSize(bool bigBuffers) { DELTA_SetLargeTimeBufferSize(bigBuffers); }
int TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields) { return DELTA_TestDelta(from, to, pFields); }
delta_t **LookupRegistration(char *name) { return DELTA_LookupRegistration(name); }
void FreeDescription(delta_t **ppdesc) { DELTA_FreeDescription(ppdesc); }
delta_registry_t *GetRegistry() const { return g_deltaregistry; }
};
#endif // HOOK_HLTV

View File

@ -1,617 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#include "precompiled.h"
#ifdef HOOK_HLTV
// Hooks stuff
#include "hookers/memory.cpp"
#include "hookers/hooker.cpp"
//#define Mem_region
//#define World_region
//#define Server_region
//#define Network_region
//#define NetSocket_region
//#define BSPModel_region
//#define Delta_region
//#define ObjectDictionary_region
//#define ObjectList_region
//#define BitBuffer_region
//#define Function_References_region
//#define Data_References_region
FunctionHook g_FunctionHooks[] =
{
// DO NOT DISABLE, other functions depends on memory allocation routines
#ifndef Mem_region
HOOK_DEF(0x01D21F5F, malloc_wrapper),
HOOK_DEF(0x01D21E4E, free_wrapper),
HOOK_DEF(0x01D30145, strdup_wrapper),
HOOK_DEF(0x01D21F71, __nh_malloc_wrapper),
HOOK_DEF(0x01D043C0, Mem_ZeroMalloc),
//HOOK_DEF(0x0, Mem_Malloc),
//HOOK_DEF(0x0, Mem_Realloc),
//HOOK_DEF(0x0, Mem_Calloc),
//HOOK_DEF(0x0, Mem_Strdup),
//HOOK_DEF(0x0, Mem_Free),
//HOOK_DEF(0x0, realloc_wrapper),
//HOOK_DEF(0x0, calloc_wrapper),
#endif // Mem_region
#ifndef World_region
// World virtual functions
HOOK_VIRTUAL_DEF(0x01D14DA0, World::Init),
HOOK_VIRTUAL_DEF(0x01D15470, World::RunFrame),
HOOK_VIRTUAL_DEF(0x01D154F0, World::ReceiveSignal),
HOOK_VIRTUAL_DEF(0x01D15490, World::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D15500, World::RegisterListener),
HOOK_VIRTUAL_DEF(0x01D15530, World::RemoveListener),
HOOK_VIRTUAL_DEF(0x01D15570, World::GetSystem),
HOOK_VIRTUAL_DEF(0x01D15580, World::GetSerial),
HOOK_VIRTUAL_DEF(0x01D17380, World::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D17370, World::GetType),
HOOK_VIRTUAL_DEF(0x01D15590, World::GetName),
HOOK_VIRTUAL_DEF(0x01D155C0, World::GetState),
HOOK_VIRTUAL_DEF(0x01D15620, World::GetVersion),
HOOK_VIRTUAL_DEF(0x01D14F70, World::ShutDown),
HOOK_VIRTUAL_DEF(0x01D175D0, World::GetTime),
HOOK_VIRTUAL_DEF(0x01D186A0, World::GetGameServerAddress),
HOOK_VIRTUAL_DEF(0x01D186B0, World::GetLevelName),
HOOK_VIRTUAL_DEF(0x01D186F0, World::GetGameDir),
HOOK_VIRTUAL_DEF(0x01D16470, World::GetFrameByTime),
HOOK_VIRTUAL_DEF(0x01D16420, World::GetFrameBySeqNr),
HOOK_VIRTUAL_DEF(0x01D16450, World::GetLastFrame),
HOOK_VIRTUAL_DEF(0x01D16460, World::GetFirstFrame),
HOOK_VIRTUAL_DEF(0x01D18700, World::GetServerCount),
HOOK_VIRTUAL_DEF(0x01D18670, World::GetSlotNumber),
HOOK_VIRTUAL_DEF(0x01D18710, World::GetMaxClients),
HOOK_VIRTUAL_DEF(0x01D15840, World::GetNumPlayers),
HOOK_VIRTUAL_DEF(0x01D186C0, World::GetWorldModel),
HOOK_VIRTUAL_DEF(0x01D18350, World::GetServerInfoString),
HOOK_VIRTUAL_DEF(0x01D18360, World::GetPlayerInfoString),
HOOK_VIRTUAL_DEF(0x01D15450, World::GetUserMsg),
HOOK_VIRTUAL_DEF(0x01D15A60, World::GetHostName),
HOOK_VIRTUAL_DEF(0x01D189A0, World::GetServerInfo),
HOOK_VIRTUAL_DEF(0x01D15510, World::IsPlayerIndex),
HOOK_VIRTUAL_DEF(0x01D18660, World::IsVoiceEnabled),
HOOK_VIRTUAL_DEF(0x01D15870, World::IsActive),
HOOK_VIRTUAL_DEF(0x01D18190, World::IsPaused),
HOOK_VIRTUAL_DEF(0x01D181A0, World::IsComplete),
HOOK_VIRTUAL_DEF(0x01D18D20, World::IsHLTV),
HOOK_VIRTUAL_DEF(0x01D15010, World::Reset),
HOOK_VIRTUAL_DEF(0x01D158A0, World::SetServerInfoString),
HOOK_VIRTUAL_DEF(0x01D18C30, World::UpdateServerInfo),
HOOK_VIRTUAL_DEF(0x01D18150, World::SetPaused),
HOOK_VIRTUAL_DEF(0x01D15630, World::SetTime),
HOOK_VIRTUAL_DEF(0x01D181B0, World::SetBufferSize),
HOOK_VIRTUAL_DEF(0x01D18690, World::SetVoiceEnabled),
HOOK_VIRTUAL_DEF(0x01D18130, World::SetMoveVars),
HOOK_VIRTUAL_DEF(0x01D18320, World::SetCDInfo),
HOOK_VIRTUAL_DEF(0x01D18D10, World::SetHLTV),
HOOK_VIRTUAL_DEF(0x01D183B0, World::SetExtraInfo),
HOOK_VIRTUAL_DEF(0x01D18680, World::SetViewEntity),
HOOK_VIRTUAL_DEF(0x01D18340, World::SetGameServerAddress),
HOOK_VIRTUAL_DEF(0x01D15680, World::SetHostName),
HOOK_VIRTUAL_DEF(0x01D15760, World::NewGame),
HOOK_VIRTUAL_DEF(0x01D17490, World::FinishGame),
HOOK_VIRTUAL_DEF(0x01D18720, World::SaveAsDemo),
HOOK_VIRTUAL_DEF(0x01D174C0, World::StopGame),
HOOK_VIRTUAL_DEF(0x01D17560, World::FindUserMsgByName),
HOOK_VIRTUAL_DEF(0x01D181F0, World::ParseDeltaDescription),
HOOK_VIRTUAL_DEF(0x01D18420, World::ParseBaseline),
HOOK_VIRTUAL_DEF(0x01D183F0, World::ParseEvent),
HOOK_VIRTUAL_DEF(0x01D16990, World::ParseClientData),
HOOK_VIRTUAL_DEF(0x01D18070, World::SetServerInfo, void(int, CRC32_t, unsigned char *, int, int, int, char *, char *, char *)),
HOOK_VIRTUAL_DEF(0x01D17470, World::SetServerInfo, void(serverinfo_t *)),
HOOK_VIRTUAL_DEF(0x01D16740, World::GetUncompressedFrame, bool(unsigned int, frame_t *)),
HOOK_VIRTUAL_DEF(0x01D17A60, World::UncompressEntitiesFromStream, bool(frame_t *, BitBuffer *)),
HOOK_VIRTUAL_DEF(0x01D175E0, World::UncompressEntitiesFromStream, bool(frame_t *, BitBuffer *, unsigned int)),
HOOK_VIRTUAL_DEF(0x01D167F0, World::GetClientData, bool(frame_t *, clientdata_t *)),
HOOK_VIRTUAL_DEF(0x01D167B0, World::GetClientData, bool(unsigned int, clientdata_t *)),
HOOK_VIRTUAL_DEF(0x01D160A0, World::AddFrame),
HOOK_VIRTUAL_DEF(0x01D153B0, World::AddResource),
HOOK_VIRTUAL_DEF(0x01D156E0, World::AddLightStyle),
HOOK_VIRTUAL_DEF(0x01D17520, World::AddSignonData),
HOOK_VIRTUAL_DEF(0x01D15130, World::AddUserMessage),
HOOK_VIRTUAL_DEF(0x01D154A0, World::AddBaselineEntity),
HOOK_VIRTUAL_DEF(0x01D155D0, World::AddInstancedBaselineEntity),
HOOK_VIRTUAL_DEF(0x01D151F0, World::UpdatePlayer),
HOOK_VIRTUAL_DEF(0x01D164C0, World::WriteFrame),
HOOK_VIRTUAL_DEF(0x01D17CB0, World::WriteNewData),
HOOK_VIRTUAL_DEF(0x01D16030, World::WriteClientUpdate),
HOOK_VIRTUAL_DEF(0x01D15D20, World::WriteMovevars),
HOOK_VIRTUAL_DEF(0x01D174F0, World::WriteSigonData),
HOOK_VIRTUAL_DEF(0x01D15A20, World::WriteLightStyles),
HOOK_VIRTUAL_DEF(0x01D17D80, World::RemoveFrames),
HOOK_VIRTUAL_DEF(0x01D17ED0, World::DuplicateFrames),
HOOK_VIRTUAL_DEF(0x01D17EF0, World::MoveFrames),
HOOK_VIRTUAL_DEF(0x01D17F10, World::RevertFrames),
// World non-virtual functions
HOOK_DEF(0x01D16BA0, World::CompressFrame),
HOOK_DEF(0x01D16A80, World::ParseDeltaHeader),
HOOK_DEF(0x01D150D0, World::SetMaxClients),
HOOK_DEF(0x01D17D30, World::GetBufferedGameTime),
HOOK_DEF(0x01D15800, World::ConnectionComplete),
HOOK_DEF(0x01D15F00, World::WriteResources),
HOOK_DEF(0x01D15C60, World::WriteDeltaDescriptions),
HOOK_DEF(0x01D15EB0, World::WriteRegisteredUserMessages),
HOOK_DEF(0x01D158B0, World::WriteBaseline),
HOOK_DEF(0x01D15A80, World::WriteServerinfo),
HOOK_DEF(0x01D170E0, World::WritePacketEntities),
HOOK_DEF(0x01D189B0, World::WriteDeltaEntities),
HOOK_DEF(0x01D15790, World::SetState),
HOOK_DEF(0x01D15100, World::ClearUserMessages),
HOOK_DEF(0x01D17430, World::ClearServerInfo),
HOOK_DEF(0x01D15410, World::ClearResources),
HOOK_DEF(0x01D155A0, World::ClearInstancedBaseline),
HOOK_DEF(0x01D15540, World::ClearBaseline),
HOOK_DEF(0x01D156C0, World::ClearLightStyles),
HOOK_DEF(0x01D15880, World::ClearPlayers),
HOOK_DEF(0x01D17F30, World::ClearFrames),
HOOK_DEF(0x01D16E80, World::ClearEntityCache),
HOOK_DEF(0x01D16F30, World::GetFrameFromCache),
HOOK_DEF(0x01D17010, World::GetDeltaFromCache),
HOOK_DEF(0x01D17F90, World::CheckFrameBufferSize),
HOOK_DEF(0x01D18000, World::ReorderFrameTimes),
HOOK_DEF(0x01D16D20, World::FindBestBaseline),
HOOK_DEF(0x01D18A60, World::RearrangeFrame),
HOOK_DEF(0x01D16880, World::GetUncompressedFrame, bool(frame_t *deltaFrame, frame_t *frame)),
//HOOK_DEF(0x01D17D00, World::SetName), // NOXREF
//HOOK_DEF(0x0, World::SetDirector), // NOXREF
//HOOK_DEF(0x0, World::SetTimeScale), // NOXREF
//HOOK_DEF(0x0, World::SetGameGroupAddress), // NOXREF
//HOOK_DEF(0x0, World::GetDirector), // NOXREF
//HOOK_DEF(0x0, World::WriteCustomDecals), // NOXREF
#endif // World_region
#ifndef Server_region
// IServer virtual functions
HOOK_VIRTUAL_DEF(0x01D106B0, Server::Init),
HOOK_VIRTUAL_DEF(0x01D10C10, Server::RunFrame),
HOOK_VIRTUAL_DEF(0x01D10A90, Server::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D13870, Server::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D137F0, Server::GetType),
HOOK_VIRTUAL_DEF(0x01D10B80, Server::ShutDown),
HOOK_VIRTUAL_DEF(0x01D14220, Server::Connect),
HOOK_VIRTUAL_DEF(0x01D142F0, Server::LoadDemo),
HOOK_VIRTUAL_DEF(0x01D13E40, Server::Reconnect),
HOOK_VIRTUAL_DEF(0x01D13EA0, Server::Disconnect),
HOOK_VIRTUAL_DEF(0x01D14620, Server::Retry),
HOOK_VIRTUAL_DEF(0x01D14680, Server::StopRetry),
HOOK_VIRTUAL_DEF(0x01D14430, Server::SendStringCommand),
HOOK_VIRTUAL_DEF(0x01D14470, Server::SendHLTVCommand),
HOOK_VIRTUAL_DEF(0x01D140C0, Server::IsConnected),
HOOK_VIRTUAL_DEF(0x01D140D0, Server::IsDemoFile),
HOOK_VIRTUAL_DEF(0x01D140E0, Server::IsGameServer),
HOOK_VIRTUAL_DEF(0x01D140F0, Server::IsRelayProxy),
HOOK_VIRTUAL_DEF(0x01D11260, Server::IsVoiceBlocking),
HOOK_VIRTUAL_DEF(0x01D13A70, Server::SetProxy),
HOOK_VIRTUAL_DEF(0x01D13A90, Server::SetDirector),
HOOK_VIRTUAL_DEF(0x01D137A0, Server::SetPlayerName),
HOOK_VIRTUAL_DEF(0x01D146B0, Server::SetDelayReconnect),
HOOK_VIRTUAL_DEF(0x01D14690, Server::SetAutoRetry),
HOOK_VIRTUAL_DEF(0x01D11270, Server::SetVoiceBlocking),
HOOK_VIRTUAL_DEF(0x01D11280, Server::SetRate),
HOOK_VIRTUAL_DEF(0x01D112D0, Server::SetUpdateRate),
HOOK_VIRTUAL_DEF(0x01D14390, Server::SetUserInfo),
HOOK_VIRTUAL_DEF(0x01D13770, Server::SetProtocol),
HOOK_VIRTUAL_DEF(0x01D109C0, Server::SetGameDirectory),
HOOK_VIRTUAL_DEF(0x01D13730, Server::GetRate),
HOOK_VIRTUAL_DEF(0x01D13740, Server::GetUpdateRate),
HOOK_VIRTUAL_DEF(0x01D13720, Server::GetServerInfoString),
HOOK_VIRTUAL_DEF(0x01D137D0, Server::GetPlayerName),
// Server virtual functions
HOOK_VIRTUAL_DEF(0x01D145A0, Server::GetTime),
HOOK_VIRTUAL_DEF(0x01D13800, Server::GetWorld),
HOOK_VIRTUAL_DEF(0x01D13830, Server::GetDemoFileName),
HOOK_VIRTUAL_DEF(0x01D13810, Server::GetAddress),
HOOK_VIRTUAL_DEF(0x01D13750, Server::GetAutoRetry),
HOOK_VIRTUAL_DEF(0x01D13850, Server::GetHostName),
HOOK_VIRTUAL_DEF(0x01D13860, Server::GetPacketLoss),
HOOK_VIRTUAL_DEF(0x01D13760, Server::GetProtocol),
// Server non-virtual functions
HOOK_DEF(0x01D14190, Server::CheckAutoRetry),
HOOK_DEF(0x01D145B0, Server::CheckConnection),
HOOK_DEF(0x01D141F0, Server::ScheduleAutoRetry),
HOOK_DEF(0x01D11750, Server::AcceptConnection),
HOOK_DEF(0x01D116C0, Server::AcceptBadPassword),
HOOK_DEF(0x01D11700, Server::AcceptRejection),
HOOK_DEF(0x01D117D0, Server::AcceptRedirect),
HOOK_DEF(0x01D11460, Server::SendConnectPacket),
HOOK_DEF(0x01D132F0, Server::SendServerCommands),
HOOK_DEF(0x01D11320, Server::SetState),
HOOK_DEF(0x01D10AB0, Server::Challenge),
HOOK_DEF(0x01D146C0, Server::Reset),
HOOK_DEF(0x01D11170, Server::AcceptChallenge),
HOOK_DEF(0x01D14050, Server::SendUserVar),
HOOK_DEF(0x01D10F70, Server::ProcessMessage),
HOOK_DEF(0x01D147B0, Server::ProcessEntityUpdate),
HOOK_DEF(0x01D10DA0, Server::ProcessConnectionlessMessage),
HOOK_DEF(0x01D12EF0, Server::ClearFrame),
HOOK_DEF(0x01D139E0, Server::ParseHLTV),
HOOK_DEF(0x01D13AA0, Server::ParseDirector),
HOOK_DEF(0x01D12CA0, Server::ParseFileTransferFailed),
HOOK_DEF(0x01D13B80, Server::ParseInfo),
HOOK_DEF(0x01D136E0, Server::ParseParticle),
HOOK_DEF(0x01D136B0, Server::ParseRoomType),
HOOK_DEF(0x01D13610, Server::ParseSpawnStaticSound),
HOOK_DEF(0x01D13580, Server::ParseEventReliable),
HOOK_DEF(0x01D13510, Server::ParsePings),
HOOK_DEF(0x01D12CE0, Server::ParseSignonNum),
HOOK_DEF(0x01D12FB0, Server::ParseUserMessage),
HOOK_DEF(0x01D134E0, Server::ParseStopSound),
HOOK_DEF(0x01D13410, Server::ParseEvent),
HOOK_DEF(0x01D13340, Server::ParseSound),
HOOK_DEF(0x01D13240, Server::ParseDeltaPacketEntities),
HOOK_DEF(0x01D131A0, Server::ParsePacketEntities),
HOOK_DEF(0x01D12DF0, Server::ParseCustomization),
HOOK_DEF(0x01D12010, Server::ParseCrosshairAngle),
HOOK_DEF(0x01D12050, Server::ParseSoundFade),
HOOK_DEF(0x01D12C10, Server::ParseDisconnect),
HOOK_DEF(0x01D12C00, Server::ParseChoke),
HOOK_DEF(0x01D12AC0, Server::ParseSetAngle),
HOOK_DEF(0x01D12B60, Server::ParseAddAngle),
HOOK_DEF(0x01D12A40, Server::ParseLightStyle),
HOOK_DEF(0x01D12A20, Server::ParseTime),
HOOK_DEF(0x01D129F0, Server::ParseVersion),
HOOK_DEF(0x01D129D0, Server::ParseBaseline),
HOOK_DEF(0x01D12860, Server::ParseTempEntity),
HOOK_DEF(0x01D12650, Server::ParseResourceList),
HOOK_DEF(0x01D12590, Server::ParseUpdateUserInfo),
HOOK_DEF(0x01D12150, Server::ParseStuffText),
HOOK_DEF(0x01D120C0, Server::ParseNewUserMsg),
HOOK_DEF(0x01D11F80, Server::ParseResourceRequest),
HOOK_DEF(0x01D11F00, Server::ParseSetView),
HOOK_DEF(0x01D11E90, Server::ParseCDTrack),
HOOK_DEF(0x01D11EC0, Server::ParseRestore),
HOOK_DEF(0x01D11CC0, Server::ParseMoveVars),
HOOK_DEF(0x01D11C60, Server::ParseDeltaDescription),
HOOK_DEF(0x01D119F0, Server::ParseServerinfo),
HOOK_DEF(0x01D119D0, Server::ParseBad),
HOOK_DEF(0x01D119C0, Server::ParseNop),
HOOK_DEF(0x01D11850, Server::ParsePrint),
HOOK_DEF(0x01D11880, Server::ParseVoiceInit),
HOOK_DEF(0x01D11940, Server::ParseVoiceData),
HOOK_DEF(0x01D144F0, Server::ParseTimeScale),
HOOK_DEF(0x01D144C0, Server::ParseSendExtraInfo),
HOOK_DEF(0x01D14100, Server::ParseCenterPrint),
HOOK_DEF(0x01D143D0, Server::ParseSetPause),
HOOK_DEF(0x01D14020, Server::ParseCutscene),
HOOK_DEF(0x01D12140, Server::ParseWeaponAnim),
HOOK_DEF(0x01D11C80, Server::ParseDecalName),
HOOK_DEF(0x01D13FF0, Server::ParseFinale),
HOOK_DEF(0x01D13FC0, Server::ParseIntermission),
HOOK_DEF(0x01D13F50, Server::ParseClientData),
HOOK_DEF(0x01D14570, Server::ParseResourceLocation),
HOOK_DEF(0x01D14820, Server::ParseSendCvarValue),
HOOK_DEF(0x01D14830, Server::ParseSendCvarValue2),
//HOOK_DEF(0x01D14740, Server::GetCmdName), // NOXREF
#endif // Server_region
#ifndef Network_region
// Network virtual functions
HOOK_VIRTUAL_DEF(0x01D0E040, Network::Init),
HOOK_VIRTUAL_DEF(0x01D0E480, Network::RunFrame),
HOOK_VIRTUAL_DEF(0x01D0E5B0, Network::ReceiveSignal),
HOOK_VIRTUAL_DEF(0x01D0E210, Network::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D0E5C0, Network::RegisterListener),
HOOK_VIRTUAL_DEF(0x01D0E670, Network::RemoveListener),
HOOK_VIRTUAL_DEF(0x01D0E680, Network::GetSystem),
HOOK_VIRTUAL_DEF(0x01D0E690, Network::GetSerial),
HOOK_VIRTUAL_DEF(0x01D0E4D0, Network::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D0E3B0, Network::GetType),
HOOK_VIRTUAL_DEF(0x01D0E6B0, Network::GetName),
HOOK_VIRTUAL_DEF(0x01D0E810, Network::GetState),
HOOK_VIRTUAL_DEF(0x01D0E820, Network::GetVersion),
HOOK_VIRTUAL_DEF(0x01D0E250, Network::ShutDown),
HOOK_VIRTUAL_DEF(0x01D0E2E0, Network::CreateSocket),
HOOK_VIRTUAL_DEF(0x01D0E3A0, Network::RemoveSocket),
HOOK_VIRTUAL_DEF(0x01D0E4C0, Network::GetLocalAddress),
HOOK_VIRTUAL_DEF(0x01D0E6C0, Network::ResolveAddress),
HOOK_VIRTUAL_DEF(0x01D0E530, Network::GetFlowStats),
HOOK_VIRTUAL_DEF(0x01D0E6A0, Network::GetLastErrorCode),
HOOK_VIRTUAL_DEF(0x01D0E830, Network::GetErrorText),
HOOK_VIRTUAL_DEF(0x01D0E2E0, Network::CreateSocket),
HOOK_VIRTUAL_DEF(0x01D0E3A0, Network::RemoveSocket),
HOOK_VIRTUAL_DEF(0x01D0E4C0, Network::GetLocalAddress),
HOOK_VIRTUAL_DEF(0x01D0E6C0, Network::ResolveAddress),
HOOK_VIRTUAL_DEF(0x01D0E530, Network::GetFlowStats),
HOOK_VIRTUAL_DEF(0x01D0E6A0, Network::GetLastErrorCode),
HOOK_VIRTUAL_DEF(0x01D0E830, Network::GetErrorText),
// Network non-virtual functions
HOOK_DEF(0x01D0EAE0, Network::UpdateStats),
HOOK_DEF(0x01D0E440, Network::GetSocket),
HOOK_DEF(0x01D0E400, Network::SendData),
HOOK_DEF(0x01D0E3C0, Network::ReceiveData),
#endif // Network_region
#ifndef NetSocket_region
// Network virtual functions
HOOK_VIRTUAL_DEF(0x01D0D940, NetSocket::ReceivePacket),
HOOK_VIRTUAL_DEF(0x01D0D950, NetSocket::FreePacket),
HOOK_VIRTUAL_DEF(0x01D0D980, NetSocket::AddPacket),
HOOK_VIRTUAL_DEF(0x01D0D000, NetSocket::AddChannel),
HOOK_VIRTUAL_DEF(0x01D0D010, NetSocket::RemoveChannel),
HOOK_VIRTUAL_DEF(0x01D0D310, NetSocket::GetNetwork),
HOOK_VIRTUAL_DEF(0x01D0D8D0, NetSocket::OutOfBandPrintf),
HOOK_VIRTUAL_DEF(0x01D0DA30, NetSocket::Flush),
HOOK_VIRTUAL_DEF(0x01D0D8A0, NetSocket::GetFlowStats),
HOOK_VIRTUAL_DEF(0x01D0D610, NetSocket::LeaveGroup),
HOOK_VIRTUAL_DEF(0x01D0D570, NetSocket::JoinGroup),
HOOK_VIRTUAL_DEF(0x01D0D500, NetSocket::Close),
HOOK_VIRTUAL_DEF(0x01D0DCB0, NetSocket::GetPort),
HOOK_VIRTUAL_DEF(0x01D0D160, NetSocket::SendPacket, bool(NetPacket *)),
HOOK_VIRTUAL_DEF(0x01D0D190, NetSocket::SendPacket, bool(NetAddress *, const void *, int)),
// Network non-virtual functions
HOOK_DEF(0x01D0DAC0, NetSocket::Create),
HOOK_DEF(0x01D0DCC0, NetSocket::UpdateStats),
HOOK_DEF(0x01D0D6B0, NetSocket::DrainChannels),
HOOK_DEF(0x01D0D020, NetSocket::DispatchIncoming),
HOOK_DEF(0x01D0D330, NetSocket::ReceivePacketIntern),
HOOK_DEF(0x01D0DD50, NetSocket::SendLong),
HOOK_DEF(0x01D0DE70, NetSocket::SendShort),
HOOK_DEF(0x01D0D730, NetSocket::GetLong),
#endif // NetSocket_region
#ifndef Delta_region
HOOK_DEF(0x01D06740, DELTA_Init),
HOOK_DEF(0x01D06810, DELTA_UpdateDescriptions),
HOOK_DEF(0x01D06880, DELTA_Shutdown),
HOOK_DEF(0x01D06890, DELTA_SetTime),
HOOK_DEF(0x01D068B0, DELTA_SetLargeTimeBufferSize),
HOOK_DEF(0x01D04AF0, DELTA_FindField),
HOOK_DEF(0x01D04C10, DELTA_ClearFlags),
HOOK_DEF(0x01D04C40, DELTA_CountSendFields),
HOOK_DEF(0x01D04C80, DELTA_MarkSendFields),
HOOK_DEF(0x01D04E80, DELTA_SetSendFlagBits),
HOOK_DEF(0x01D04EF0, DELTA_WriteMarkedFields),
HOOK_DEF(0x01D052A0, DELTA_WriteHeader),
HOOK_DEF(0x01D053C0, DELTA_WriteDelta),
HOOK_DEF(0x01D05470, DELTA_ParseDelta),
HOOK_DEF(0x01D05A30, DELTA_TestDelta),
HOOK_DEF(0x01D05CA0, DELTA_AddEncoder),
HOOK_DEF(0x01D05CE0, DELTA_ClearEncoders),
HOOK_DEF(0x01D05D60, DELTA_CountLinks),
HOOK_DEF(0x01D05D80, DELTA_ReverseLinks),
HOOK_DEF(0x01D05DA0, DELTA_ClearLinks),
HOOK_DEF(0x01D05DD0, DELTA_BuildFromLinks),
HOOK_DEF(0x01D05E80, DELTA_FindOffset),
HOOK_DEF(0x01D05EC0, DELTA_ParseType),
HOOK_DEF(0x01D06050, DELTA_ParseField),
HOOK_DEF(0x01D06200, DELTA_FreeDescription),
HOOK_DEF(0x01D06240, DELTA_AddDefinition),
HOOK_DEF(0x01D062A0, DELTA_ClearDefinitions),
HOOK_DEF(0x01D062E0, DELTA_FindDefinition),
HOOK_DEF(0x01D06330, DELTA_SkipDescription),
HOOK_DEF(0x01D06380, DELTA_ParseOneField),
HOOK_DEF(0x01D06640, DELTA_RegisterDescription),
HOOK_DEF(0x01D06670, DELTA_ClearRegistrations),
HOOK_DEF(0x01D066C0, DELTA_LookupRegistration),
//HOOK_DEF(0x01D06700, DELTA_ClearStats), // NOXREF
//HOOK_DEF(0x01D06430, DELTA_ParseDescription), // NOXREF
//HOOK_DEF(0x01D06630, DELTA_Load), // NOXREF
//HOOK_DEF(0x01D04B40, DELTA_FindFieldIndex), // NOXREF
//HOOK_DEF(0x01D04B90, DELTA_SetField), // NOXREF
//HOOK_DEF(0x01D04BB0, DELTA_UnsetField), // NOXREF
//HOOK_DEF(0x01D04BD0, DELTA_SetFieldByIndex), // NOXREF
//HOOK_DEF(0x01D04BF0, DELTA_UnsetFieldByIndex), // NOXREF
//HOOK_DEF(0x01D05270, DELTA_CheckDelta), // NOXREF
//HOOK_DEF(0x01D05D20, DELTA_LookupEncoder), // NOXREF
#endif // Delta_region
#ifndef ObjectDictionary_region
HOOK_DEF(0x01D0ECA0, MethodThunk<ObjectDictionary>::Constructor),
HOOK_DEF(0x01D0ECE0, MethodThunk<ObjectDictionary>::Destructor),
HOOK_VIRTUAL_DEF(0x01D0F220, ObjectDictionary::Init, void()),
HOOK_VIRTUAL_DEF(0x01D0F290, ObjectDictionary::Add, bool(void *)),
HOOK_VIRTUAL_DEF(0x01D0F050, ObjectDictionary::Remove),
HOOK_VIRTUAL_DEF(0x01D0ED10, ObjectDictionary::Clear),
HOOK_VIRTUAL_DEF(0x01D0F310, ObjectDictionary::GetFirst),
HOOK_VIRTUAL_DEF(0x01D0F5B0, ObjectDictionary::GetNext),
HOOK_VIRTUAL_DEF(0x01D0F2A0, ObjectDictionary::CountElements),
HOOK_VIRTUAL_DEF(0x01D0F2C0, ObjectDictionary::Contains),
HOOK_VIRTUAL_DEF(0x01D0F2B0, ObjectDictionary::IsEmpty),
HOOK_DEF(0x01D0F250, ObjectDictionary::Init, void(int)), // NOXREF
HOOK_DEF(0x01D0ED90, ObjectDictionary::Add, bool(void *, float)),
HOOK_DEF(0x01D0F4D0, ObjectDictionary::AddToCache, void(ObjectDictionary::entry_t *, float)),
HOOK_DEF(0x01D0F490, ObjectDictionary::AddToCache, void(ObjectDictionary::entry_t *)),
HOOK_DEF(0x01D0F340, ObjectDictionary::ChangeKey),
HOOK_DEF(0x01D0F0D0, ObjectDictionary::RemoveKey),
HOOK_DEF(0x01D0F590, ObjectDictionary::FindClosestKey),
HOOK_DEF(0x01D0F5D0, ObjectDictionary::FindExactKey),
HOOK_DEF(0x01D0F320, ObjectDictionary::GetLast),
HOOK_DEF(0x01D0F510, ObjectDictionary::FindKeyInCache),
HOOK_DEF(0x01D0F550, ObjectDictionary::FindObjectInCache),
HOOK_DEF(0x01D0EF60, ObjectDictionary::ClearCache),
HOOK_DEF(0x01D0F130, ObjectDictionary::CheckSize),
HOOK_DEF(0x01D0EF80, ObjectDictionary::RemoveIndex),
HOOK_DEF(0x01D0F010, ObjectDictionary::RemoveIndexRange),
HOOK_DEF(0x01D0EE60, ObjectDictionary::FindClosestAsIndex),
//HOOK_DEF(0x0, ObjectDictionary::RemoveRange), // NOXREF
//HOOK_DEF(0x01D0F440, ObjectDictionary::UnsafeChangeKey), // NOXREF
//HOOK_DEF(0x01D0F090, ObjectDictionary::RemoveSingle), // NOXREF
#endif // ObjectDictionary_region
#ifndef ObjectList_region
HOOK_DEF(0x01D0F610, MethodThunk<ObjectList>::Constructor),
HOOK_DEF(0x01D0F650, MethodThunk<ObjectList>::Destructor),
HOOK_VIRTUAL_DEF(0x01D0F8D0, ObjectList::Init),
HOOK_VIRTUAL_DEF(0x01D0F920, ObjectList::Add),
HOOK_VIRTUAL_DEF(0x01D0F850, ObjectList::Remove),
HOOK_VIRTUAL_DEF(0x01D0F800, ObjectList::Clear),
HOOK_VIRTUAL_DEF(0x01D0F8E0, ObjectList::GetFirst),
HOOK_VIRTUAL_DEF(0x01D0F900, ObjectList::GetNext),
HOOK_VIRTUAL_DEF(0x01D0F7C0, ObjectList::CountElements),
HOOK_VIRTUAL_DEF(0x01D0F7D0, ObjectList::Contains),
HOOK_VIRTUAL_DEF(0x01D0F7B0, ObjectList::IsEmpty),
HOOK_DEF(0x01D0F760, ObjectList::RemoveTail),
HOOK_DEF(0x01D0F6C0, ObjectList::RemoveHead),
HOOK_DEF(0x01D0F710, ObjectList::AddTail),
HOOK_DEF(0x01D0F670, ObjectList::AddHead),
#endif // ObjectList_region
#ifndef BitBuffer_region
HOOK_DEF(0x01D015A0, MethodThunk<BitBuffer>::Destructor),
HOOK_DEF(0x01D01530, (MethodThunk<BitBuffer>::Constructor), void()),
HOOK_DEF(0x01D015B0, (MethodThunk<BitBuffer, unsigned int>::Constructor), void(unsigned int)),
HOOK_DEF(0x01D01570, (MethodThunk<BitBuffer, void *, unsigned int>::Constructor), void(void *, unsigned int)),
HOOK_DEF(0x01D015E0, BitBuffer::Resize),
HOOK_DEF(0x01D01630, BitBuffer::Clear),
HOOK_DEF(0x01D01670, BitBuffer::Reset),
HOOK_DEF(0x01D01690, BitBuffer::Free),
HOOK_DEF(0x01D01840, BitBuffer::PeekBits),
HOOK_DEF(0x01D01EF0, BitBuffer::CurrentSize),
HOOK_DEF(0x01D02300, BitBuffer::FastClear),
HOOK_DEF(0x01D02350, BitBuffer::ConcatBuffer),
HOOK_DEF(0x01D02210, BitBuffer::SkipBytes),
HOOK_DEF(0x01D01660, BitBuffer::CurrentBit),
HOOK_DEF(0x01D01F10, BitBuffer::SpaceLeft),
HOOK_DEF(0x01D01F20, BitBuffer::AlignByte),
HOOK_DEF(0x01D02090, BitBuffer::StartBitMode),
HOOK_DEF(0x01D020A0, BitBuffer::EndBitMode),
HOOK_DEF(0x01D020E0, BitBuffer::SetBuffer),
HOOK_DEF(0x01D02240, BitBuffer::SkipBits),
HOOK_DEF(0x01D022D0, BitBuffer::SkipString),
// Read
HOOK_DEF(0x01D016D0, BitBuffer::ReadBits),
HOOK_DEF(0x01D017B0, BitBuffer::ReadBit),
HOOK_DEF(0x01D01870, BitBuffer::ReadChar),
HOOK_DEF(0x01D01880, BitBuffer::ReadByte),
HOOK_DEF(0x01D01890, BitBuffer::ReadShort),
HOOK_DEF(0x01D018A0, BitBuffer::ReadWord),
HOOK_DEF(0x01D018B0, BitBuffer::ReadLong),
HOOK_DEF(0x01D018C0, BitBuffer::ReadFloat),
HOOK_DEF(0x01D018E0, BitBuffer::ReadBuf),
HOOK_DEF(0x01D019C0, BitBuffer::ReadString),
HOOK_DEF(0x01D01A00, BitBuffer::ReadStringLine), // NOXREF
HOOK_DEF(0x01D02020, BitBuffer::ReadBitString),
HOOK_DEF(0x01D020B0, BitBuffer::ReadBitData),
HOOK_DEF(0x01D02110, BitBuffer::ReadBitVec3Coord),
HOOK_DEF(0x01D02170, BitBuffer::ReadBitCoord),
HOOK_DEF(0x01D021F0, BitBuffer::ReadCoord),
HOOK_DEF(0x01D01A40, BitBuffer::ReadAngle), // NOXREF
HOOK_DEF(0x01D01A60, BitBuffer::ReadHiresAngle), // NOXREF
HOOK_DEF(0x01D01F40, BitBuffer::ReadSBits),
HOOK_DEF(0x01D01F70, BitBuffer::ReadBitAngle),
// Write
HOOK_DEF(0x01D01D90, BitBuffer::WriteBuf, void(const void *, int)),
HOOK_DEF(0x01D01990, BitBuffer::WriteBuf, void(BitBuffer *, int)),
HOOK_DEF(0x01D01A80, BitBuffer::WriteBit),
HOOK_DEF(0x01D01B50, BitBuffer::WriteBits),
HOOK_DEF(0x01D01C70, BitBuffer::WriteSBits),
HOOK_DEF(0x01D01CD0, BitBuffer::WriteChar),
HOOK_DEF(0x01D01CE0, BitBuffer::WriteByte),
HOOK_DEF(0x01D01CF0, BitBuffer::WriteShort),
HOOK_DEF(0x01D01D00, BitBuffer::WriteWord),
HOOK_DEF(0x01D01D10, BitBuffer::WriteLong),
HOOK_DEF(0x01D01D20, BitBuffer::WriteFloat),
HOOK_DEF(0x01D01D50, BitBuffer::WriteString),
HOOK_DEF(0x01D02370, BitBuffer::WriteCoord),
HOOK_DEF(0x01D01E60, BitBuffer::WriteBitData),
HOOK_DEF(0x01D01E90, BitBuffer::WriteAngle), // NOXREF
HOOK_DEF(0x01D01EC0, BitBuffer::WriteHiresAngle), // NOXREF
HOOK_DEF(0x01D01FB0, BitBuffer::WriteBitAngle),
HOOK_DEF(0x01D02050, BitBuffer::WriteBitString),
#endif // BitBuffer_region
{ NULL, NULL, NULL },
};
AddressRef g_FunctionRefs[] =
{
#ifndef Function_References_region
#endif // Function_References_region
{ NULL, NULL, NULL },
};
AddressRef g_DataRefs[] =
{
#ifndef Data_References_region
GLOBALVAR_LINK(0x01D45708, "_ZL6g_defs", pg_defs),
GLOBALVAR_LINK(0x01D4570C, "_ZL10g_encoders", pg_encoders),
GLOBALVAR_LINK(0x01D45710, "g_deltaregistry", pg_deltaregistry),
GLOBALVAR_LINK(0x01D456F0, "g_pplayerdelta", pg_pplayerdelta),
GLOBALVAR_LINK(0x01D456F4, "g_pentitydelta", pg_pentitydelta),
GLOBALVAR_LINK(0x01D456F8, "g_pcustomentitydelta", pg_pcustomentitydelta),
GLOBALVAR_LINK(0x01D456FC, "g_pclientdelta", pg_pclientdelta),
GLOBALVAR_LINK(0x01D45700, "g_pweapondelta", pg_pweapondelta),
GLOBALVAR_LINK(0x01D45704, "g_peventdelta", pg_peventdelta),
GLOBALVAR_LINK(0x01D456E8, "g_delta_Time", pg_delta_Time),
GLOBALVAR_LINK(0x01D456E0, "g_large_Time_Buffers", pg_large_Time_Buffers),
GLOBALVAR_LINK(0x01D46870, "g_DownloadURL", pg_DownloadURL),
GLOBALVAR_LINK(0x01D442C8, "com_token", pcom_token),
GLOBALVAR_LINK(0x01D456C8, "s_com_token_unget", ps_com_token_unget),
#endif // Data_References_region
{ NULL, NULL, NULL },
};
#endif // HOOK_HLTV

View File

@ -1,18 +0,0 @@
#pragma once
#ifdef HOOK_HLTV
#include "hookers/memory.h"
#include "hookers/helper.h"
#include "hookers/hooker.h"
#define rehlds_syserror HLTV_SysError
#define com_token (*pcom_token)
#define s_com_token_unget (*ps_com_token_unget)
#define g_DownloadURL (*pg_DownloadURL)
extern char com_token[COM_TOKEN_LEN];
extern qboolean s_com_token_unget;
#endif // HOOK_HLTV

View File

@ -1,102 +0,0 @@
#include "precompiled.h"
#if defined(HOOK_HLTV)
#define ORIGINAL_CORE_DLL_NAME "core2.dll"
CSysModule *g_pOriginalCoreModule = NULL;
CreateInterfaceFn g_OriginalCoreFactory = NULL;
ISystemModule *g_pOriginalServer = NULL;
ISystemModule *g_pOriginalWorld = NULL;
ISystemModule *g_pOriginalNetwork = NULL;
IBaseInterface *CreateCoreInterface()
{
if (g_pOriginalServer) {
return g_pOriginalServer;
}
if (g_pOriginalCoreModule)
{
g_OriginalCoreFactory = Sys_GetFactory(g_pOriginalCoreModule);
if (g_OriginalCoreFactory)
{
int returnCode = 0;
g_pOriginalServer = reinterpret_cast<ISystemModule *>(g_OriginalCoreFactory(SERVER_INTERFACE_VERSION, &returnCode));
return g_pOriginalServer;
}
}
return NULL;
}
IBaseInterface *CreateWorldInterface()
{
if (g_pOriginalWorld) {
return g_pOriginalWorld;
}
if (g_pOriginalCoreModule)
{
g_OriginalCoreFactory = Sys_GetFactory(g_pOriginalCoreModule);
if (g_OriginalCoreFactory)
{
int returnCode = 0;
g_pOriginalWorld = reinterpret_cast<ISystemModule *>(g_OriginalCoreFactory(WORLD_INTERFACE_VERSION, &returnCode));
return g_pOriginalWorld;
}
}
return NULL;
}
IBaseInterface *CreateNetworkInterface()
{
if (g_pOriginalNetwork) {
return g_pOriginalNetwork;
}
if (g_pOriginalCoreModule)
{
g_OriginalCoreFactory = Sys_GetFactory(g_pOriginalCoreModule);
if (g_OriginalCoreFactory)
{
int returnCode = 0;
g_pOriginalNetwork = reinterpret_cast<ISystemModule *>(g_OriginalCoreFactory(NETWORK_INTERFACE_VERSION, &returnCode));
return g_pOriginalNetwork;
}
}
return NULL;
}
InterfaceReg iface_Server = InterfaceReg(CreateCoreInterface, SERVER_INTERFACE_VERSION);
InterfaceReg iface_World = InterfaceReg(CreateWorldInterface, WORLD_INTERFACE_VERSION);
InterfaceReg iface_Network= InterfaceReg(CreateNetworkInterface, NETWORK_INTERFACE_VERSION);
// DLL entry point
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
g_pOriginalCoreModule = Sys_LoadModule(ORIGINAL_CORE_DLL_NAME);
size_t addr = (size_t)Sys_GetProcAddress(ORIGINAL_CORE_DLL_NAME, CREATEINTERFACE_PROCNAME);
HookModule("hltv.exe", addr);
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
if (g_pOriginalCoreModule)
{
Sys_UnloadModule(g_pOriginalCoreModule);
g_pOriginalCoreModule = NULL;
g_OriginalCoreFactory = NULL;
g_pOriginalServer = NULL;
g_pOriginalWorld = NULL;
g_pOriginalNetwork = NULL;
}
}
return TRUE;
}
#endif // #if defined(HOOK_HLTV)

View File

@ -1,152 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#include "precompiled.h"
// Hooks stuff
#include "hookers/memory.cpp"
#include "hookers/hooker.cpp"
//#define Mem_region
//#define Function_References_region
//#define Data_References_region
FunctionHook g_FunctionHooks[] =
{
// DO NOT DISABLE, other functions depends on memory allocation routines
#ifndef Mem_region
HOOK_DEF(0x01D07C0F, malloc_wrapper),
HOOK_DEF(0x01D07AFE, free_wrapper),
HOOK_DEF(0x01D14F4D, strdup_wrapper),
HOOK_DEF(0x01D07C21, __nh_malloc_wrapper),
HOOK_DEF(0x01D02510, Mem_ZeroMalloc),
//HOOK_DEF(0x0, Mem_Malloc),
//HOOK_DEF(0x0, Mem_Realloc),
//HOOK_DEF(0x0, Mem_Calloc),
//HOOK_DEF(0x0, Mem_Strdup),
//HOOK_DEF(0x0, Mem_Free),
//HOOK_DEF(0x0, realloc_wrapper),
//HOOK_DEF(0x0, calloc_wrapper),
#endif // Mem_region
#ifndef DemoPlayer_Region
// BaseSystemModule virtual function
//HOOK_VIRTUAL_DEF(0x01D032A0, DemoPlayer::RegisterListener),
//HOOK_VIRTUAL_DEF(0x01D03360, DemoPlayer::RemoveListener),
//HOOK_VIRTUAL_DEF(0x1D033700, DemoPlayer::GetSystem),
//HOOK_VIRTUAL_DEF(0x01D03380, DemoPlayer::GetSerial),
//HOOK_VIRTUAL_DEF(0x01D03390, DemoPlayer::GetName),
//HOOK_VIRTUAL_DEF(0x01D033A0, DemoPlayer::GetState),
//HOOK_VIRTUAL_DEF(0x01D033F0, DemoPlayer::GetVersion),
// DemoPlayer virtual function
HOOK_VIRTUAL_DEF(0x01D03670, DemoPlayer::Init),
HOOK_VIRTUAL_DEF(0x01D04180, DemoPlayer::RunFrame),
HOOK_VIRTUAL_DEF(0x01D042E0, DemoPlayer::ReceiveSignal),
HOOK_VIRTUAL_DEF(0x01D02FA0, DemoPlayer::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D02F70, DemoPlayer::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D02F60, DemoPlayer::GetType),
HOOK_VIRTUAL_DEF(0x01D04490, DemoPlayer::ShutDown),
HOOK_VIRTUAL_DEF(0x01D04400, DemoPlayer::NewGame),
HOOK_VIRTUAL_DEF(0x01D03410, DemoPlayer::GetModName),
HOOK_VIRTUAL_DEF(0x01D03420, DemoPlayer::WriteCommands),
HOOK_VIRTUAL_DEF(0x01D03570, DemoPlayer::AddCommand),
HOOK_VIRTUAL_DEF(0x01D035F0, DemoPlayer::RemoveCommand),
HOOK_VIRTUAL_DEF(0x01D04640, DemoPlayer::GetLastCommand),
HOOK_VIRTUAL_DEF(0x01D03660, DemoPlayer::GetCommands),
HOOK_VIRTUAL_DEF(0x01D03900, DemoPlayer::SetWorldTime),
HOOK_VIRTUAL_DEF(0x01D03940, DemoPlayer::SetTimeScale),
HOOK_VIRTUAL_DEF(0x01D039B0, DemoPlayer::SetPaused),
HOOK_VIRTUAL_DEF(0x01D039C0, DemoPlayer::SetEditMode),
HOOK_VIRTUAL_DEF(0x01D03A20, DemoPlayer::SetMasterMode),
HOOK_VIRTUAL_DEF(0x01D03A40, DemoPlayer::IsPaused),
HOOK_VIRTUAL_DEF(0x01D02F30, DemoPlayer::IsLoading),
HOOK_VIRTUAL_DEF(0x01D02F50, DemoPlayer::IsActive),
HOOK_VIRTUAL_DEF(0x01D039D0, DemoPlayer::IsEditMode),
HOOK_VIRTUAL_DEF(0x01D03A30, DemoPlayer::IsMasterMode),
HOOK_VIRTUAL_DEF(0x01D04560, DemoPlayer::RemoveFrames),
HOOK_VIRTUAL_DEF(0x01D04570, DemoPlayer::ExecuteDirectorCmd),
HOOK_VIRTUAL_DEF(0x01D02ED0, DemoPlayer::GetWorldTime),
HOOK_VIRTUAL_DEF(0x01D02EE0, DemoPlayer::GetStartTime),
HOOK_VIRTUAL_DEF(0x01D02F00, DemoPlayer::GetEndTime),
HOOK_VIRTUAL_DEF(0x01D03400, DemoPlayer::GetTimeScale),
HOOK_VIRTUAL_DEF(0x01D02F80, DemoPlayer::GetWorld),
HOOK_VIRTUAL_DEF(0x01D04630, DemoPlayer::GetFileName),
HOOK_VIRTUAL_DEF(0x01D02E60, DemoPlayer::SaveGame),
HOOK_VIRTUAL_DEF(0x01D04650, DemoPlayer::LoadGame),
HOOK_VIRTUAL_DEF(0x01D039E0, DemoPlayer::Stop),
HOOK_VIRTUAL_DEF(0x01D03A10, DemoPlayer::ForceHLTV),
HOOK_VIRTUAL_DEF(0x01D03A50, DemoPlayer::GetDemoViewInfo),
HOOK_VIRTUAL_DEF(0x01D03F90, DemoPlayer::ReadDemoMessage),
HOOK_VIRTUAL_DEF(0x01D04130, DemoPlayer::ReadNetchanState),
HOOK_VIRTUAL_DEF(0x01D02F90, DemoPlayer::GetDirector), // NOXREF
// DemoPlayer non-virtual function
//HOOK_DEF(0x01D02F20, DemoPlayer::GetPlayerTime), // NOXREF
//HOOK_DEF(0x01D04500, DemoPlayer::FormatTime), // NOXREF
HOOK_DEF(0x01D041B0, DemoPlayer::RunClocks),
HOOK_DEF(0x01D046F0, DemoPlayer::WriteDatagram),
HOOK_DEF(0x01D03D30, DemoPlayer::WriteSpawn),
HOOK_DEF(0x01D03F50, DemoPlayer::ReindexCommands),
HOOK_DEF(0x01D03DC0, DemoPlayer::WriteCameraPath),
HOOK_DEF(0x01D04840, DemoPlayer::ExecuteDemoFileCommands),
HOOK_DEF(0x01D03030, DemoPlayer::CMD_Jump),
HOOK_DEF(0x01D030E0, DemoPlayer::CMD_ForceHLTV),
HOOK_DEF(0x01D031F0, DemoPlayer::CMD_Pause),
HOOK_DEF(0x01D032B0, DemoPlayer::CMD_Speed),
HOOK_DEF(0x01D033B0, DemoPlayer::CMD_Start),
HOOK_DEF(0x01D03170, DemoPlayer::CMD_Save),
#endif // DemoPlayer_Region
{ NULL, NULL, NULL },
};
AddressRef g_FunctionRefs[] =
{
#ifndef Function_References_region
#endif // Function_References_region
{ NULL, NULL, NULL },
};
AddressRef g_DataRefs[] =
{
#ifndef Data_References_region
#endif // Data_References_region
{ NULL, NULL, NULL },
};

View File

@ -1,11 +0,0 @@
#pragma once
#ifdef HOOK_HLTV
#include "hookers/memory.h"
#include "hookers/helper.h"
#include "hookers/hooker.h"
#define rehlds_syserror HLTV_SysError
#endif // HOOK_HLTV

View File

@ -1,55 +0,0 @@
#include "precompiled.h"
#if defined(HOOK_HLTV)
#define ORIGINAL_DEMOPLAYER_DLL_NAME "DemoPlayer2.dll"
CSysModule *g_pOriginalDemoPlayerModule = NULL;
CreateInterfaceFn g_OriginalDemoPlayerFactory = NULL;
ISystemModule *g_pOriginalDemoPlayer = NULL;
IBaseInterface *CreateDemoPlayerInterface()
{
if (g_pOriginalDemoPlayer) {
return g_pOriginalDemoPlayer;
}
if (g_pOriginalDemoPlayerModule)
{
g_OriginalDemoPlayerFactory = Sys_GetFactory(g_pOriginalDemoPlayerModule);
if (g_OriginalDemoPlayerFactory)
{
int returnCode = 0;
g_pOriginalDemoPlayer = reinterpret_cast<ISystemModule *>(g_OriginalDemoPlayerFactory(DEMOPLAYER_INTERFACE_VERSION, &returnCode));
return g_pOriginalDemoPlayer;
}
}
return NULL;
}
InterfaceReg iface = InterfaceReg(CreateDemoPlayerInterface, DEMOPLAYER_INTERFACE_VERSION);
// DLL entry point
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
g_pOriginalDemoPlayerModule = Sys_LoadModule(ORIGINAL_DEMOPLAYER_DLL_NAME);
size_t addr = (size_t)Sys_GetProcAddress(ORIGINAL_DEMOPLAYER_DLL_NAME, CREATEINTERFACE_PROCNAME);
HookModule("hltv.exe", addr);
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
if (g_pOriginalDemoPlayerModule)
{
Sys_UnloadModule(g_pOriginalDemoPlayerModule);
g_pOriginalDemoPlayerModule = NULL;
g_OriginalDemoPlayerFactory = NULL;
g_pOriginalDemoPlayer = NULL;
}
}
return TRUE;
}
#endif // #if defined(HOOK_HLTV)

View File

@ -1,649 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#include "precompiled.h"
#ifdef HOOK_HLTV
// Hooks stuff
#include "hookers/memory.cpp"
#include "hookers/hooker.cpp"
//#define Mem_region
//#define Proxy_region
//#define BaseClient_region
//#define ProxyClient_region
//#define FakeClient_region
//#define DemoFile_region
//#define DemoClient_region
//#define Director_region
//#define DirectorCmd_region
//#define Status_region
//#define InfoString_region
//#define BitBuffer_region
//#define NetChannel_region
//#define Master_region
//#define Function_References_region
//#define Data_References_region
FunctionHook g_FunctionHooks[] =
{
// DO NOT DISABLE, other functions depends on memory allocation routines
#ifndef Mem_region
HOOK_DEF(0x01D20F3F, malloc_wrapper),
HOOK_DEF(0x01D20E2E, free_wrapper),
HOOK_DEF(0x01D3078C, strdup_wrapper),
HOOK_DEF(0x01D20F51, __nh_malloc_wrapper),
HOOK_DEF(0x01D03EF0, Mem_ZeroMalloc),
//HOOK_DEF(0x0, Mem_Malloc),
//HOOK_DEF(0x0, Mem_Realloc),
//HOOK_DEF(0x0, Mem_Calloc),
//HOOK_DEF(0x0, Mem_Strdup),
//HOOK_DEF(0x0, Mem_Free),
//HOOK_DEF(0x0, realloc_wrapper),
//HOOK_DEF(0x0, calloc_wrapper),
#endif // Mem_region
#ifndef Proxy_region
// virtual functions - BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D16010, Proxy::Init),
HOOK_VIRTUAL_DEF(0x01D16020, Proxy::RunFrame),
HOOK_VIRTUAL_DEF(0x01D16030, Proxy::ReceiveSignal),
HOOK_VIRTUAL_DEF(0x01D16040, Proxy::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D16090, Proxy::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D160A0, Proxy::GetType),
HOOK_VIRTUAL_DEF(0x01D160E0, Proxy::ShutDown),
// virtual functions - Proxy
HOOK_VIRTUAL_DEF(0x01D115D0, Proxy::Reset),
HOOK_VIRTUAL_DEF(0x01D11620, Proxy::Broadcast),
HOOK_VIRTUAL_DEF(0x01D14FE0, Proxy::IncreaseCheering),
HOOK_VIRTUAL_DEF(0x01D11600, Proxy::ParseStatusMsg),
HOOK_VIRTUAL_DEF(0x01D11610, Proxy::ParseStatusReport),
HOOK_VIRTUAL_DEF(0x01D12FF0, Proxy::ProcessConnectionlessMessage),
HOOK_VIRTUAL_DEF(0x01D14780, Proxy::ChatCommentator),
HOOK_VIRTUAL_DEF(0x01D137B0, Proxy::ChatSpectator),
HOOK_VIRTUAL_DEF(0x01D11370, Proxy::CountLocalClients),
HOOK_VIRTUAL_DEF(0x01D143B0, Proxy::AddResource),
HOOK_VIRTUAL_DEF(0x01D11570, Proxy::IsLanOnly),
HOOK_VIRTUAL_DEF(0x01D13A00, Proxy::IsMaster),
HOOK_VIRTUAL_DEF(0x01D11580, Proxy::IsActive),
HOOK_VIRTUAL_DEF(0x01D114F0, Proxy::IsPublicGame),
HOOK_VIRTUAL_DEF(0x01D11500, Proxy::IsPasswordProtected),
HOOK_VIRTUAL_DEF(0x01D11510, Proxy::IsStressed),
HOOK_VIRTUAL_DEF(0x01D154A0, Proxy::SetDelay),
HOOK_VIRTUAL_DEF(0x01D15540, Proxy::SetClientTime),
HOOK_VIRTUAL_DEF(0x01D15580, Proxy::SetClientTimeScale),
HOOK_VIRTUAL_DEF(0x01D15430, Proxy::SetMaxRate),
HOOK_VIRTUAL_DEF(0x01D118D0, Proxy::SetMaxLoss),
HOOK_VIRTUAL_DEF(0x01D15470, Proxy::SetMaxUpdateRate),
HOOK_VIRTUAL_DEF(0x01D11870, Proxy::SetMaxClients),
HOOK_VIRTUAL_DEF(0x01D11930, Proxy::SetRegion),
HOOK_VIRTUAL_DEF(0x01D14FA0, Proxy::GetDelay),
HOOK_VIRTUAL_DEF(0x01D14FC0, Proxy::GetSpectatorTime),
HOOK_VIRTUAL_DEF(0x01D14FD0, Proxy::GetProxyTime),
HOOK_VIRTUAL_DEF(0x01D11920, Proxy::GetMaxClients),
HOOK_VIRTUAL_DEF(0x01D10EF0, Proxy::GetWorld),
HOOK_VIRTUAL_DEF(0x01D10F00, Proxy::GetServer),
HOOK_VIRTUAL_DEF(0x01D10F10, Proxy::GetDirector),
HOOK_VIRTUAL_DEF(0x01D10F20, Proxy::GetSocket),
HOOK_VIRTUAL_DEF(0x01D10F30, Proxy::GetChatMode),
HOOK_VIRTUAL_DEF(0x01D113C0, Proxy::GetStatistics),
HOOK_VIRTUAL_DEF(0x01D113D0, Proxy::GetMaxRate),
HOOK_VIRTUAL_DEF(0x01D113E0, Proxy::GetMaxUpdateRate),
HOOK_VIRTUAL_DEF(0x01D14420, Proxy::GetResource),
HOOK_VIRTUAL_DEF(0x01D11550, Proxy::GetDispatchMode),
HOOK_VIRTUAL_DEF(0x01D115A0, Proxy::GetRegion),
HOOK_VIRTUAL_DEF(0x01D10EE0, Proxy::GetClients),
HOOK_VIRTUAL_DEF(0x01D113F0, Proxy::WriteSignonData),
// non-virtual functions - Proxy
HOOK_DEF(0x01D12BD0, Proxy::ReplyServiceChallenge),
HOOK_DEF(0x01D115B0, Proxy::ReplyListen),
HOOK_DEF(0x01D10900, Proxy::ReplyConnect),
HOOK_DEF(0x01D10890, Proxy::ReplyRules),
HOOK_DEF(0x01D10820, Proxy::ReplyPlayers),
HOOK_DEF(0x01D10770, Proxy::ReplyInfo),
HOOK_DEF(0x01D10720, Proxy::ReplyInfoString),
HOOK_DEF(0x01D106D0, Proxy::ReplyChallenge),
HOOK_DEF(0x01D105F0, Proxy::ReplyPing),
HOOK_DEF(0x01D12F50, Proxy::ExecuteRcon),
HOOK_DEF(0x01D13B70, Proxy::ReconnectClients),
HOOK_DEF(0x01D129A0, Proxy::SendRcon),
HOOK_DEF(0x01D10DD0, Proxy::RejectConnection),
HOOK_DEF(0x01D10F40, Proxy::UpdateStatusLine),
HOOK_DEF(0x01D14220, Proxy::DispatchClient),
HOOK_DEF(0x01D13FA0, Proxy::IsValidPassword),
HOOK_DEF(0x01D13E50, Proxy::WriteHUDMsg),
HOOK_DEF(0x01D150D0, Proxy::ExecuteLoopCommands),
HOOK_DEF(0x01D12A30, Proxy::GetChallengeNumber),
HOOK_DEF(0x01D12B60, Proxy::CheckChallenge),
HOOK_DEF(0x01D15150, Proxy::CreateServerInfoString),
HOOK_DEF(0x01D13A10, Proxy::CheckDirectorModule),
HOOK_DEF(0x01D158B0, Proxy::RunClocks),
HOOK_DEF(0x01D156B0, Proxy::NewGameStarted),
HOOK_DEF(0x01D12CC0, Proxy::NewServerConnection),
HOOK_DEF(0x01D15620, Proxy::BroadcastPaused),
HOOK_DEF(0x01D12E80, Proxy::BroadcastRetryMessage),
HOOK_DEF(0x01D12EE0, Proxy::StopBroadcast),
HOOK_DEF(0x01D15A10, Proxy::DisconnectClients),
HOOK_DEF(0x01D14350, Proxy::FreeResource),
HOOK_DEF(0x01D14380, Proxy::ClearResources),
HOOK_DEF(0x01D142C0, Proxy::LoadResourceFromFile),
HOOK_DEF(0x01D14800, Proxy::IsBanned),
HOOK_DEF(0x01D15A60, Proxy::UpdateInfoMessages),
HOOK_DEF(0x01D12860, Proxy::CMD_Rcon),
HOOK_DEF(0x01D11EF0, Proxy::CMD_ServerCmd),
HOOK_DEF(0x01D11F90, Proxy::CMD_ClientCmd),
HOOK_DEF(0x01D127D0, Proxy::CMD_RconPassword),
HOOK_DEF(0x01D12700, Proxy::CMD_RconAddress),
HOOK_DEF(0x01D11700, Proxy::CMD_Say),
HOOK_DEF(0x01D11C10, Proxy::CMD_Msg),
HOOK_DEF(0x01D10D40, Proxy::CMD_Clients),
HOOK_DEF(0x01D13920, Proxy::CMD_Kick),
HOOK_DEF(0x01D13650, Proxy::CMD_ChatMode),
HOOK_DEF(0x01D13DA0, Proxy::CMD_PublicGame),
HOOK_DEF(0x01D13BB0, Proxy::CMD_OffLineText),
HOOK_DEF(0x01D14550, Proxy::CMD_AdminPassword),
HOOK_DEF(0x01D14470, Proxy::CMD_SignOnCommands),
HOOK_DEF(0x01D13EE0, Proxy::CMD_SpectatorPassword),
HOOK_DEF(0x01D140B0, Proxy::CMD_DispatchMode),
HOOK_DEF(0x01D14F00, Proxy::CMD_CheeringThreshold),
HOOK_DEF(0x01D10610, Proxy::CMD_Ping),
HOOK_DEF(0x01D12C00, Proxy::CMD_ProxyPassword),
HOOK_DEF(0x01D11E50, Proxy::CMD_MaxRate),
HOOK_DEF(0x01D12570, Proxy::CMD_LoopCmd),
HOOK_DEF(0x01D117C0, Proxy::CMD_MaxClients),
HOOK_DEF(0x01D14610, Proxy::CMD_LocalMsg),
HOOK_DEF(0x01D11A50, Proxy::CMD_Connect),
HOOK_DEF(0x01D139F0, Proxy::CMD_Disconnect),
HOOK_DEF(0x01D14180, Proxy::CMD_PlayDemo),
HOOK_DEF(0x01D11940, Proxy::CMD_Delay),
HOOK_DEF(0x01D119E0, Proxy::CMD_Stop),
HOOK_DEF(0x01D12480, Proxy::CMD_Record),
HOOK_DEF(0x01D12530, Proxy::CMD_StopRecording),
HOOK_DEF(0x01D123C0, Proxy::CMD_BlockVoice),
HOOK_DEF(0x01D11B20, Proxy::CMD_Name),
HOOK_DEF(0x01D120B0, Proxy::CMD_Rate),
HOOK_DEF(0x01D12300, Proxy::CMD_Updaterate),
HOOK_DEF(0x01D12220, Proxy::CMD_HostName),
HOOK_DEF(0x01D13CC0, Proxy::CMD_AddResource),
HOOK_DEF(0x01D13C60, Proxy::CMD_Resources),
HOOK_DEF(0x01D14DD0, Proxy::CMD_BannerFile),
HOOK_DEF(0x01D14AF0, Proxy::CMD_Bann),
HOOK_DEF(0x01D14850, Proxy::CMD_AddFakeClients),
HOOK_DEF(0x01D14CD0, Proxy::CMD_Retry),
HOOK_DEF(0x01D14D00, Proxy::CMD_AutoRetry),
HOOK_DEF(0x01D14C40, Proxy::CMD_ServerPassword),
HOOK_DEF(0x01D11040, Proxy::CMD_Status),
HOOK_DEF(0x01D13710, Proxy::CMD_MaxQueries),
HOOK_DEF(0x01D12170, Proxy::CMD_Players),
HOOK_DEF(0x01D14C00, Proxy::CMD_ClearBanns),
HOOK_DEF(0x01D149B0, Proxy::CMD_MaxLoss),
HOOK_DEF(0x01D11D80, Proxy::CMD_Protocol),
HOOK_DEF(0x01D14A50, Proxy::CMD_Region),
//HOOK_DEF(0x01D12E70, Proxy::GetModVersion), // NOXREF
//HOOK_DEF(0x0, Proxy::CMD_InformPlayers), // NOXREF
//HOOK_DEF(0x0, Proxy::CMD_MaxUpdateRate), // NOXREF
#endif // Proxy_region
#ifndef ProxyClient_region
// BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D16C50, ProxyClient::Init),
HOOK_VIRTUAL_DEF(0x01D16D20, ProxyClient::ShutDown),
// BaseClient
HOOK_VIRTUAL_DEF(0x01D16A40, ProxyClient::HasChatEnabled),
HOOK_VIRTUAL_DEF(0x01D16B30, ProxyClient::DownloadFile),
HOOK_VIRTUAL_DEF(0x01D16920, ProxyClient::SendDatagram),
HOOK_VIRTUAL_DEF(0x01D168E0, ProxyClient::ReplySpawn),
HOOK_VIRTUAL_DEF(0x01D16770, ProxyClient::UpdateUserInfo),
HOOK_VIRTUAL_DEF(0x01D16A50, ProxyClient::ParseVoiceData),
HOOK_VIRTUAL_DEF(0x01D16310, ProxyClient::ProcessStringCmd),
HOOK_VIRTUAL_DEF(0x01D16850, ProxyClient::ParseHLTV),
#endif // ProxyClient_region
#ifndef FakeClient_region
// BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D09300, FakeClient::Init),
HOOK_VIRTUAL_DEF(0x01D09310, FakeClient::RunFrame),
HOOK_VIRTUAL_DEF(0x01D09320, FakeClient::ReceiveSignal),
HOOK_VIRTUAL_DEF(0x01D09380, FakeClient::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D09390, FakeClient::GetType),
HOOK_VIRTUAL_DEF(0x01D093D0, FakeClient::ShutDown),
// FakeClient
HOOK_DEF(0x01D08EA0, FakeClient::SetRate),
HOOK_DEF(0x01D08EB0, FakeClient::Connect),
HOOK_DEF(0x01D08EE0, FakeClient::Retry), // NOXREF
HOOK_DEF(0x01D08EF0, FakeClient::Say), // NOXREF
HOOK_DEF(0x01D08F50, FakeClient::Disconnect), // NOXREF
#endif // FakeClient_region
#ifndef BaseClient_region
// IClient
HOOK_VIRTUAL_DEF(0x01D01670, BaseClient::Connect),
HOOK_VIRTUAL_DEF(0x01D02790, BaseClient::Send),
HOOK_VIRTUAL_DEF(0x01D01830, BaseClient::Disconnect),
HOOK_VIRTUAL_DEF(0x01D023F0, BaseClient::Reconnect),
HOOK_VIRTUAL_DEF(0x01D023C0, BaseClient::SetWorld),
HOOK_VIRTUAL_DEF(0x01D027D0, BaseClient::GetClientType),
HOOK_VIRTUAL_DEF(0x01D01810, BaseClient::GetClientName),
HOOK_VIRTUAL_DEF(0x01D01820, BaseClient::GetUserInfo),
HOOK_VIRTUAL_DEF(0x01D027C0, BaseClient::GetAddress),
HOOK_VIRTUAL_DEF(0x01D02420, BaseClient::IsActive),
HOOK_VIRTUAL_DEF(0x01D026F0, BaseClient::IsHearingVoices),
HOOK_VIRTUAL_DEF(0x01D02730, BaseClient::HasChatEnabled),
HOOK_VIRTUAL_DEF(0x01D02760, BaseClient::DownloadFailed),
HOOK_VIRTUAL_DEF(0x01D02740, BaseClient::DownloadFile),
HOOK_VIRTUAL_DEF(0x01D025C0, BaseClient::UpdateVoiceMask),
HOOK_VIRTUAL_DEF(0x01D02580, BaseClient::QueryVoiceEnabled),
HOOK_VIRTUAL_DEF(0x01D02470, BaseClient::SetName),
HOOK_VIRTUAL_DEF(0x01D02100, BaseClient::WriteSpawn),
HOOK_VIRTUAL_DEF(0x01D02180, BaseClient::WriteDatagram),
HOOK_VIRTUAL_DEF(0x01D027F0, BaseClient::SendDatagram),
HOOK_VIRTUAL_DEF(0x01D02820, BaseClient::Reset),
HOOK_VIRTUAL_DEF(0x01D02020, BaseClient::SetState),
HOOK_VIRTUAL_DEF(0x01D01F20, BaseClient::ReplyNew),
HOOK_VIRTUAL_DEF(0x01D01E50, BaseClient::ReplySpawn),
HOOK_VIRTUAL_DEF(0x01D01F90, BaseClient::ReplyFullUpdate),
HOOK_VIRTUAL_DEF(0x01D01E10, BaseClient::PrintfToClient),
HOOK_VIRTUAL_DEF(0x01D01D00, BaseClient::UpdateUserInfo),
HOOK_VIRTUAL_DEF(0x01D01900, BaseClient::ParseStringCmd),
HOOK_VIRTUAL_DEF(0x01D018C0, BaseClient::ParseNop),
HOOK_VIRTUAL_DEF(0x01D018D0, BaseClient::ParseBad),
HOOK_VIRTUAL_DEF(0x01D02450, BaseClient::ParseMove),
HOOK_VIRTUAL_DEF(0x01D02430, BaseClient::ParseVoiceData),
HOOK_VIRTUAL_DEF(0x01D02530, BaseClient::ParseHLTV),
HOOK_VIRTUAL_DEF(0x01D022E0, BaseClient::ParseDelta),
HOOK_VIRTUAL_DEF(0x01D02540, BaseClient::ParseCvarValue),
HOOK_VIRTUAL_DEF(0x01D02550, BaseClient::ParseCvarValue2),
HOOK_VIRTUAL_DEF(0x01D01740, BaseClient::ProcessMessage),
HOOK_VIRTUAL_DEF(0x01D01920, BaseClient::ProcessStringCmd),
// BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D02950, BaseClient::Init),
HOOK_VIRTUAL_DEF(0x01D02960, BaseClient::RunFrame),
HOOK_VIRTUAL_DEF(0x01D02330, BaseClient::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D16CE0, BaseClient::GetType),
HOOK_VIRTUAL_DEF(0x01D02A20, BaseClient::ShutDown),
#endif // BaseClient_region
#ifndef BitBuffer_region
HOOK_DEF(0x01D02F80, MethodThunk<BitBuffer>::Destructor),
HOOK_DEF(0x01D02F10, (MethodThunk<BitBuffer>::Constructor), void()),
HOOK_DEF(0x01D02F90, (MethodThunk<BitBuffer, unsigned int>::Constructor), void(unsigned int)),
HOOK_DEF(0x01D02F50, (MethodThunk<BitBuffer, void *, unsigned int>::Constructor), void(void *, unsigned int)),
HOOK_DEF(0x01D02FC0, BitBuffer::Resize),
HOOK_DEF(0x01D03010, BitBuffer::Clear),
HOOK_DEF(0x01D03050, BitBuffer::Reset),
HOOK_DEF(0x01D03070, BitBuffer::Free),
HOOK_DEF(0x01D03220, BitBuffer::PeekBits),
HOOK_DEF(0x01D038D0, BitBuffer::CurrentSize),
HOOK_DEF(0x01D03CE0, BitBuffer::FastClear),
HOOK_DEF(0x01D03D30, BitBuffer::ConcatBuffer),
HOOK_DEF(0x01D03BF0, BitBuffer::SkipBytes),
HOOK_DEF(0x01D03040, BitBuffer::CurrentBit), // NOXREF
HOOK_DEF(0x01D038F0, BitBuffer::SpaceLeft), // NOXREF
HOOK_DEF(0x01D03900, BitBuffer::AlignByte), // NOXREF
HOOK_DEF(0x01D03A70, BitBuffer::StartBitMode), // NOXREF
HOOK_DEF(0x01D03A80, BitBuffer::EndBitMode), // NOXREF
HOOK_DEF(0x01D03AC0, BitBuffer::SetBuffer), // NOXREF
HOOK_DEF(0x01D03C20, BitBuffer::SkipBits), // NOXREF
HOOK_DEF(0x01D03CB0, BitBuffer::SkipString), // NOXREF
// Read
HOOK_DEF(0x01D030B0, BitBuffer::ReadBits),
HOOK_DEF(0x01D03190, BitBuffer::ReadBit),
HOOK_DEF(0x01D03250, BitBuffer::ReadChar),
HOOK_DEF(0x01D03260, BitBuffer::ReadByte),
HOOK_DEF(0x01D03270, BitBuffer::ReadShort),
HOOK_DEF(0x01D03280, BitBuffer::ReadWord),
HOOK_DEF(0x01D03290, BitBuffer::ReadLong),
HOOK_DEF(0x01D032A0, BitBuffer::ReadFloat),
HOOK_DEF(0x01D032C0, BitBuffer::ReadBuf),
HOOK_DEF(0x01D033A0, BitBuffer::ReadString),
HOOK_DEF(0x01D033E0, BitBuffer::ReadStringLine),
HOOK_DEF(0x01D03A00, BitBuffer::ReadBitString),
HOOK_DEF(0x01D03A90, BitBuffer::ReadBitData),
HOOK_DEF(0x01D03AF0, BitBuffer::ReadBitVec3Coord),
HOOK_DEF(0x01D03B50, BitBuffer::ReadBitCoord),
HOOK_DEF(0x01D03BD0, BitBuffer::ReadCoord),
HOOK_DEF(0x01D03420, BitBuffer::ReadAngle), // NOXREF
HOOK_DEF(0x01D03440, BitBuffer::ReadHiresAngle), // NOXREF
HOOK_DEF(0x01D03920, BitBuffer::ReadSBits), // NOXREF
HOOK_DEF(0x01D03950, BitBuffer::ReadBitAngle), // NOXREF
// Write
HOOK_DEF(0x01D03770, BitBuffer::WriteBuf, void(const void *, int)),
HOOK_DEF(0x01D03370, BitBuffer::WriteBuf, void(BitBuffer *, int)),
HOOK_DEF(0x01D03460, BitBuffer::WriteBit),
HOOK_DEF(0x01D03530, BitBuffer::WriteBits),
HOOK_DEF(0x01D03650, BitBuffer::WriteSBits), // NOXREF
HOOK_DEF(0x01D036B0, BitBuffer::WriteChar),
HOOK_DEF(0x01D036C0, BitBuffer::WriteByte),
HOOK_DEF(0x01D036D0, BitBuffer::WriteShort),
HOOK_DEF(0x01D036E0, BitBuffer::WriteWord),
HOOK_DEF(0x01D036F0, BitBuffer::WriteLong),
HOOK_DEF(0x01D03700, BitBuffer::WriteFloat),
HOOK_DEF(0x01D03730, BitBuffer::WriteString),
HOOK_DEF(0x01D03D50, BitBuffer::WriteCoord),
HOOK_DEF(0x01D03840, BitBuffer::WriteBitData), // NOXREF
HOOK_DEF(0x01D03870, BitBuffer::WriteAngle), // NOXREF
HOOK_DEF(0x01D038A0, BitBuffer::WriteHiresAngle), // NOXREF
HOOK_DEF(0x01D03990, BitBuffer::WriteBitAngle), // NOXREF
HOOK_DEF(0x01D03A30, BitBuffer::WriteBitString), // NOXREF
#endif // BitBuffer_region
#ifndef NetChannel_region
// virtual functions
HOOK_VIRTUAL_DEF(0x01D0C7E0, NetChannel::Create),
HOOK_VIRTUAL_DEF(0x01D0DC20, NetChannel::GetTargetAddress),
HOOK_VIRTUAL_DEF(0x01D0C8C0, NetChannel::Close),
HOOK_VIRTUAL_DEF(0x01D0C6E0, NetChannel::Clear),
HOOK_VIRTUAL_DEF(0x01D0C650, NetChannel::Reset),
HOOK_VIRTUAL_DEF(0x01D0DC40, NetChannel::IsConnected),
HOOK_VIRTUAL_DEF(0x01D0C8F0, NetChannel::IsReadyToSend),
HOOK_VIRTUAL_DEF(0x01D0DD60, NetChannel::IsCrashed),
HOOK_VIRTUAL_DEF(0x01D0DC70, NetChannel::IsTimedOut),
HOOK_VIRTUAL_DEF(0x01D0DC30, NetChannel::IsFakeChannel),
HOOK_VIRTUAL_DEF(0x01D0DC10, NetChannel::KeepAlive),
HOOK_VIRTUAL_DEF(0x01D0DB90, NetChannel::SetRate),
HOOK_VIRTUAL_DEF(0x01D0D9F0, NetChannel::SetUpdateRate),
HOOK_VIRTUAL_DEF(0x01D0DC50, NetChannel::SetTimeOut),
HOOK_VIRTUAL_DEF(0x01D0DC00, NetChannel::SetKeepAlive),
HOOK_VIRTUAL_DEF(0x01D0DCB0, NetChannel::GetIdleTime),
HOOK_VIRTUAL_DEF(0x01D0DCC0, NetChannel::GetRate),
HOOK_VIRTUAL_DEF(0x01D0DCD0, NetChannel::GetUpdateRate),
HOOK_VIRTUAL_DEF(0x01D0DCE0, NetChannel::GetLoss),
HOOK_VIRTUAL_DEF(0x01D0C9E0, NetChannel::TransmitOutgoing),
HOOK_VIRTUAL_DEF(0x01D0D130, NetChannel::ProcessIncoming),
HOOK_VIRTUAL_DEF(0x01D0DCF0, NetChannel::FakeAcknowledgement),
HOOK_VIRTUAL_DEF(0x01D0C480, NetChannel::OutOfBandPrintf),
// non-virtual functions
HOOK_DEF(0x01D0C400, NetChannel::UnlinkFragment),
HOOK_DEF(0x01D0C530, NetChannel::ClearFragbufs),
HOOK_DEF(0x01D0C560, NetChannel::ClearFragments),
HOOK_DEF(0x01D0C5D0, NetChannel::FlushIncoming),
HOOK_DEF(0x01D0C910, NetChannel::UpdateFlow),
HOOK_DEF(0x01D0D030, NetChannel::FindBufferById),
HOOK_DEF(0x01D0D090, NetChannel::CheckForCompletion),
HOOK_DEF(0x01D0D620, NetChannel::FragSend),
HOOK_DEF(0x01D0D670, NetChannel::AddBufferToList),
HOOK_DEF(0x01D0D6C0, NetChannel::CreateFragmentsFromBuffer),
HOOK_DEF(0x01D0DD20, NetChannel::CreateFragmentsFromFile),
HOOK_DEF(0x01D0D970, NetChannel::AddFragbufToTail),
HOOK_DEF(0x01D0D9B0, NetChannel::GetPacket),
HOOK_DEF(0x01D0D9C0, NetChannel::FreePacket),
HOOK_DEF(0x01D0DA30, NetChannel::CopyNormalFragments),
HOOK_DEF(0x01D0DBD0, NetChannel::GetFlowStats),
HOOK_DEF(0x01D0DBC0, NetChannel::SetConnected), // NOXREF
HOOK_DEF(0x01D0DD70, NetChannel::CopyFileFragments), // NOXREF
#endif // NetChannel_region
#ifndef Master_region
// virtual functions
HOOK_VIRTUAL_DEF(0x01D0A480, Master::Init),
HOOK_VIRTUAL_DEF(0x01D0A490, Master::RunFrame),
HOOK_VIRTUAL_DEF(0x01D0A4B0, Master::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D0A500, Master::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D0A510, Master::GetType),
HOOK_VIRTUAL_DEF(0x01D0A550, Master::ShutDown),
//HOOK_DEF(0x0, Master::InitializeSteam), // NOXREF
HOOK_DEF(0x01D0A230, Master::CMD_Heartbeat),
HOOK_DEF(0x01D0A260, Master::CMD_NoMaster),
HOOK_DEF(0x01D0A350, Master::CMD_ListMaster),
HOOK_DEF(0x01D0A3E0, Master::SendShutdown),
#endif // Master_region
#ifndef DemoFile_region
HOOK_DEF(0x01D04F60, MethodThunk<DemoFile>::Destructor),
HOOK_DEF(0x01D04F10, MethodThunk<DemoFile>::Constructor),
HOOK_DEF(0x01D06380, DemoFile::Init),
HOOK_DEF(0x01D059D0, DemoFile::LoadDemo),
HOOK_DEF(0x01D05D30, DemoFile::StopPlayBack),
HOOK_DEF(0x01D056B0, DemoFile::StartRecording),
HOOK_DEF(0x01D04FC0, DemoFile::CloseFile),
HOOK_DEF(0x01D04F70, DemoFile::Reset),
HOOK_DEF(0x01D06370, DemoFile::SetContinuous), // NOXREF
HOOK_DEF(0x01D06360, DemoFile::IsContinuous), // NOXREF
HOOK_DEF(0x01D059C0, DemoFile::IsPlaying),
HOOK_DEF(0x01D04FB0, DemoFile::IsRecording),
HOOK_DEF(0x01D06350, DemoFile::GetFileName),
HOOK_DEF(0x01D05D60, DemoFile::ReadDemoPacket),
HOOK_DEF(0x01D053B0, DemoFile::WriteDemoMessage),
HOOK_DEF(0x01D05500, DemoFile::WriteUpdateClientData),
HOOK_DEF(0x01D055B0, DemoFile::GetDemoTime),
HOOK_DEF(0x01D06260, DemoFile::ReadSequenceInfo),
HOOK_DEF(0x01D06220, DemoFile::ReadDemoInfo),
HOOK_DEF(0x01D052B0, DemoFile::WriteDemoStartup),
HOOK_DEF(0x01D051C0, DemoFile::WriteSequenceInfo),
HOOK_DEF(0x01D05190, DemoFile::WriteDemoInfo),
HOOK_DEF(0x01D055D0, DemoFile::WriteSignonData),
#endif // DemoFile_region
#ifndef DemoClient_region
// BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D04E30, DemoClient::Init),
HOOK_VIRTUAL_DEF(0x01D04E40, DemoClient::RunFrame),
HOOK_VIRTUAL_DEF(0x01D04EB0, DemoClient::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D04EC0, DemoClient::GetType),
HOOK_VIRTUAL_DEF(0x01D04F00, DemoClient::ShutDown),
// IClient
HOOK_VIRTUAL_DEF(0x01D04810, DemoClient::Connect),
HOOK_VIRTUAL_DEF(0x01D04D30, DemoClient::Send),
HOOK_VIRTUAL_DEF(0x01D04BE0, DemoClient::Disconnect),
HOOK_VIRTUAL_DEF(0x01D04800, DemoClient::Reconnect),
HOOK_VIRTUAL_DEF(0x01D04D90, DemoClient::SetWorld),
HOOK_VIRTUAL_DEF(0x01D047F0, DemoClient::GetClientType),
HOOK_VIRTUAL_DEF(0x01D04D60, DemoClient::GetClientName),
HOOK_VIRTUAL_DEF(0x01D04D70, DemoClient::GetUserInfo),
HOOK_VIRTUAL_DEF(0x01D04CE0, DemoClient::GetAddress),
HOOK_VIRTUAL_DEF(0x01D04BD0, DemoClient::IsActive),
HOOK_VIRTUAL_DEF(0x01D047C0, DemoClient::IsHearingVoices),
HOOK_VIRTUAL_DEF(0x01D047D0, DemoClient::HasChatEnabled),
HOOK_DEF(0x01D04990, DemoClient::SendDatagram),
HOOK_DEF(0x01D04A30, DemoClient::WriteDatagram),
HOOK_DEF(0x01D04C70, DemoClient::FinishDemo),
HOOK_DEF(0x01D04D80, DemoClient::SetProxy),
HOOK_DEF(0x01D04DA0, DemoClient::SetFileName),
HOOK_DEF(0x01D04DD0, DemoClient::GetDemoFile),
#endif // DemoClient_region
#ifndef Director_region
// BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D07BC0, Director::Init),
HOOK_VIRTUAL_DEF(0x01D07BD0, Director::RunFrame),
HOOK_VIRTUAL_DEF(0x01D07BE0, Director::ReceiveSignal),
HOOK_VIRTUAL_DEF(0x01D07BF0, Director::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D07C40, Director::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D07C50, Director::GetType),
HOOK_VIRTUAL_DEF(0x01D07C90, Director::ShutDown),
// IDirector
HOOK_VIRTUAL_DEF(0x01D068C0, Director::NewGame),
HOOK_VIRTUAL_DEF(0x01D068B0, Director::GetModName),
HOOK_VIRTUAL_DEF(0x01D06E10, Director::WriteCommands),
HOOK_VIRTUAL_DEF(0x01D07A60, Director::AddCommand),
HOOK_VIRTUAL_DEF(0x01D07B50, Director::RemoveCommand),
HOOK_VIRTUAL_DEF(0x01D07B60, Director::GetLastCommand),
HOOK_VIRTUAL_DEF(0x01D07B40, Director::GetCommands),
// Director
HOOK_DEF(0x01D07910, Director::FindBestEvent),
HOOK_DEF(0x01D07690, Director::ExecuteDirectorCommands),
HOOK_DEF(0x01D07420, Director::RandomizeCommand),
HOOK_DEF(0x01D07280, Director::GetClosestPlayer),
HOOK_DEF(0x01D06EC0, Director::AddEvent),
HOOK_DEF(0x01D06B50, Director::SmoothRank),
HOOK_DEF(0x01D06C40, Director::AnalysePlayer),
HOOK_DEF(0x01D06980, Director::AnalyseFrame),
HOOK_DEF(0x01D073E0, Director::ClearDirectorCommands),
HOOK_DEF(0x01D07110, Director::AddBestMODCut),
HOOK_DEF(0x01D06F00, Director::AddBestGenericCut),
HOOK_DEF(0x01D06EA0, Director::WriteSignonData),
//HOOK_DEF(0x0, Director::WriteProxyStatus), // NOXREF
HOOK_DEF(0x01D07830, Director::CMD_SlowMotion),
#endif // Director_region
#ifndef DirectorCmd_region
HOOK_DEF(0x01D07D00, DirectorCmd::GetEventData),
HOOK_DEF(0x01D07D50, DirectorCmd::GetModeData),
HOOK_DEF(0x01D07D80, DirectorCmd::GetChaseData),
HOOK_DEF(0x01D07DD0, DirectorCmd::GetInEyeData),
HOOK_DEF(0x01D07E00, DirectorCmd::GetMapData),
HOOK_DEF(0x01D07E50, DirectorCmd::GetCameraData),
HOOK_DEF(0x01D07EE0, DirectorCmd::GetCamPathData),
HOOK_DEF(0x01D07F70, DirectorCmd::GetSoundData),
HOOK_DEF(0x01D07FB0, DirectorCmd::GetTime), // NOXREF
HOOK_DEF(0x01D07FC0, DirectorCmd::GetType),
HOOK_DEF(0x01D07FD0, DirectorCmd::GetName), // NOXREF
HOOK_DEF(0x01D07FE0, DirectorCmd::GetTimeScaleData),
HOOK_DEF(0x01D08010, DirectorCmd::GetWayPointsData),
HOOK_DEF(0x01D08040, DirectorCmd::GetMessageData),
HOOK_DEF(0x01D080E0, DirectorCmd::GetStatusData),
HOOK_DEF(0x01D08130, DirectorCmd::GetBannerData),
HOOK_DEF(0x01D08170, DirectorCmd::GetStuffTextData),
HOOK_DEF(0x01D081B0, DirectorCmd::SetEventData),
HOOK_DEF(0x01D081F0, DirectorCmd::SetChaseData), // NOXREF
HOOK_DEF(0x01D08240, DirectorCmd::SetInEyeData), // NOXREF
HOOK_DEF(0x01D08270, DirectorCmd::SetMapData), // NOXREF
HOOK_DEF(0x01D082B0, DirectorCmd::SetStartData), // NOXREF
HOOK_DEF(0x01D082C0, DirectorCmd::SetModeData), // NOXREF
HOOK_DEF(0x01D082F0, DirectorCmd::SetCameraData), // NOXREF
HOOK_DEF(0x01D08370, DirectorCmd::SetCamPathData), // NOXREF
HOOK_DEF(0x01D083F0, DirectorCmd::SetSoundData),
HOOK_DEF(0x01D08440, DirectorCmd::SetTimeScaleData),
HOOK_DEF(0x01D08470, DirectorCmd::SetTime),
HOOK_DEF(0x01D08480, DirectorCmd::SetMessageData),
HOOK_DEF(0x01D08520, DirectorCmd::Copy), // NOXREF
HOOK_DEF(0x01D08570, DirectorCmd::SetStatusData),
HOOK_DEF(0x01D085B0, DirectorCmd::SetBannerData),
HOOK_DEF(0x01D085F0, DirectorCmd::SetStuffTextData), // NOXREF
HOOK_DEF(0x01D08630, DirectorCmd::SetWayPoints), // NOXREF
HOOK_DEF(0x01D08660, DirectorCmd::ReadFromStream), // NOXREF
HOOK_DEF(0x01D088C0, DirectorCmd::WriteToStream),
HOOK_DEF(0x01D08920, DirectorCmd::ToString), // NOXREF
HOOK_DEF(0x01D08D50, DirectorCmd::FromString), // NOXREF
HOOK_DEF(0x01D08D60, DirectorCmd::Clear),
HOOK_DEF(0x01D08D70, DirectorCmd::Resize),
#endif // DirectorCmd_region
#ifndef Status_region
// BaseSystemModule
HOOK_VIRTUAL_DEF(0x01D178A0, Status::Init),
HOOK_VIRTUAL_DEF(0x01D178B0, Status::RunFrame),
HOOK_VIRTUAL_DEF(0x01D178D0, Status::ExecuteCommand),
HOOK_VIRTUAL_DEF(0x01D17920, Status::GetStatusLine),
HOOK_VIRTUAL_DEF(0x01D17930, Status::GetType),
HOOK_VIRTUAL_DEF(0x01D17970, Status::ShutDown),
#endif // Status_region
#ifndef InfoString_region
HOOK_DEF(0x01D09590, MethodThunk<InfoString>::Destructor),
HOOK_DEF(0x01D094F0, (MethodThunk<InfoString>::Constructor), void()),
HOOK_DEF(0x01D09510, (MethodThunk<InfoString, unsigned int>::Constructor), void(unsigned int)),
HOOK_DEF(0x01D09540, (MethodThunk<InfoString, char *>::Constructor), void(char *)),
HOOK_DEF(0x01D09480, (MethodThunk<InfoString, char *, unsigned int>::Constructor), void(char *, unsigned int)),
HOOK_DEF(0x01D095B0, InfoString::SetString),
HOOK_DEF(0x01D09600, InfoString::SetMaxSize),
HOOK_DEF(0x01D09660, InfoString::GetMaxSize),
HOOK_DEF(0x01D09670, InfoString::GetCurrentSize),
HOOK_DEF(0x01D09690, InfoString::Clear),
HOOK_DEF(0x01D096B0, InfoString::GetString),
HOOK_DEF(0x01D096C0, InfoString::ValueForKey),
HOOK_DEF(0x01D097B0, InfoString::RemoveKey),
HOOK_DEF(0x01D09880, InfoString::RemovePrefixedKeys),
HOOK_DEF(0x01D09900, InfoString::SetValueForStarKey),
HOOK_DEF(0x01D09AB0, InfoString::SetValueForKey),
#endif // InfoString_region
{ NULL, NULL, NULL },
};
AddressRef g_FunctionRefs[] =
{
#ifndef Function_References_region
#endif // Function_References_region
{ NULL, NULL, NULL },
};
AddressRef g_DataRefs[] =
{
#ifndef Data_References_region
#endif // Data_References_region
{ NULL, NULL, NULL },
};
#endif // HOOK_HLTV

View File

@ -1,11 +0,0 @@
#pragma once
#ifdef HOOK_HLTV
#include "hookers/memory.h"
#include "hookers/helper.h"
#include "hookers/hooker.h"
#define rehlds_syserror HLTV_SysError
#endif // HOOK_HLTV

View File

@ -1,55 +0,0 @@
#include "precompiled.h"
#if defined(HOOK_HLTV)
#define ORIGINAL_PROXY_DLL_NAME "proxy2.dll"
CSysModule *g_pOriginalProxyModule = NULL;
CreateInterfaceFn g_OriginalProxyFactory = NULL;
ISystemModule *g_pOriginalProxy = NULL;
IBaseInterface *CreateProxyInterface()
{
if (g_pOriginalProxy) {
return g_pOriginalProxy;
}
if (g_pOriginalProxyModule)
{
g_OriginalProxyFactory = Sys_GetFactory(g_pOriginalProxyModule);
if (g_OriginalProxyFactory)
{
int returnCode = 0;
g_pOriginalProxy = reinterpret_cast<ISystemModule *>(g_OriginalProxyFactory(PROXY_INTERFACE_VERSION, &returnCode));
return g_pOriginalProxy;
}
}
return NULL;
}
InterfaceReg iface = InterfaceReg(CreateProxyInterface, PROXY_INTERFACE_VERSION);
// DLL entry point
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
g_pOriginalProxyModule = Sys_LoadModule(ORIGINAL_PROXY_DLL_NAME);
size_t addr = (size_t)Sys_GetProcAddress(ORIGINAL_PROXY_DLL_NAME, CREATEINTERFACE_PROCNAME);
HookModule("hltv.exe", addr);
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
if (g_pOriginalProxyModule)
{
Sys_UnloadModule(g_pOriginalProxyModule);
g_pOriginalProxyModule = NULL;
g_OriginalProxyFactory = NULL;
g_pOriginalProxy = NULL;
}
}
return TRUE;
}
#endif // #if defined(HOOK_HLTV)

View File

@ -1,182 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#include "precompiled.h"
// Hooks stuff
#include "hookers/memory.cpp"
#include "hookers/hooker.cpp"
//#define Mem_region
//#define BaseFileSystem_region
//#define CUtlSymbol_Region
//#define Function_References_region
//#define Data_References_region
FunctionHook g_FunctionHooks[] =
{
// DO NOT DISABLE, other functions depends on memory allocation routines
#ifndef Mem_region
#ifdef _WIN32
HOOK_SYMBOLDEF(0x01D06F5E, "_malloca", malloc_wrapper),
HOOK_SYMBOLDEF(0x01D067CA, "_free", free_wrapper),
HOOK_SYMBOLDEF(0x01D07098, "realloc", realloc_wrapper),
HOOK_SYMBOLDEF(0x01D06F70, "__nh_malloc", __nh_malloc_wrapper),
#endif //_WIN32
#endif // Mem_region
#ifndef BaseFileSystem_region
HOOK_DEF(0x01D01080, MethodThunk<CFileSystem_Stdio>::Destructor),
HOOK_DEF(0x01D01010, (MethodThunk<CFileSystem_Stdio>::Constructor)),
// virtual functions - CFileSystem_Stdio
HOOK_VIRTUAL_DEF(0x01D05340, CFileSystem_Stdio::Mount),
HOOK_VIRTUAL_DEF(0x01D011C0, CFileSystem_Stdio::Unmount),
HOOK_VIRTUAL_DEF(0x01D05510, CFileSystem_Stdio::GetLocalCopy),
HOOK_VIRTUAL_DEF(0x01D05520, CFileSystem_Stdio::LogLevelLoadStarted),
HOOK_VIRTUAL_DEF(0x01D05530, CFileSystem_Stdio::LogLevelLoadFinished),
HOOK_VIRTUAL_DEF(0x01D05540, CFileSystem_Stdio::HintResourceNeed),
HOOK_VIRTUAL_DEF(0x01D05550, CFileSystem_Stdio::PauseResourcePreloading),
HOOK_VIRTUAL_DEF(0x01D05560, CFileSystem_Stdio::ResumeResourcePreloading),
HOOK_VIRTUAL_DEF(0x01D05570, CFileSystem_Stdio::SetVBuf),
HOOK_VIRTUAL_DEF(0x01D055B0, CFileSystem_Stdio::GetInterfaceVersion),
HOOK_VIRTUAL_DEF(0x01D055D0, CFileSystem_Stdio::WaitForResources),
HOOK_VIRTUAL_DEF(0x01D055E0, CFileSystem_Stdio::GetWaitForResourcesProgress),
HOOK_VIRTUAL_DEF(0x01D05600, CFileSystem_Stdio::CancelWaitForResources),
HOOK_VIRTUAL_DEF(0x01D05610, CFileSystem_Stdio::IsAppReadyForOfflinePlay),
// virtual functions - BaseFileSystem
HOOK_SYMBOL_VIRTUAL_EX(0x01D01AF0, CFileSystem_Stdio, Open),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01CC0, CFileSystem_Stdio, OpenFromCacheForRead),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01D50, CFileSystem_Stdio, Close),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01DD0, CFileSystem_Stdio, Seek),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01EA0, CFileSystem_Stdio, Tell),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01EF0, CFileSystem_Stdio, Size, size_t (FileHandle_t)),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01F30, CFileSystem_Stdio, Size, size_t (const char *)),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02310, CFileSystem_Stdio, IsOk),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02370, CFileSystem_Stdio, Flush),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02150, CFileSystem_Stdio, EndOfFile),
HOOK_SYMBOL_VIRTUAL_EX(0x01D021E0, CFileSystem_Stdio, Read),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02240, CFileSystem_Stdio, Write),
HOOK_SYMBOL_VIRTUAL_EX(0x01D023B0, CFileSystem_Stdio, ReadLine),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02290, CFileSystem_Stdio, FPrintf),
HOOK_SYMBOL_VIRTUAL_EX(0x01D022F0, CFileSystem_Stdio, GetReadBuffer),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02300, CFileSystem_Stdio, ReleaseReadBuffer),
HOOK_SYMBOL_VIRTUAL_EX(0x01D012B0, CFileSystem_Stdio, GetCurrentDirectory),
HOOK_SYMBOL_VIRTUAL_EX(0x01D012B0, CFileSystem_Stdio, GetCurrentDirectory),
HOOK_SYMBOL_VIRTUAL_EX(0x01D011D0, CFileSystem_Stdio, CreateDirHierarchy),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01680, CFileSystem_Stdio, IsDirectory),
HOOK_SYMBOL_VIRTUAL_EX(0x01D024A0, CFileSystem_Stdio, GetLocalPath),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02400, CFileSystem_Stdio, RemoveFile),
HOOK_SYMBOL_VIRTUAL_EX(0x01D042B0, CFileSystem_Stdio, RemoveAllSearchPaths),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01320, CFileSystem_Stdio, AddSearchPath),
HOOK_SYMBOL_VIRTUAL_EX(0x01D014E0, CFileSystem_Stdio, RemoveSearchPath),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01AA0, CFileSystem_Stdio, FileExists),
HOOK_SYMBOL_VIRTUAL_EX(0x01D04000, CFileSystem_Stdio, GetFileTime),
HOOK_SYMBOL_VIRTUAL_EX(0x01D04060, CFileSystem_Stdio, FileTimeToString),
HOOK_SYMBOL_VIRTUAL_EX(0x01D036B0, CFileSystem_Stdio, FindFirst),
HOOK_SYMBOL_VIRTUAL_EX(0x01D03DB0, CFileSystem_Stdio, FindNext),
HOOK_SYMBOL_VIRTUAL_EX(0x01D03DF0, CFileSystem_Stdio, FindIsDirectory),
HOOK_SYMBOL_VIRTUAL_EX(0x01D03E10, CFileSystem_Stdio, FindClose),
HOOK_SYMBOL_VIRTUAL_EX(0x01D03EF0, CFileSystem_Stdio, ParseFile),
HOOK_SYMBOL_VIRTUAL_EX(0x01D04130, CFileSystem_Stdio, FullPathToRelativePath),
HOOK_SYMBOL_VIRTUAL_EX(0x01D012A0, CFileSystem_Stdio, PrintOpenedFiles),
HOOK_SYMBOL_VIRTUAL_EX(0x01D04090, CFileSystem_Stdio, SetWarningFunc),
HOOK_SYMBOL_VIRTUAL_EX(0x01D040A0, CFileSystem_Stdio, SetWarningLevel),
HOOK_SYMBOL_VIRTUAL_EX(0x01D02A20, CFileSystem_Stdio, AddPackFile),
HOOK_SYMBOL_VIRTUAL_EX(0x01D01300, CFileSystem_Stdio, AddSearchPathNoWrite),
// non-virtual functions - BaseFileSystem
HOOK_DEF(0x01D02780, CBaseFileSystem::Trace_FOpen),
HOOK_DEF(0x01D028A0, CBaseFileSystem::Trace_FClose),
HOOK_DEF(0x01D029E0, CBaseFileSystem::Trace_DumpUnclosedFiles),
HOOK_DEF(0x01D01340, CBaseFileSystem::AddSearchPathInternal),
HOOK_DEF(0x01D040B0, CBaseFileSystem::Warning),
HOOK_DEF(0x01D04350, CBaseFileSystem::FixSlashes),
HOOK_DEF(0x01D04370, CBaseFileSystem::FixPath),
//HOOK_DEF(0x01D04320, CBaseFileSystem::StripFilename), // NOXREF
HOOK_DEF(0x01D01610, CBaseFileSystem::GetWritePath),
HOOK_DEF(0x01D01790, CBaseFileSystem::FindFile),
HOOK_DEF(0x01D01F70, CBaseFileSystem::FastFindFileSize),
//HOOK_DEF(0x01D034B0, CBaseFileSystem::RemoveAllMapSearchPaths), // NOXREF
HOOK_DEF(0x01D033A0, CBaseFileSystem::AddPackFiles),
HOOK_DEF(0x01D02A40, CBaseFileSystem::AddPackFileFromPath),
HOOK_DEF(0x01D02D20, CBaseFileSystem::PreparePackFile),
HOOK_DEF(0x01D03070, CBaseFileSystem::Prepare64BitPackFile),
HOOK_DEF(0x01D03510, CBaseFileSystem::SearchPakFile),
//HOOK_DEF(0x01D039B0, CBaseFileSystem::FileInSearchPaths), // NOXREF
HOOK_DEF(0x01D03B70, CBaseFileSystem::FindNextFileHelper),
HOOK_DEF(0x01D03890, CBaseFileSystem::FindFirstHelper),
#endif // BaseFileSystem_region
#ifndef CUtlSymbol_Region
//HOOK_DEF(0x01D05AA0, MethodThunk<CUtlSymbolTable>::Destructor), // NOXREF
HOOK_DEF(0x01D05A30, (MethodThunk<CUtlSymbolTable, int, int, bool>::Constructor), void(int, int, bool)),
HOOK_DEF(0x01D05C50, CUtlSymbolTable::AddString),
HOOK_DEF(0x01D05B10, CUtlSymbolTable::Find),
HOOK_DEF(0x01D05DA0, CUtlSymbolTable::String),
//HOOK_DEF(0x0, CUtlSymbolTable::RemoveAll), // NOXREF
HOOK_DEF(0x01D05960, CUtlSymbolTable::SymLess),
HOOK_DEF(0x01D059E0, CUtlSymbolTable::SymLessi),
HOOK_DEF(0x01D05890, (MethodThunk<CUtlSymbol, const char *>::Constructor), void(const char *)),
HOOK_DEF(0x01D05830, CUtlSymbol::Initialize), // Don't touch it
HOOK_DEF(0x01D05880, CUtlSymbol::CurrTable), // Don't touch it
HOOK_DEF(0x01D058C0, CUtlSymbol::String),
//HOOK_DEF(0x01D058E0, CUtlSymbol::operator==, bool (const char *) const), // NOXREF
#endif // CUtlSymbol_Region
{ NULL, NULL, NULL },
};
AddressRef g_FunctionRefs[] =
{
#ifndef Function_References_region
#endif // Function_References_region
{ NULL, NULL, NULL },
};
AddressRef g_DataRefs[] =
{
#ifndef Data_References_region
//GLOBALVAR_LINK(0x01D1B020, "CBaseFileSystem::s_pFileSystem", CBaseFileSystem::s_pFileSystem),
GLOBALVAR_LINK(0x01D1B0B8, "g_LessCtx", pg_LessCtx),
#endif // Data_References_region
{ NULL, NULL, NULL },
};

View File

@ -1,42 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#pragma once
#ifdef HOOK_FILESYSTEM
#define rehlds_syserror FileSystem_SysError
#define g_LessCtx (*pg_LessCtx)
#include "hookers/memory.h"
#include "hookers/helper.h"
#include "hookers/hooker.h"
extern struct LessCtx_t g_LessCtx;
#endif // HOOK_FILESYSTEM

View File

@ -1,86 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#include "precompiled.h"
#if defined(HOOK_FILESYSTEM)
const char *ORIGINAL_FILESYSTEM_DLL_NAME = "filesystem_stdio2.dll";
CSysModule *g_pOriginalFileSystemModule = nullptr;
CreateInterfaceFn g_OriginalFileSystemFactory = nullptr;
IFileSystem *g_pOriginalFileSystem = nullptr;
IBaseInterface *CreateFileSystemInterface()
{
if (g_pOriginalFileSystem) {
return g_pOriginalFileSystem;
}
if (g_pOriginalFileSystemModule)
{
g_OriginalFileSystemFactory = (CreateInterfaceFn)Sys_GetFactory(g_pOriginalFileSystemModule);
if (g_OriginalFileSystemFactory)
{
int returnCode = 0;
g_pOriginalFileSystem = (IFileSystem *)g_OriginalFileSystemFactory(FILESYSTEM_INTERFACE_VERSION, &returnCode);
return g_pOriginalFileSystem;
}
}
return nullptr;
}
EXPOSE_INTERFACE_FN(CreateFileSystemInterface, IFileSystem, FILESYSTEM_INTERFACE_VERSION);
// DLL entry point
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
g_pOriginalFileSystemModule = (CSysModule *)LoadLibrary(ORIGINAL_FILESYSTEM_DLL_NAME);
size_t addr = (size_t)Sys_GetProcAddress(ORIGINAL_FILESYSTEM_DLL_NAME, CREATEINTERFACE_PROCNAME);
HookModule("hlds.exe", addr);
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
if (g_pOriginalFileSystemModule)
{
Sys_UnloadModule(g_pOriginalFileSystemModule);
g_pOriginalFileSystemModule = nullptr;
g_OriginalFileSystemFactory = nullptr;
g_pOriginalFileSystem = nullptr;
}
}
return TRUE;
}
#endif // #if defined(HOOK_FILESYSTEM)

View File

@ -1,163 +0,0 @@
#pragma once
#include <iostream>
#include <functional>
#include <string>
#include <memory>
#include <vector>
#include <array>
#include <utility>
#if defined(HOOK_HLTV) || defined(HOOK_FILESYSTEM)
#define private public
#define protected public
template <typename T, typename ... TArgs>
class MethodThunk {
public:
void Constructor(TArgs ... args) {
new(this) T(args ...);
}
void Destructor() {
(*(T *)this).~T();
}
};
namespace MsvcMethod {
namespace Detail {
using Counter = std::size_t(*)();
template <std::size_t N>
std::size_t GetIndex() {
return N;
}
template <std::size_t ... TIndices>
constexpr auto GenerateCounters_Helper(std::index_sequence<TIndices ...>) {
// There is no make_array (and/or deduction guides), so we need to explicitly define array template params
return std::array<Counter, sizeof ... (TIndices)> { &GetIndex<TIndices> ... };
}
template<std::size_t N>
auto counters = GenerateCounters_Helper(std::make_index_sequence<N>{});
struct VIndexGetter {};
struct ThisGetter {
decltype(auto) GetThis() const {
return this;
}
decltype(auto) GetThis(...) const {
return this;
}
};
template <class T>
class Singleton {
public:
static T &GetInstance() {
static T instance = {};
return instance;
}
};
// primary template
template<class>
struct is_variadic_function : std::false_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...)> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) const> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) volatile> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) const volatile> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) &> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) const &> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) volatile &> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) const volatile &> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) &&> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) const &&> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) volatile &&> : std::true_type {};
template<class R, class ... TArgs>
struct is_variadic_function<R (TArgs ..., ...) const volatile &&> : std::true_type {};
template<class T>
constexpr bool is_variadic_function_v = is_variadic_function<T>::value;
template<class T>
constexpr bool is_function_v = std::is_function<T>::value;
} // namespace Detail
static constexpr auto& counters = Detail::counters<256>;
template <typename TMethod, typename T>
std::enable_if_t<Detail::is_function_v<TMethod>, std::uintptr_t>
GetVirtualIndex(TMethod T::*method)
{
decltype(auto) pcounters = counters.data();
decltype(auto) vIndexGetter = (Detail::VIndexGetter *)&pcounters;
using VIndexGetterFunction = std::conditional_t<Detail::is_variadic_function_v<TMethod>, std::size_t (Detail::VIndexGetter::*)(...) const, std::size_t(Detail::VIndexGetter::*)() const>;
VIndexGetterFunction vIndexGetterFunction;
{
*(std::uintptr_t *)&vIndexGetterFunction = *(std::uintptr_t *)&method;
}
return (vIndexGetter->*vIndexGetterFunction)();
}
template <typename TMethod, typename T>
TMethod &declmethod(TMethod T::*method);
template <typename TMethod, typename T>
std::enable_if_t<Detail::is_function_v<TMethod>, std::uintptr_t>
GetVirtualAddress(TMethod T::*method)
{
using ThisGetterFunction = std::conditional_t<Detail::is_variadic_function_v<TMethod>, const T *(T::*)(...) const, const T *(T::*)() const>;
ThisGetterFunction thisGetterFunction = *(ThisGetterFunction *)&method;
{
decltype(auto) m = static_cast<std::conditional_t<Detail::is_variadic_function_v<TMethod>, const Detail::ThisGetter *(Detail::ThisGetter::*)(...) const, const Detail::ThisGetter *(Detail::ThisGetter::*)() const>>(&Detail::ThisGetter::GetThis);
*(std::uintptr_t *)&thisGetterFunction = *(std::uintptr_t *)&m;
}
return *(*(std::uintptr_t **)(Detail::Singleton<T>::GetInstance().*thisGetterFunction)() + GetVirtualIndex(method));
}
template <typename TMethod, typename T>
std::enable_if_t<Detail::is_function_v<TMethod>, std::uintptr_t>
GetAddress(TMethod (T::*method)) {
return (std::uintptr_t &)method;
}
template <typename TMethod>
std::enable_if_t<Detail::is_function_v<TMethod>, std::uintptr_t>
GetAddress(TMethod (*method)) {
return (std::uintptr_t &)method;
}
} // namespace MsvcMethod
#ifdef _MSC_VER
#define GLOBALVAR_LINK(offset, symbol, var, ...) { offset, #symbol, (size_t)&##var, __VA_ARGS__ }
#define HOOK_SYMBOLDEF(offset, symbol, func, ...) { offset, #symbol, MsvcMethod::GetAddress<__VA_ARGS__>(&func) }
#define HOOK_SYMBOL_VIRTUAL_DEF(offset, symbol, func, ...) { offset, #symbol, MsvcMethod::GetVirtualAddress<__VA_ARGS__>(&func) }
#define HOOK_SYMBOL_VIRTUAL_EX(offset, class, func, ...) { offset, #class#func, MsvcMethod::GetVirtualAddress<std::remove_reference<decltype(MsvcMethod::declmethod<__VA_ARGS__>(&class::func))>::type, class>(&class::func) }
#define HOOK_DEF(offset, func, ...) HOOK_SYMBOLDEF(offset, func, func, __VA_ARGS__)
#define HOOK_VIRTUAL_DEF(offset, func, ...) HOOK_SYMBOL_VIRTUAL_DEF(offset, func, func, __VA_ARGS__)
#else
#error Hooking stuff is only available using MSVC compiler.
#endif // _MSC_VER
#endif // #if defined(HOOK_HLTV) || defined(HOOK_FILESYSTEM)

View File

@ -1,207 +0,0 @@
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#include "precompiled.h"
Module g_Module = { NULL, NULL, NULL, NULL };
// Offset where module assumed be loaded to ajust hooks offsets. NULL for the Linux to trigger symbols searching.
#ifdef _WIN32
const size_t g_BaseOffset = 0x01D00000;
#else
const size_t g_BaseOffset = NULL;
#endif
void *GetOriginalFuncAddrOrDie(const char *funcName)
{
for (FunctionHook *cfh = &g_FunctionHooks[0]; cfh->symbolName; cfh++)
{
if (!strcmp(cfh->symbolName, funcName))
return (void*) cfh->originalAddress;
}
rehlds_syserror("%s: Could not find function '%s'", __func__, funcName);
}
void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def)
{
for (FunctionHook *cfh = &g_FunctionHooks[0]; cfh->symbolName; cfh++)
{
if (!strcmp(cfh->symbolName, funcName))
return (void*)cfh->originalAddress;
}
return def;
}
void *GetFuncRefAddrOrDie(const char *funcName)
{
for (AddressRef *cfh = &g_FunctionRefs[0]; cfh->symbolName; cfh++)
{
if (!strcmp(cfh->symbolName, funcName))
return (void*)cfh->originalAddress;
}
rehlds_syserror("%s: Could not find function '%s'", __func__, funcName);
}
void *GetFuncRefAddrOrDefault(const char *funcName, void *def)
{
for (AddressRef *cfh = &g_FunctionRefs[0]; cfh->symbolName; cfh++)
{
if (!strcmp(cfh->symbolName, funcName))
return (void*)cfh->originalAddress;
}
return def;
}
int HookModule(const char *pszAppName, size_t addr)
{
if (addr == NULL || !FindModuleByAddress(addr, &g_Module)) {
return (FALSE);
}
// Find all addresses
bool success = true;
AddressRef *refData = g_DataRefs;
while (refData->symbolName != NULL)
{
if (!GetAddress(&g_Module, (Address*)refData, g_BaseOffset))
{
#if _DEBUG
printf("%s: symbol not found \"%s\", symbol index: %i\n", __func__, refData->symbolName, refData->symbolIndex);
success = false;
#endif
}
refData++;
}
AddressRef *refFunc = g_FunctionRefs;
while (refFunc->symbolName != NULL)
{
if (!GetAddress(&g_Module, (Address*)refFunc, g_BaseOffset))
{
#if _DEBUG
printf("%s: symbol not found \"%s\", symbol index: %i\n", __func__, refData->symbolName, refData->symbolIndex);
success = false;
#endif
}
refFunc++;
}
FunctionHook *hookFunc = g_FunctionHooks;
while (hookFunc->handlerFunc != NULL)
{
if (!GetAddress(&g_Module, (Address*)hookFunc, g_BaseOffset))
{
#if _DEBUG
printf("%s: symbol not found \"%s\", symbol index: %i\n", __func__, refData->symbolName, refData->symbolIndex);
success = false;
#endif
}
hookFunc++;
}
if (!success)
{
#if _DEBUG
printf("%s: failed to hook module!\n", __func__);
#endif
return (FALSE);
}
refData = g_DataRefs;
while (refData->addressRef != NULL)
{
if (!FindDataRef(&g_Module, refData))
return (FALSE);
refData++;
}
refFunc = g_FunctionRefs;
while (refFunc->addressRef != NULL)
{
if (!FindDataRef(&g_Module, refFunc))
return (FALSE);
refFunc++;
}
hookFunc = g_FunctionHooks;
while (hookFunc->handlerFunc != NULL)
{
if (!HookFunction(&g_Module, hookFunc))
return (FALSE);
hookFunc++;
}
return (TRUE);
}
#ifdef _WIN32
void *malloc_wrapper(size_t size) {
return malloc(size);
}
void *realloc_wrapper(void *orig, size_t newSize) {
return realloc(orig, newSize);
}
void free_wrapper(void *mem) {
free(mem);
}
void *calloc_wrapper(size_t count, size_t size) {
return calloc(count, size);
}
void *__nh_malloc_wrapper(size_t sz, int unk) {
return malloc(sz);
}
char *strdup_wrapper(const char *s) {
return _strdup(s);
}
#endif // _WIN32
void logf(const char *fmt, ...)
{
va_list argptr;
static char string[8192];
va_start(argptr, fmt);
_vsnprintf(string, sizeof(string), fmt, argptr);
string[sizeof(string) - 1] = 0;
FILE *fl = fopen("hooker.log", "a");
fprintf(fl, "%s\n", string);
fclose(fl);
}

View File

@ -1,25 +0,0 @@
#pragma once
#include "osconfig.h"
extern int HookModule(const char *pszAppName, size_t addr);
extern void *GetOriginalFuncAddrOrDie(const char *funcName);
extern void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def);
extern void *GetFuncRefAddrOrDie(const char *funcName);
extern void *GetFuncRefAddrOrDefault(const char *funcName, void *def);
extern void logf(const char *fmt, ...);
extern FunctionHook g_FunctionHooks[];
extern AddressRef g_FunctionRefs[];
extern AddressRef g_DataRefs[];
#ifdef _WIN32
void *malloc_wrapper(size_t size);
void *realloc_wrapper(void *orig, size_t newSize);
void free_wrapper(void *mem);
void *calloc_wrapper(size_t count, size_t size);
void *__nh_malloc_wrapper(size_t sz, int unk);
char *strdup_wrapper(const char *s);
#endif // _WIN32

View File

@ -88,7 +88,6 @@
<ClCompile Include="..\engine\wad.cpp" />
<ClCompile Include="..\engine\world.cpp" />
<ClCompile Include="..\engine\zone.cpp" />
<ClCompile Include="..\hookers\memory.cpp" />
<ClCompile Include="..\public\interface.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
@ -143,6 +142,7 @@
<ClCompile Include="..\rehlds\structSizeCheck.cpp" />
<ClCompile Include="..\testsuite\anonymizer.cpp" />
<ClCompile Include="..\testsuite\funccalls.cpp" />
<ClCompile Include="..\testsuite\memory.cpp" />
<ClCompile Include="..\testsuite\player.cpp" />
<ClCompile Include="..\testsuite\recorder.cpp" />
<ClCompile Include="..\testsuite\testsuite.cpp" />
@ -366,7 +366,6 @@
<ClInclude Include="..\engine\wad.h" />
<ClInclude Include="..\engine\world.h" />
<ClInclude Include="..\engine\zone.h" />
<ClInclude Include="..\hookers\memory.h" />
<ClInclude Include="..\public\basetypes.h" />
<ClInclude Include="..\public\commonmacros.h" />
<ClInclude Include="..\public\engine_hlds_api.h" />
@ -448,26 +447,13 @@
<ClInclude Include="..\rehlds\rehlds_security.h" />
<ClInclude Include="..\testsuite\anonymizer.h" />
<ClInclude Include="..\testsuite\funccalls.h" />
<ClInclude Include="..\testsuite\memory.h" />
<ClInclude Include="..\testsuite\player.h" />
<ClInclude Include="..\testsuite\recorder.h" />
<ClInclude Include="..\testsuite\testsuite.h" />
<ClInclude Include="..\unittests\rehlds_tests_shared.h" />
<ClInclude Include="..\version\version.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\linux\appversion.sh">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</None>
<None Include="..\linux\Makefile">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\dep\bzip2\msvc\bzip2.vcxproj">
<Project>{792df067-9904-4579-99b9-46c17277ade3}</Project>
@ -589,7 +575,7 @@
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
@ -626,7 +612,7 @@
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
@ -665,7 +651,7 @@
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
@ -701,7 +687,7 @@
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
@ -736,7 +722,7 @@
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
@ -780,7 +766,7 @@
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>

View File

@ -338,8 +338,8 @@
<ClCompile Include="..\rehlds\main.cpp">
<Filter>rehlds</Filter>
</ClCompile>
<ClCompile Include="..\hookers\memory.cpp">
<Filter>rehlds</Filter>
<ClCompile Include="..\testsuite\memory.cpp">
<Filter>testsuite</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -1057,16 +1057,8 @@
<ClInclude Include="..\engine\mathlib_sse.h">
<Filter>engine</Filter>
</ClInclude>
<ClInclude Include="..\hookers\memory.h">
<Filter>rehlds</Filter>
<ClInclude Include="..\testsuite\memory.h">
<Filter>testsuite</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\linux\appversion.sh">
<Filter>linux</Filter>
</None>
<None Include="..\linux\Makefile">
<Filter>linux</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -63,13 +63,7 @@ typedef struct resourceinfo_s
typedef struct resource_s
{
#ifdef HOOK_HLTV
// NOTE HLTV: array szFileName declared on 260 cell,
// this changes necessary for compatibility hookers.
char szFileName[MAX_PATH];
#else
char szFileName[MAX_QPATH]; // File name to download/precache.
#endif // HOOK_HLTV
resourcetype_t type; // t_sound, t_skin, t_model, t_decal.
int nIndex; // For t_decals

View File

@ -14,8 +14,6 @@
#include "static_map.h"
#include "ed_strpool.h"
#include "memory.h"
#include "strtools.h"
// Valve libs stuff

View File

@ -15,4 +15,4 @@ const int TESTSUITE_PROTOCOL_VERSION_MAJOR = 0;
void TestSuite_Init(const Module* engine, const Module* executable, const AddressRef* funcRefs);
#endif
#endif