From fda9ee3fe29bac345c107aecafa57fe16905854d Mon Sep 17 00:00:00 2001 From: s1lent Date: Tue, 12 Dec 2017 18:26:02 +0700 Subject: [PATCH] Removed HOOK_ENGINE --- README.md | 4 +- msvc/ReHLDS.sln | 105 - rehlds/build.gradle | 51 +- rehlds/engine/SystemWrapper.h | 4 - rehlds/engine/cdll_int.h | 8 - rehlds/engine/cl_null.cpp | 13 - rehlds/engine/client.h | 13 - rehlds/engine/cmd.cpp | 4 +- rehlds/engine/cmd.h | 13 - rehlds/engine/cmodel.h | 11 - rehlds/engine/common.h | 36 - rehlds/engine/cvar.h | 5 - rehlds/engine/decal.h | 9 - rehlds/engine/delta.h | 6 - rehlds/engine/filesystem.cpp | 1 - rehlds/engine/filesystem_.h | 9 - rehlds/engine/filesystem_internal.h | 6 - rehlds/engine/hashpak.cpp | 21 +- rehlds/engine/hashpak.h | 6 - rehlds/engine/host.cpp | 28 - rehlds/engine/host.h | 34 - rehlds/engine/host_cmd.cpp | 83 +- rehlds/engine/host_cmd.h | 25 - rehlds/engine/ipratelimitWrapper.cpp | 15 +- rehlds/engine/ipratelimitWrapper.h | 6 - rehlds/engine/l_studio.h | 4 - rehlds/engine/mathlib_e.h | 4 - rehlds/engine/model.cpp | 2 +- rehlds/engine/model_rehlds.h | 14 - rehlds/engine/net_chan.cpp | 17 - rehlds/engine/net_chan.h | 15 - rehlds/engine/net_ws.cpp | 76 +- rehlds/engine/net_ws.h | 53 - rehlds/engine/pmove.cpp | 87 +- rehlds/engine/pmove.h | 17 +- rehlds/engine/pmovetst.h | 7 - rehlds/engine/pr_cmds.cpp | 11 - rehlds/engine/pr_cmds.h | 26 - rehlds/engine/r_studio.cpp | 16 +- rehlds/engine/server.h | 178 +- rehlds/engine/studio_rehlds.h | 24 - rehlds/engine/sv_log.cpp | 12 - rehlds/engine/sv_log.h | 4 - rehlds/engine/sv_main.cpp | 177 +- rehlds/engine/sv_phys.cpp | 16 - rehlds/engine/sv_phys.h | 11 - rehlds/engine/sv_remoteaccess.cpp | 5 - rehlds/engine/sv_remoteaccess.h | 7 +- rehlds/engine/sv_steam3.h | 5 - rehlds/engine/sv_user.cpp | 53 +- rehlds/engine/sv_user.h | 30 - rehlds/engine/sys_dll.cpp | 23 - rehlds/engine/sys_dll.h | 49 - rehlds/engine/sys_dll2.cpp | 17 - rehlds/engine/sys_dll2.h | 20 +- rehlds/engine/sys_engine.cpp | 11 - rehlds/engine/sys_engine.h | 5 - rehlds/engine/sys_linuxwind.cpp | 11 - rehlds/engine/textures.cpp | 11 - rehlds/engine/textures.h | 15 - rehlds/engine/tmessage.cpp | 19 +- rehlds/engine/tmessage.h | 12 - rehlds/engine/traceinit.h | 9 - rehlds/engine/vid_null.cpp | 12 - rehlds/engine/vid_null.h | 6 - rehlds/engine/wad.h | 4 - rehlds/engine/world.h | 12 - rehlds/engine/zone.cpp | 11 - rehlds/engine/zone.h | 14 - rehlds/hookers/engine/hooklist.cpp | 2512 ----------------- rehlds/hookers/engine/hooklist.h | 5 - rehlds/hookers/engine/main.cpp | 115 - rehlds/hookers/helper.h | 4 +- rehlds/hookers/hooker.cpp | 55 +- rehlds/hookers/iosutil.h | 21 - rehlds/hookers/rehlds_debug.cpp | 678 ----- rehlds/hookers/rehlds_debug.h | 49 - rehlds/msvc/ReHLDS.vcxproj | 431 +-- rehlds/msvc/ReHLDS.vcxproj.filters | 39 +- rehlds/pm_shared/pm_defs.h | 36 +- rehlds/public/iregistry.h | 5 - rehlds/public/registry.cpp | 9 - rehlds/rehlds/flight_recorder.cpp | 12 - .../engine/main_swds.cpp => rehlds/main.cpp} | 3 +- rehlds/rehlds/precompiled.h | 6 - rehlds/rehlds/rehlds_api_impl.cpp | 1 + rehlds/rehlds/rehlds_api_impl.h | 3 + 87 files changed, 145 insertions(+), 5487 deletions(-) delete mode 100644 rehlds/hookers/engine/hooklist.cpp delete mode 100644 rehlds/hookers/engine/hooklist.h delete mode 100644 rehlds/hookers/engine/main.cpp delete mode 100644 rehlds/hookers/iosutil.h delete mode 100644 rehlds/hookers/rehlds_debug.cpp delete mode 100644 rehlds/hookers/rehlds_debug.h rename rehlds/{hookers/engine/main_swds.cpp => rehlds/main.cpp} (98%) diff --git a/README.md b/README.md index ff45f34..12ddc49 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Bugfixed version of rehlds contains an additional cvars: ## Commands Bugfixed version of rehlds contains an additional commands: @@ -112,7 +112,7 @@ On Linux (GCC): * For faster building without unit tests use this:exclamation:
./gradlew --max-workers=1 -PuseGcc clean buildFixes
-Also there is a task `buildEngine`, it builds only a part of the engine.
+Also there is a task `buildEngine`, it builds only engine, without other parts of the project.
Compiled binaries will be placed in the rehlds/build/binaries/ directory ## How can I help the project? diff --git a/msvc/ReHLDS.sln b/msvc/ReHLDS.sln index c8e3daa..6a01e76 100644 --- a/msvc/ReHLDS.sln +++ b/msvc/ReHLDS.sln @@ -43,13 +43,8 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug Play|Win32 = Debug Play|Win32 - Debug Record|Win32 = Debug Record|Win32 - Debug Swds Play|Win32 = Debug Swds Play|Win32 - Debug Swds|Win32 = Debug Swds|Win32 Debug|Win32 = Debug|Win32 Release Play|Win32 = Release Play|Win32 - Release Swds Play|Win32 = Release Swds Play|Win32 - Release Swds|Win32 = Release Swds|Win32 Release|Win32 = Release|Win32 Test Fixes|Win32 = Test Fixes|Win32 Tests|Win32 = Tests|Win32 @@ -57,20 +52,10 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Play|Win32.ActiveCfg = Debug Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Play|Win32.Build.0 = Debug Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Record|Win32.ActiveCfg = Debug Record|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Record|Win32.Build.0 = Debug Record|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Swds Play|Win32.ActiveCfg = Debug Swds Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Swds Play|Win32.Build.0 = Debug Swds Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Swds|Win32.ActiveCfg = Debug Swds|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Swds|Win32.Build.0 = Debug Swds|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug|Win32.ActiveCfg = Debug|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug|Win32.Build.0 = Debug|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Play|Win32.ActiveCfg = Release Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Play|Win32.Build.0 = Release Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Swds Play|Win32.ActiveCfg = Release Swds Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Swds Play|Win32.Build.0 = Release Swds Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Swds|Win32.ActiveCfg = Release Swds|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Swds|Win32.Build.0 = Release Swds|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release|Win32.ActiveCfg = Release|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release|Win32.Build.0 = Release|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Test Fixes|Win32.ActiveCfg = Test Fixes|Win32 @@ -79,20 +64,10 @@ Global {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Tests|Win32.Build.0 = Tests|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Play|Win32.ActiveCfg = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Play|Win32.Build.0 = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Record|Win32.Build.0 = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Swds|Win32.Build.0 = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug|Win32.ActiveCfg = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug|Win32.Build.0 = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Play|Win32.ActiveCfg = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Play|Win32.Build.0 = Release|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Swds Play|Win32.Build.0 = Release|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Swds|Win32.ActiveCfg = Release|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Swds|Win32.Build.0 = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release|Win32.ActiveCfg = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release|Win32.Build.0 = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -101,20 +76,10 @@ Global {CEB94F7C-E459-4673-AABB-36E2074396C0}.Tests|Win32.Build.0 = Release|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Play|Win32.ActiveCfg = Debug|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Play|Win32.Build.0 = Debug|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Record|Win32.Build.0 = Debug|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Swds|Win32.Build.0 = Debug|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Debug|Win32.ActiveCfg = Debug|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Debug|Win32.Build.0 = Debug|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Release Play|Win32.ActiveCfg = Release|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Release Play|Win32.Build.0 = Release|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Release Swds Play|Win32.Build.0 = Release|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Release Swds|Win32.ActiveCfg = Release|Win32 - {792DF067-9904-4579-99B9-46C17277ADE3}.Release Swds|Win32.Build.0 = Release|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Release|Win32.ActiveCfg = Release|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Release|Win32.Build.0 = Release|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -123,20 +88,10 @@ Global {792DF067-9904-4579-99B9-46C17277ADE3}.Tests|Win32.Build.0 = Release|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Play|Win32.ActiveCfg = Debug|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Play|Win32.Build.0 = Debug|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Record|Win32.Build.0 = Debug|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug Swds|Win32.Build.0 = Debug|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug|Win32.ActiveCfg = Debug|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Debug|Win32.Build.0 = Debug|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release Play|Win32.ActiveCfg = Release|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release Play|Win32.Build.0 = Release|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release Swds Play|Win32.Build.0 = Release|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release Swds|Win32.ActiveCfg = Release|Win32 - {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release Swds|Win32.Build.0 = Release|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release|Win32.ActiveCfg = Release|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Release|Win32.Build.0 = Release|Win32 {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -145,20 +100,10 @@ Global {D49883F3-5C5C-4B9F-B9C7-B31518F228D4}.Tests|Win32.Build.0 = Release|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Play|Win32.ActiveCfg = Debug|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Play|Win32.Build.0 = Debug|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Record|Win32.Build.0 = Debug|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug Swds|Win32.Build.0 = Debug|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug|Win32.ActiveCfg = Debug|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Debug|Win32.Build.0 = Debug|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release Play|Win32.ActiveCfg = Release|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release Play|Win32.Build.0 = Release|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release Swds Play|Win32.Build.0 = Release|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release Swds|Win32.ActiveCfg = Release|Win32 - {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release Swds|Win32.Build.0 = Release|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release|Win32.ActiveCfg = Release|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Release|Win32.Build.0 = Release|Win32 {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -167,20 +112,10 @@ Global {D5CAB879-D54F-456F-8592-31D549CFD1D8}.Tests|Win32.Build.0 = Release|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Play|Win32.ActiveCfg = Debug|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Play|Win32.Build.0 = Debug|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Record|Win32.Build.0 = Debug|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug Swds|Win32.Build.0 = Debug|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug|Win32.ActiveCfg = Debug|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Debug|Win32.Build.0 = Debug|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release Play|Win32.ActiveCfg = Release|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release Play|Win32.Build.0 = Release|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release Swds Play|Win32.Build.0 = Release|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release Swds|Win32.ActiveCfg = Release|Win32 - {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release Swds|Win32.Build.0 = Release|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release|Win32.ActiveCfg = Release|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Release|Win32.Build.0 = Release|Win32 {52F752EA-73D1-422D-B805-17EF1FB20E09}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -189,20 +124,10 @@ Global {52F752EA-73D1-422D-B805-17EF1FB20E09}.Tests|Win32.Build.0 = Release|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Play|Win32.ActiveCfg = Debug|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Play|Win32.Build.0 = Debug|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Record|Win32.Build.0 = Debug|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug Swds|Win32.Build.0 = Debug|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug|Win32.ActiveCfg = Debug|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Debug|Win32.Build.0 = Debug|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release Play|Win32.ActiveCfg = Release|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release Play|Win32.Build.0 = Release|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release Swds Play|Win32.Build.0 = Release|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release Swds|Win32.ActiveCfg = Release|Win32 - {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release Swds|Win32.Build.0 = Release|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release|Win32.ActiveCfg = Release|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Release|Win32.Build.0 = Release|Win32 {05292761-0847-4A68-BA10-9D384DC0D3EE}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -211,20 +136,10 @@ Global {05292761-0847-4A68-BA10-9D384DC0D3EE}.Tests|Win32.Build.0 = Release|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Play|Win32.ActiveCfg = Debug|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Play|Win32.Build.0 = Debug|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Record|Win32.Build.0 = Debug|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug Swds|Win32.Build.0 = Debug|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug|Win32.ActiveCfg = Debug|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Debug|Win32.Build.0 = Debug|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release Play|Win32.ActiveCfg = Release|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release Play|Win32.Build.0 = Release|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release Swds Play|Win32.Build.0 = Release|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release Swds|Win32.ActiveCfg = Release|Win32 - {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release Swds|Win32.Build.0 = Release|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release|Win32.ActiveCfg = Release|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Release|Win32.Build.0 = Release|Win32 {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -233,20 +148,10 @@ Global {04D0594C-57F5-4277-AF1B-EAE90AED0C3C}.Tests|Win32.Build.0 = Release|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Play|Win32.ActiveCfg = Debug|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Play|Win32.Build.0 = Debug|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Record|Win32.Build.0 = Debug|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug Swds|Win32.Build.0 = Debug|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug|Win32.ActiveCfg = Debug|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Debug|Win32.Build.0 = Debug|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release Play|Win32.ActiveCfg = Release|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release Play|Win32.Build.0 = Release|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release Swds Play|Win32.Build.0 = Release|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release Swds|Win32.ActiveCfg = Release|Win32 - {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release Swds|Win32.Build.0 = Release|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release|Win32.ActiveCfg = Release|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Release|Win32.Build.0 = Release|Win32 {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Test Fixes|Win32.ActiveCfg = Release|Win32 @@ -255,20 +160,10 @@ Global {ADDFF069-D39D-4A1B-87C9-85A62B980547}.Tests|Win32.Build.0 = Release|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Play|Win32.ActiveCfg = Debug|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Play|Win32.Build.0 = Debug|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Record|Win32.ActiveCfg = Debug|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Record|Win32.Build.0 = Debug|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Swds Play|Win32.ActiveCfg = Debug|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Swds Play|Win32.Build.0 = Debug|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Swds|Win32.ActiveCfg = Debug|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug Swds|Win32.Build.0 = Debug|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug|Win32.ActiveCfg = Debug|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Debug|Win32.Build.0 = Debug|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Release Play|Win32.ActiveCfg = Release|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Release Play|Win32.Build.0 = Release|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Release Swds Play|Win32.ActiveCfg = Release|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Release Swds Play|Win32.Build.0 = Release|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Release Swds|Win32.ActiveCfg = Release|Win32 - {A428392F-52FB-489E-87D8-623528C7F4F9}.Release Swds|Win32.Build.0 = Release|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Release|Win32.ActiveCfg = Release|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Release|Win32.Build.0 = Release|Win32 {A428392F-52FB-489E-87D8-623528C7F4F9}.Test Fixes|Win32.ActiveCfg = Release|Win32 diff --git a/rehlds/build.gradle b/rehlds/build.gradle index 2361c59..fb362ac 100644 --- a/rehlds/build.gradle +++ b/rehlds/build.gradle @@ -179,10 +179,6 @@ void setupToolchain(NativeBinarySpec b) { cfg.extraLibs 'rt', 'dl', 'm', 'steam_api', 'aelf32' } - if (!unitTestExecutable && !swdsLib) { - cfg.singleDefines 'HOOK_ENGINE' - } - if (unitTestExecutable) { cfg.singleDefines 'REHLDS_UNIT_TESTS', 'REHLDS_SSE', 'REHLDS_JIT' } @@ -219,7 +215,6 @@ class RehldsSrc { source { srcDirs "hookers" include "memory.cpp" - if (GradleCppUtils.windows) include "rehlds_debug.cpp" } } h.rehlds_common(CppSourceSet) { @@ -239,24 +234,6 @@ class RehldsSrc { } } - static void rehlds_hooker_src(def h) { - h.rehlds_hooker_src(CppSourceSet) { - source { - srcDirs "hookers" - include "engine/hooklist.cpp", "hooker.cpp" - } - } - } - - static void rehlds_hooker_main_src(def h) { - h.rehlds_hooker_main_src(CppSourceSet) { - source { - srcDirs "hookers" - include "engine/main.cpp" - } - } - } - static void rehlds_swds_main_src(def h) { h.rehlds_swds_main_src(CppSourceSet) { source { @@ -276,7 +253,6 @@ class RehldsSrc { } } - model { buildTypes { debug @@ -304,20 +280,6 @@ model { } components { - rehlds_hooker_engine(NativeLibrarySpec) { - targetPlatform 'x86' - baseName 'FileSystem_Stdio' - - sources { - RehldsSrc.rehlds_pch(it) - RehldsSrc.rehlds_src(it) - RehldsSrc.rehlds_hooker_src(it) - RehldsSrc.rehlds_hooker_main_src(it) - } - - binaries.all { NativeBinarySpec b -> project.setupToolchain(b) } - } - rehlds_swds_engine(NativeLibrarySpec) { targetPlatform 'x86' baseName GradleCppUtils.windows ? 'swds' : 'engine_i486' @@ -331,17 +293,6 @@ model { binaries.all { NativeBinarySpec b -> project.setupToolchain(b) } } - rehlds_hooker_engine_tests(NativeExecutableSpec) { - targetPlatform 'x86' - sources { - RehldsSrc.rehlds_pch(it) - RehldsSrc.rehlds_src(it) - RehldsSrc.rehlds_tests_src(it) - } - - binaries.all { NativeBinarySpec b -> project.setupToolchain(b) } - } - rehlds_swds_engine_tests(NativeExecutableSpec) { targetPlatform 'x86' sources { @@ -370,7 +321,7 @@ task buildFinalize << { task buildRelease { dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib -> - blib.buildable && blib.buildType.name == 'release' && !blib.name.contains('Rehlds_hooker_engine') + blib.buildable && blib.buildType.name == 'release' } } diff --git a/rehlds/engine/SystemWrapper.h b/rehlds/engine/SystemWrapper.h index bb18959..9cbcb7c 100644 --- a/rehlds/engine/SystemWrapper.h +++ b/rehlds/engine/SystemWrapper.h @@ -28,10 +28,6 @@ #pragma once -#ifdef HOOK_ENGINE -#define gSystemWrapper (*pgSystemWrapper) -#endif // HOOK_ENGINE - #include "ObjectList.h" #include "TokenLine.h" #include "BaseSystemModule.h" diff --git a/rehlds/engine/cdll_int.h b/rehlds/engine/cdll_int.h index dd7eec6..8ffc36d 100644 --- a/rehlds/engine/cdll_int.h +++ b/rehlds/engine/cdll_int.h @@ -160,20 +160,12 @@ extern void ClientDLL_ChatInputPosition( int *x, int *y ); extern cldll_func_t cl_funcs; extern cl_enginefunc_t cl_engsrcProxies; - -#ifdef HOOK_ENGINE -#define g_engdstAddrs (*pg_engdstAddrs) -#define g_module (*pg_module) -#endif - extern cl_enginefunc_dst_t g_engdstAddrs; extern module_t g_module; - // Module exports extern modfuncs_t g_modfuncs; - // Macros for exported engine funcs #define RecEngSPR_Load(a) (g_engdstAddrs.pfnSPR_Load(&a)) #define RecEngSPR_Frames(a) (g_engdstAddrs.pfnSPR_Frames(&a)) diff --git a/rehlds/engine/cl_null.cpp b/rehlds/engine/cl_null.cpp index 3d6cc26..bf7eeed 100644 --- a/rehlds/engine/cl_null.cpp +++ b/rehlds/engine/cl_null.cpp @@ -35,23 +35,10 @@ keydest_t key_dest; playermove_t g_clmove; qboolean cl_inmovie; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t cl_name = { "name", "0", FCVAR_ARCHIVE | FCVAR_USERINFO, 0.0f, NULL }; cvar_t rate_ = { "rate", "30000", FCVAR_USERINFO, 0.0f, NULL }; cvar_t console = { "console", "1.0", FCVAR_ARCHIVE, 0.0f, NULL }; -#else //HOOK_ENGINE - -cvar_t cl_name; -cvar_t rate_; -cvar_t console; - -#endif //HOOK_ENGINE - void CL_RecordHUDCommand(const char *cmdname) { } void R_DecalRemoveAll(int textureIndex) { } void CL_CheckForResend(void) { } diff --git a/rehlds/engine/client.h b/rehlds/engine/client.h index 6432b30..a92ea49 100644 --- a/rehlds/engine/client.h +++ b/rehlds/engine/client.h @@ -261,19 +261,6 @@ typedef enum CareerStateType_e CAREER_PLAYING = 2, } CareerStateType; -#ifdef HOOK_ENGINE -#define g_pcls (*pcls) -#define g_pcl (*pcl) -#define key_dest (*pkey_dest) - -#define g_clmove (*pg_clmove) -#define cl_inmovie (*pcl_inmovie) - -#define cl_name (*pcl_name) -#define rate_ (*prate) -#define console (*pconsole) -#endif // HOOK_ENGINE - extern keydest_t key_dest; extern client_static_t g_pcls; extern client_state_t g_pcl; diff --git a/rehlds/engine/cmd.cpp b/rehlds/engine/cmd.cpp index 00593c2..808d583 100644 --- a/rehlds/engine/cmd.cpp +++ b/rehlds/engine/cmd.cpp @@ -470,7 +470,7 @@ void Cmd_Alias_f(void) #ifndef REHLDS_FIXES SetCStrikeFlags(); // DONE: Do this once somewhere at the server start #endif - if ((g_bIsCStrike || g_bIsCZero) && + if ((g_eGameType == GT_CStrike || g_eGameType == GT_CZero) && (!Q_stricmp(s, "cl_autobuy") || !Q_stricmp(s, "cl_rebuy") || !Q_stricmp(s, "gl_ztrick") @@ -482,7 +482,7 @@ void Cmd_Alias_f(void) } // Say hello to my little friend! (c) - if (g_bIsTFC && (!Q_stricmp(s, "_special") || !Q_stricmp(s, "special"))) + if (g_eGameType == GT_TFC && (!Q_stricmp(s, "_special") || !Q_stricmp(s, "special"))) { Con_Printf("Alias name is invalid\n"); return; diff --git a/rehlds/engine/cmd.h b/rehlds/engine/cmd.h index 574f505..2682e00 100644 --- a/rehlds/engine/cmd.h +++ b/rehlds/engine/cmd.h @@ -61,19 +61,6 @@ not apropriate. */ -#ifdef HOOK_ENGINE -#define cmd_argc (*pcmd_argc) -#define cmd_argv (*pcmd_argv) -#define cmd_args (*pcmd_args) - -#define cmd_text (*pcmd_text) -#define cmd_source (*pcmd_source) -#define cmd_wait (*pcmd_wait) - -#define cmd_functions (*pcmd_functions) -#define cmd_alias (*pcmd_alias) -#endif // HOOK_ENGINE - extern int cmd_argc; extern char *cmd_argv[80]; extern char *cmd_args; diff --git a/rehlds/engine/cmodel.h b/rehlds/engine/cmodel.h index f1ff8dc..5b8d5eb 100644 --- a/rehlds/engine/cmodel.h +++ b/rehlds/engine/cmodel.h @@ -31,25 +31,14 @@ #include "maintypes.h" #include "model.h" - // Looks like no more than 8096 visibility leafs per world model const int MODEL_MAX_PVS = 1024; - -#ifdef HOOK_ENGINE -#define gPAS (*pgPAS) -#define gPVS (*pgPVS) -#define gPVSRowBytes (*pgPVSRowBytes) -#define mod_novis (*pmod_novis) -#endif // HOOK_ENGINE - - extern unsigned char *gPAS; extern unsigned char *gPVS; extern int gPVSRowBytes; extern unsigned char mod_novis[MODEL_MAX_PVS]; - void Mod_Init(void); unsigned char *Mod_DecompressVis(unsigned char *in, model_t *model); unsigned char *Mod_LeafPVS(mleaf_t *leaf, model_t *model); diff --git a/rehlds/engine/common.h b/rehlds/engine/common.h index 0e453a9..c23b65a 100644 --- a/rehlds/engine/common.h +++ b/rehlds/engine/common.h @@ -49,42 +49,6 @@ #define __BUILD_DATE__ APP_COMMIT_DATE #endif // REHLDS_FIXES -#ifdef HOOK_ENGINE -#define serverinfo (*pserverinfo) - -#define gpszVersionString (*pgpszVersionString) -#define gpszProductString (*pgpszProductString) - -#define bfread (*pbfread) -#define bfwrite (*pbfwrite) - -#define msg_badread (*pmsg_badread) -#define msg_readcount (*pmsg_readcount) - -#define bigendien (*pbigendien) - -#define BigShort (*pBigShort) -#define LittleShort (*pLittleShort) -#define BigLong (*pBigLong) -#define LittleLong (*pLittleLong) -#define BigFloat (*pBigFloat) -#define LittleFloat (*pLittleFloat) - -#define com_argc (*pcom_argc) -#define com_argv (*pcom_argv) -#define com_token (*pcom_token) -#define com_ignorecolons (*pcom_ignorecolons) -#define s_com_token_unget (*ps_com_token_unget) -#define com_clientfallback (*pcom_clientfallback) -#define com_gamedir (*pcom_gamedir) -#define com_cmdline (*pcom_cmdline) - -#define loadcache (*ploadcache) -#define loadbuf (*ploadbuf) -#define loadsize (*ploadsize) -#endif // HOOK_ENGINE - - extern char serverinfo[MAX_INFO_STRING]; extern char gpszVersionString[32]; diff --git a/rehlds/engine/cvar.h b/rehlds/engine/cvar.h index 2cb14b9..c176054 100644 --- a/rehlds/engine/cvar.h +++ b/rehlds/engine/cvar.h @@ -35,13 +35,8 @@ const int MAX_CVAR_VALUE = 1024; const int MAX_CVARLIST_FILES = 100; -#ifdef HOOK_ENGINE -#define cvar_vars (*pcvar_vars) -#endif // HOOK_ENGINE - extern cvar_t *cvar_vars; - void Cvar_Init(void); void Cvar_Shutdown(void); cvar_t *Cvar_FindVar(const char *var_name); diff --git a/rehlds/engine/decal.h b/rehlds/engine/decal.h index 014746e..45f0a69 100644 --- a/rehlds/engine/decal.h +++ b/rehlds/engine/decal.h @@ -49,15 +49,6 @@ typedef struct lumplist_s lumplist_s *next; } lumplist_t; -#ifdef HOOK_ENGINE -#define decal_wad (*pdecal_wad) -#define menu_wad (*pmenu_wad) -#define szCustName (*pszCustName) -#define decal_names (*pdecal_names) -#define m_bDrawInitialized (*pm_bDrawInitialized) -#define gfCustomBuild (*pgfCustomBuild) -#endif // HOOK_ENGINE - extern cachewad_t *decal_wad; extern cachewad_t *menu_wad; extern char szCustName[10]; diff --git a/rehlds/engine/delta.h b/rehlds/engine/delta.h index a9a0bcb..bb3a409 100644 --- a/rehlds/engine/delta.h +++ b/rehlds/engine/delta.h @@ -116,12 +116,6 @@ typedef struct delta_info_s delta_t *delta; } delta_info_t; -#ifdef HOOK_ENGINE -#define g_defs (*pg_defs) -#define g_encoders (*pg_encoders) -#define g_deltaregistry (*pg_deltaregistry) -#endif // HOOK_ENGINE - extern delta_definition_list_t *g_defs; extern delta_encoder_t *g_encoders; extern delta_registry_t *g_deltaregistry; diff --git a/rehlds/engine/filesystem.cpp b/rehlds/engine/filesystem.cpp index b5c1bcc..7d01f81 100644 --- a/rehlds/engine/filesystem.cpp +++ b/rehlds/engine/filesystem.cpp @@ -452,7 +452,6 @@ int FileSystem_SetGameDirectory(const char *pDefaultDir, const char *pGameDir) g_pFileSystem->AddSearchPath(temp, "PLATFORM"); return 1; - } int FileSystem_AddFallbackGameDir(const char *pGameDir) diff --git a/rehlds/engine/filesystem_.h b/rehlds/engine/filesystem_.h index ce2b7ea..198cf5b 100644 --- a/rehlds/engine/filesystem_.h +++ b/rehlds/engine/filesystem_.h @@ -32,15 +32,6 @@ #include "iregistry.h" #include "utlvector.h" -#ifdef HOOK_ENGINE -#define g_fallbackLocalizationFiles (*pg_fallbackLocalizationFiles) -#define s_pBaseDir (*ps_pBaseDir) -#define bLowViolenceBuild (*pbLowViolenceBuild) - -#define g_pFileSystemModule (*pg_pFileSystemModule) -#define g_FileSystemFactory (*pg_FileSystemFactory) -#endif // HOOK_ENGINE - extern CUtlVector g_fallbackLocalizationFiles; extern char s_pBaseDir[512]; extern bool bLowViolenceBuild; diff --git a/rehlds/engine/filesystem_internal.h b/rehlds/engine/filesystem_internal.h index 83d0c05..74c5875 100644 --- a/rehlds/engine/filesystem_internal.h +++ b/rehlds/engine/filesystem_internal.h @@ -31,14 +31,8 @@ #include "maintypes.h" #include "FileSystem.h" - -#ifdef HOOK_ENGINE -#define g_pFileSystem (*pg_pFileSystem) -#endif // HOOK_ENGINE - extern IFileSystem *g_pFileSystem; - void FS_RemoveAllSearchPaths(void); void FS_AddSearchPath(const char *pPath, const char *pathID); NOXREF int FS_RemoveSearchPath(const char *pPath); diff --git a/rehlds/engine/hashpak.cpp b/rehlds/engine/hashpak.cpp index c770cbb..3e76012 100644 --- a/rehlds/engine/hashpak.cpp +++ b/rehlds/engine/hashpak.cpp @@ -28,23 +28,10 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - hash_pack_queue_t *gp_hpak_queue = NULL; hash_pack_directory_t hash_pack_dir = { 0, NULL }; hash_pack_header_t hash_pack_header = { { 0, 0, 0, 0 }, 0, 0 }; -#else //HOOK_ENGINE - -hash_pack_queue_t *gp_hpak_queue; -hash_pack_directory_t hash_pack_dir; -hash_pack_header_t hash_pack_header; - -#endif //HOOK_ENGINE - qboolean HPAK_GetDataPointer(char *pakname, struct resource_s *pResource, unsigned char **pbuffer, int *bufsize) { qboolean retval = FALSE; @@ -1159,17 +1146,11 @@ void HPAK_Extract_f(void) void HPAK_Init(void) { -#ifdef HOOK_ENGINE - Cmd_AddCommand("hpklist", (xcommand_t)GetOriginalFuncAddrOrDefault("HPAK_List_f", (void *)HPAK_List_f)); - Cmd_AddCommand("hpkremove", (xcommand_t)GetOriginalFuncAddrOrDefault("HPAK_Remove_f", (void *)HPAK_Remove_f)); - Cmd_AddCommand("hpkval", (xcommand_t)GetOriginalFuncAddrOrDefault("HPAK_Validate_f", (void *)HPAK_Validate_f)); - Cmd_AddCommand("hpkextract", (xcommand_t)GetOriginalFuncAddrOrDefault("HPAK_Extract_f", (void *)HPAK_Extract_f)); -#else Cmd_AddCommand("hpklist", HPAK_List_f); Cmd_AddCommand("hpkremove", HPAK_Remove_f); Cmd_AddCommand("hpkval", HPAK_Validate_f); Cmd_AddCommand("hpkextract", HPAK_Extract_f); -#endif // HOOK_ENGINE + gp_hpak_queue = NULL; } diff --git a/rehlds/engine/hashpak.h b/rehlds/engine/hashpak.h index e962690..7898335 100644 --- a/rehlds/engine/hashpak.h +++ b/rehlds/engine/hashpak.h @@ -67,12 +67,6 @@ typedef struct hash_pack_header_s int nDirectoryOffset; } hash_pack_header_t; -#ifdef HOOK_ENGINE -#define gp_hpak_queue (*pgp_hpak_queue) -#define hash_pack_dir (*phash_pack_dir) -#define hash_pack_header (*phash_pack_header) -#endif // HOOK_ENGINE - extern hash_pack_queue_t *gp_hpak_queue; // TODO: used only in hashpak diff --git a/rehlds/engine/host.cpp b/rehlds/engine/host.cpp index 9f7b59d..373e4e8 100644 --- a/rehlds/engine/host.cpp +++ b/rehlds/engine/host.cpp @@ -47,11 +47,6 @@ unsigned short *host_basepal; //unsigned char *host_colormap; //const char *g_InGameAdsAllowed[3]; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t host_name = { "hostname", "Half-Life", 0, 0.0f, NULL }; cvar_t host_speeds = { "host_speeds", "0", 0, 0.0f, NULL }; cvar_t host_profile = { "host_profile", "0", 0, 0.0f, NULL }; @@ -71,29 +66,6 @@ cvar_t host_framerate = { "host_framerate", "0", 0, 0.0f, NULL }; cvar_t pausable = { "pausable", "1", FCVAR_SERVER, 0.0f, NULL }; cvar_t suitvolume = { "suitvolume", "0.25", FCVAR_ARCHIVE, 0.0f, NULL }; -#else // HOOK_ENGINE - -cvar_t host_name; -cvar_t host_speeds; -cvar_t host_profile; -cvar_t developer; -cvar_t host_limitlocal; -cvar_t skill; -cvar_t deathmatch; -cvar_t coop; - -cvar_t sys_ticrate; -cvar_t sys_timescale; -cvar_t fps_max; -cvar_t host_killtime; -cvar_t sv_stats; -cvar_t fps_override; -cvar_t host_framerate; -cvar_t pausable; -cvar_t suitvolume; - -#endif // HOOK_ENGINE - NOXREF void Host_EndGame(const char *message, ...) { NOXREFCHECK; diff --git a/rehlds/engine/host.h b/rehlds/engine/host.h index 814e7ab..94e0474 100644 --- a/rehlds/engine/host.h +++ b/rehlds/engine/host.h @@ -46,40 +46,6 @@ typedef struct quakeparms_s int memsize; } quakeparms_t; -#ifdef HOOK_ENGINE -#define host_name (*phost_name) -#define host_speeds (*phost_speeds) -#define host_profile (*phost_profile) -#define developer (*pdeveloper) -#define host_limitlocal (*phost_limitlocal) -#define skill (*pskill) -#define deathmatch (*pdeathmatch) -#define coop (*pcoop) -#define sys_ticrate (*psys_ticrate) -#define sys_timescale (*psys_timescale) -#define fps_max (*pfps_max) -#define host_killtime (*phost_killtime) -#define sv_stats (*psv_stats) -#define fps_override (*pfps_override) -#define host_framerate (*phost_framerate) -#define pausable (*ppausable) -#define suitvolume (*psuitvolume) - -#define realtime (*prealtime) -#define rolling_fps (*prolling_fps) -#define host_parms (*phost_parms) -#define host_initialized (*phost_initialized) -#define host_frametime (*phost_frametime) -#define host_framecount (*phost_framecount) -#define host_client (*phost_client) -#define gfNoMasterServer (*pgfNoMasterServer) -#define oldrealtime (*poldrealtime) -#define host_hunklevel (*phost_hunklevel) -#define host_abortserver (*phost_abortserver) -#define host_enddemo (*phost_enddemo) -#define host_basepal (*phost_basepal) -#endif // HOOK_ENGINE - extern cvar_t host_name; extern cvar_t host_speeds; extern cvar_t host_profile; diff --git a/rehlds/engine/host_cmd.cpp b/rehlds/engine/host_cmd.cpp index e1edcbb..821955c 100644 --- a/rehlds/engine/host_cmd.cpp +++ b/rehlds/engine/host_cmd.cpp @@ -43,11 +43,6 @@ qboolean g_bMajorMapChange; int g_iQuitCommandIssued; char *g_pPostRestartCmdLineArgs; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - int r_dointerp = 1; SV_SAVEGAMECOMMENT_FUNC g_pSaveGameCommentFunc = &Host_SavegameComment; @@ -168,25 +163,6 @@ TYPEDESCRIPTION gLightstyleDescription[] = DEFINE_ARRAY(SAVELIGHTSTYLE, style, FIELD_CHARACTER, MAX_LIGHTSTYLES), }; -#else // HOOK_ENGINE - -int r_dointerp; - -SV_SAVEGAMECOMMENT_FUNC g_pSaveGameCommentFunc; - -cvar_t voice_recordtofile; -cvar_t voice_inputfromfile; -cvar_t gHostMap; - -TITLECOMMENT gTitleComments[66]; -TYPEDESCRIPTION gGameHeaderDescription[3]; -TYPEDESCRIPTION gSaveHeaderDescription[13]; -TYPEDESCRIPTION gAdjacencyDescription[4]; -TYPEDESCRIPTION gEntityTableDescription[5]; -TYPEDESCRIPTION gLightstyleDescription[2]; - -#endif // HOOK_ENGINE - void SV_GetPlayerHulls(void) { int i; @@ -3057,60 +3033,19 @@ void Host_ResourcesList_f() void Host_InitCommands(void) { -#ifdef HOOK_ENGINE - Cmd_AddCommand("shutdownserver", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_KillServer_f", (void *)Host_KillServer_f)); - Cmd_AddCommand("soundfade", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Soundfade_f", (void *)Host_Soundfade_f)); - Cmd_AddCommand("status", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Status_f", (void *)Host_Status_f)); - Cmd_AddCommand("stat", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Status_Formatted_f", (void *)Host_Status_Formatted_f)); - Cmd_AddCommand("quit", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Quit_f", (void *)Host_Quit_f)); - Cmd_AddCommand("_restart", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Quit_Restart_f", (void *)Host_Quit_Restart_f)); - Cmd_AddCommand("exit", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Quit_f", (void *)Host_Quit_f)); - Cmd_AddCommand("map", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Map_f", (void *)Host_Map_f)); - Cmd_AddCommand("career", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Career_f", (void *)Host_Career_f)); - Cmd_AddCommand("maps", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Maps_f", (void *)Host_Maps_f)); - Cmd_AddCommand("restart", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Restart_f", (void *)Host_Restart_f)); - Cmd_AddCommand("reload", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Reload_f", (void *)Host_Reload_f)); - Cmd_AddCommand("changelevel", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Changelevel_f", (void *)Host_Changelevel_f)); - Cmd_AddCommand("changelevel2", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Changelevel2_f", (void *)Host_Changelevel2_f)); - Cmd_AddCommand("reconnect", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Reconnect_f", (void *)Host_Reconnect_f)); - Cmd_AddCommand("version", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Version_f", (void *)Host_Version_f)); - Cmd_AddCommand("say", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Say_f", (void *)Host_Say_f)); - Cmd_AddCommand("say_team", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Say_Team_f", (void *)Host_Say_Team_f)); - Cmd_AddCommand("tell", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Tell_f", (void *)Host_Tell_f)); - Cmd_AddCommand("kill", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Kill_f", (void *)Host_Kill_f)); - Cmd_AddCommand("pause", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_TogglePause_f", (void *)Host_TogglePause_f)); - Cmd_AddCommand("setpause", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Pause_f", (void *)Host_Pause_f)); - Cmd_AddCommand("unpause", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Unpause_f", (void *)Host_Unpause_f)); - Cmd_AddCommand("kick", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Kick_f", (void *)Host_Kick_f)); - Cmd_AddCommand("ping", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Ping_f", (void *)Host_Ping_f)); - Cmd_AddCommand("motd", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Motd_f", (void *)Host_Motd_f)); - Cmd_AddCommand("motd_write", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Motd_Write_f", (void *)Host_Motd_Write_f)); - Cmd_AddCommand("stats", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Stats_f", (void *)Host_Stats_f)); - Cmd_AddCommand("load", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Loadgame_f", (void *)Host_Loadgame_f)); - Cmd_AddCommand("save", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Savegame_f", (void *)Host_Savegame_f)); - Cmd_AddCommand("autosave", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_AutoSave_f", (void *)Host_AutoSave_f)); - Cmd_AddCommand("writecfg", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_WriteCustomConfig", (void *)Host_WriteCustomConfig)); - Cmd_AddCommand("startdemos", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Startdemos_f", (void *)Host_Startdemos_f)); - Cmd_AddCommand("demos", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Demos_f", (void *)Host_Demos_f)); - Cmd_AddCommand("stopdemo", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Stopdemo_f", (void *)Host_Stopdemo_f)); - Cmd_AddCommand("setinfo", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_SetInfo_f", (void *)Host_SetInfo_f)); - Cmd_AddCommand("fullinfo", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_FullInfo_f", (void *)Host_FullInfo_f)); - Cmd_AddCommand("mcache", (xcommand_t)GetOriginalFuncAddrOrDefault("Mod_Print", (void *)Mod_Print)); - Cmd_AddCommand("interp", (xcommand_t)GetOriginalFuncAddrOrDefault("Host_Interp_f", (void *)Host_Interp_f)); - Cmd_AddCommand("setmaster", (xcommand_t)GetOriginalFuncAddrOrDefault("Master_SetMaster_f", (void *)Master_SetMaster_f)); - Cmd_AddCommand("heartbeat", (xcommand_t)GetOriginalFuncAddrOrDefault("Master_Heartbeat_f", (void *)Master_Heartbeat_f)); -#else // HOOK_ENGINE #ifndef SWDS Cmd_AddCommand("cd", CD_Command_f); Cmd_AddCommand("mp3", MP3_Command_f); Cmd_AddCommand("_careeraudio", CareerAudio_Command_f); -#endif // SWDS +#endif + Cmd_AddCommand("shutdownserver", Host_KillServer_f); Cmd_AddCommand("soundfade", Host_Soundfade_f); Cmd_AddCommand("status", Host_Status_f); Cmd_AddCommand("stat", Host_Status_Formatted_f); Cmd_AddCommand("quit", Host_Quit_f); Cmd_AddCommand("_restart", Host_Quit_Restart_f); + #ifndef SWDS Cmd_AddCommand("_setrenderer", Host_SetRenderer_f); Cmd_AddCommand("_setvideomode", Host_SetVideoMode_f); @@ -3118,7 +3053,8 @@ void Host_InitCommands(void) Cmd_AddCommand("_sethdmodels", Host_SetHDModels_f); Cmd_AddCommand("_setaddons_folder", Host_SetAddonsFolder_f); Cmd_AddCommand("_set_vid_level", Host_SetVideoLevel_f); -#endif // SWDS +#endif + Cmd_AddCommand("exit", Host_Quit_f); Cmd_AddCommand("map", Host_Map_f); Cmd_AddCommand("career", Host_Career_f); @@ -3145,15 +3081,18 @@ void Host_InitCommands(void) Cmd_AddCommand("save", Host_Savegame_f); Cmd_AddCommand("autosave", Host_AutoSave_f); Cmd_AddCommand("writecfg", Host_WriteCustomConfig); + #ifndef SWDS Cmd_AddCommand("+voicerecord", Host_VoiceRecordStart_f); Cmd_AddCommand("-voicerecord", Host_VoiceRecordStop_f); -#endif // SWDS +#endif + Cmd_AddCommand("startdemos", Host_Startdemos_f); Cmd_AddCommand("demos", Host_Demos_f); Cmd_AddCommand("stopdemo", Host_Stopdemo_f); Cmd_AddCommand("setinfo", Host_SetInfo_f); Cmd_AddCommand("fullinfo", Host_FullInfo_f); + #ifndef SWDS Cmd_AddCommand("god", Host_God_f); Cmd_AddCommand("notarget", Host_Notarget_f); @@ -3163,12 +3102,12 @@ void Host_InitCommands(void) Cmd_AddCommand("viewframe", Host_Viewframe_f); Cmd_AddCommand("viewnext", Host_Viewnext_f); Cmd_AddCommand("viewprev", Host_Viewprev_f); -#endif // SWDS +#endif + Cmd_AddCommand("mcache", Mod_Print); Cmd_AddCommand("interp", Host_Interp_f); Cmd_AddCommand("setmaster", Master_SetMaster_f); Cmd_AddCommand("heartbeat", Master_Heartbeat_f); -#endif // HOOK_ENGINE #ifdef REHLDS_FIXES Cmd_AddCommand("rescount", Host_ResourcesCount_f); diff --git a/rehlds/engine/host_cmd.h b/rehlds/engine/host_cmd.h index 49cdf30..162c797 100644 --- a/rehlds/engine/host_cmd.h +++ b/rehlds/engine/host_cmd.h @@ -78,31 +78,6 @@ typedef struct TITLECOMMENT_s char *pTitleName; } TITLECOMMENT; -#ifdef HOOK_ENGINE - -#define r_dointerp (*pr_dointerp) -#define r_origin (*pr_origin) -#define cpuPercent (*pcpuPercent) -#define startTime (*pstartTime) -#define current_skill (*pcurrent_skill) -#define gHostSpawnCount (*pgHostSpawnCount) -#define g_careerState (*pg_careerState) -#define g_pSaveGameCommentFunc (*pg_pSaveGameCommentFunc) -#define g_bMajorMapChange (*pg_bMajorMapChange) -#define voice_recordtofile (*pvoice_recordtofile) -#define voice_inputfromfile (*pvoice_inputfromfile) -#define gTitleComments (*pgTitleComments) -#define gGameHeaderDescription (*pgGameHeaderDescription) -#define gSaveHeaderDescription (*pgSaveHeaderDescription) -#define gAdjacencyDescription (*pgAdjacencyDescription) -#define gEntityTableDescription (*pgEntityTableDescription) -#define gLightstyleDescription (*pgLightstyleDescription) -#define gHostMap (*pgHostMap) -#define g_iQuitCommandIssued (*pg_iQuitCommandIssued) -#define g_pPostRestartCmdLineArgs pg_pPostRestartCmdLineArgs - -#endif // HOOK_ENGINE - extern int r_dointerp; extern vec3_t r_origin; extern double cpuPercent; diff --git a/rehlds/engine/ipratelimitWrapper.cpp b/rehlds/engine/ipratelimitWrapper.cpp index cc1282b..c6b0392 100644 --- a/rehlds/engine/ipratelimitWrapper.cpp +++ b/rehlds/engine/ipratelimitWrapper.cpp @@ -28,23 +28,10 @@ #include "precompiled.h" -#ifdef HOOK_ENGINE -int (*pCheckIP)(netadr_t adr); -#endif // HOOK_ENGINE - class CIPRateLimit rateChecker; int CheckIP(netadr_t adr) { -#ifdef HOOK_ENGINE - int res = pCheckIP(adr); - if (res != 1) - { - rehlds_syserror("CheckIP() is expected to return 1"); - } - return res; -#else - CRehldsPlatformHolder::get()->time(NULL); //time() is called inside IpRateLimiter + CRehldsPlatformHolder::get()->time(NULL); // time() is called inside IpRateLimiter return 1; -#endif } diff --git a/rehlds/engine/ipratelimitWrapper.h b/rehlds/engine/ipratelimitWrapper.h index c429ace..b510db8 100644 --- a/rehlds/engine/ipratelimitWrapper.h +++ b/rehlds/engine/ipratelimitWrapper.h @@ -32,12 +32,6 @@ #include "net.h" #include "ipratelimit.h" -#ifdef HOOK_ENGINE -#define rateChecker (*prateChecker) - -extern int(*pCheckIP)(netadr_t adr); -#endif //HOOK_ENGINE - extern class CIPRateLimit rateChecker; int CheckIP(netadr_t adr); diff --git a/rehlds/engine/l_studio.h b/rehlds/engine/l_studio.h index 7601160..c31cbca 100644 --- a/rehlds/engine/l_studio.h +++ b/rehlds/engine/l_studio.h @@ -38,10 +38,6 @@ const int STUDIO_VERSION = 10; #define IDSTUDIOHEADER MAKEID('I', 'D', 'S', 'T') // little-endian "IDST" #define IDSEQGRPHEADER MAKEID('I', 'D', 'S', 'Q') // little-endian "IDSQ" -#ifdef HOOK_ENGINE -//#define giTextureSize (*pgiTextureSize) -#endif //HOOK_ENGINE - //extern int giTextureSize; void Mod_LoadStudioModel(model_t * mod, void * buffer); diff --git a/rehlds/engine/mathlib_e.h b/rehlds/engine/mathlib_e.h index 77f69ee..3b265a1 100644 --- a/rehlds/engine/mathlib_e.h +++ b/rehlds/engine/mathlib_e.h @@ -52,10 +52,6 @@ enum #define RAD2DEG(x) ((float)(x) * (float)(180.f / M_PI)) #define DEG2RAD(x) ((float)(x) * (float)(M_PI / 180.f)) -#ifdef HOOK_ENGINE -#define vec3_origin (*pvec3_origin) -#endif // HOOK_ENGINE - #define BOX_ON_PLANE_SIDE(emins, emaxs, p) \ (((p)->type < 3) ? \ ( \ diff --git a/rehlds/engine/model.cpp b/rehlds/engine/model.cpp index 474862f..1bc30e7 100644 --- a/rehlds/engine/model.cpp +++ b/rehlds/engine/model.cpp @@ -316,7 +316,7 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean trackCRC) #ifndef REHLDS_FIXES SetCStrikeFlags(); #endif - if (!IsGameSubscribed("czero") && g_bIsCStrike && IsCZPlayerModel(currentCRC, mod->name) && g_pcls.state) + if (!IsGameSubscribed("czero") && g_eGameType == GT_CStrike && IsCZPlayerModel(currentCRC, mod->name) && g_pcls.state) { COM_ExplainDisconnection(TRUE, "Cannot continue with altered model %s, disconnecting.", mod->name); CL_Disconnect(); diff --git a/rehlds/engine/model_rehlds.h b/rehlds/engine/model_rehlds.h index 0f245bf..f360181 100644 --- a/rehlds/engine/model_rehlds.h +++ b/rehlds/engine/model_rehlds.h @@ -45,20 +45,6 @@ #include "bspfile.h" #include "crc.h" - -#ifdef HOOK_ENGINE -#define loadmodel (*ploadmodel) -#define loadname (*ploadname) -#define mod_known (*pmod_known) -#define mod_numknown (*pmod_numknown) -#define mod_base (*pmod_base) -#define wadpath (*pwadpath) -#define tested (*ptested) -#define ad_enabled (*pad_enabled) -#define ad_wad (*pad_wad) -#define mod_known_info (*pmod_known_info) -#endif - extern model_t* loadmodel; extern char loadname[32]; extern model_t mod_known[MAX_KNOWN_MODELS]; diff --git a/rehlds/engine/net_chan.cpp b/rehlds/engine/net_chan.cpp index 6ecfc95..cb6bfb6 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -31,11 +31,6 @@ int net_drop; char gDownloadFile[256]; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t net_log = { "net_log", "0", 0, 0.0f, nullptr}; cvar_t net_showpackets = { "net_showpackets", "0", 0, 0.0f, nullptr}; cvar_t net_showdrop = { "net_showdrop", "0", 0, 0.0f, nullptr}; @@ -44,18 +39,6 @@ cvar_t net_chokeloopback = { "net_chokeloop", "0", 0, 0.0f, nullptr}; cvar_t sv_filetransfercompression = { "sv_filetransfercompression", "1", 0, 0.0f, nullptr}; cvar_t sv_filetransfermaxsize = { "sv_filetransfermaxsize", "10485760", 0, 0.0f, nullptr}; -#else //HOOK_ENGINE - -cvar_t net_log; -cvar_t net_showpackets; -cvar_t net_showdrop; -cvar_t net_drawslider; -cvar_t net_chokeloopback; -cvar_t sv_filetransfercompression; -cvar_t sv_filetransfermaxsize; - -#endif //HOOK_ENGINE - void Netchan_UnlinkFragment(fragbuf_t *buf, fragbuf_t **list) { fragbuf_t *search; diff --git a/rehlds/engine/net_chan.h b/rehlds/engine/net_chan.h index b16da50..47cda73 100644 --- a/rehlds/engine/net_chan.h +++ b/rehlds/engine/net_chan.h @@ -32,21 +32,6 @@ #include "cvar.h" #include "net.h" -#ifdef HOOK_ENGINE - -#define gDownloadFile (*pgDownloadFile) - -#define net_drop (*pnet_drop) -#define net_log (*pnet_log) -#define net_showpackets (*pnet_showpackets) -#define net_showdrop (*pnet_showdrop) -#define net_drawslider (*pnet_drawslider) -#define net_chokeloopback (*pnet_chokeloopback) -#define sv_filetransfercompression (*psv_filetransfercompression) -#define sv_filetransfermaxsize (*psv_filetransfermaxsize) - -#endif // HOOK_ENGINE - extern char gDownloadFile[256]; extern int net_drop; diff --git a/rehlds/engine/net_ws.cpp b/rehlds/engine/net_ws.cpp index 7f1aeef..2056bd9 100644 --- a/rehlds/engine/net_ws.cpp +++ b/rehlds/engine/net_ws.cpp @@ -28,14 +28,6 @@ #include "precompiled.h" -#ifdef _WIN32 - -HANDLE hThread; -DWORD ThreadId; -CRITICAL_SECTION net_cs; - -#endif // _WIN32 - qboolean net_thread_initialized; loopback_t loopbacks[2]; @@ -57,7 +49,7 @@ unsigned char in_message_buf[NET_MAX_PAYLOAD]; sizebuf_t in_message; netadr_t in_from; -#if defined(REHLDS_FIXES) && !defined(HOOK_ENGINE) +#ifdef REHLDS_FIXES // Define default to INVALID_SOCKET #define INV_SOCK INVALID_SOCKET #else @@ -65,30 +57,21 @@ netadr_t in_from; #define INV_SOCK 0 #endif -#ifndef HOOK_ENGINE SOCKET ip_sockets[NS_MAX] = { INV_SOCK, INV_SOCK, INV_SOCK }; -#else -SOCKET ip_sockets[NS_MAX]; -#endif #ifdef _WIN32 -#ifndef HOOK_ENGINE SOCKET ipx_sockets[NS_MAX] = { INV_SOCK, INV_SOCK, INV_SOCK }; -#else -SOCKET ipx_sockets[NS_MAX]; #endif -#endif // _WIN32 LONGPACKET gNetSplit; net_messages_t *messages[NS_MAX]; net_messages_t *normalqueue; -//void *hNetThread; -//int32 dwNetThreadId; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE +#ifdef _WIN32 +HANDLE hNetThread; +DWORD dwNetThreadId; +CRITICAL_SECTION net_cs; +#endif cvar_t net_address = { "net_address", "", 0, 0.0f, NULL }; cvar_t ipname = { "ip", "localhost", 0, 0.0f, NULL }; @@ -106,7 +89,7 @@ cvar_t multicastport = { "multicastport", "27025", 0, 0.0f, NULL }; #ifdef _WIN32 cvar_t ipx_hostport = { "ipx_hostport", "0", 0, 0.0f, NULL }; cvar_t ipx_clientport = { "ipx_clientport", "0", 0, 0.0f, NULL }; -#endif //_WIN32 +#endif cvar_t fakelag = { "fakelag", "0.0", 0, 0.0f, NULL }; cvar_t fakeloss = { "fakeloss", "0.0", 0, 0.0f, NULL }; @@ -115,35 +98,6 @@ cvar_t net_graphwidth = { "net_graphwidth", "150", 0, 0.0f, NULL }; cvar_t net_scale = { "net_scale", "5", FCVAR_ARCHIVE, 0.0f, NULL }; cvar_t net_graphpos = { "net_graphpos", "1", FCVAR_ARCHIVE, 0.0f, NULL }; -#else // HOOK_ENGINE - -cvar_t net_address; -cvar_t ipname; -cvar_t defport; -cvar_t ip_clientport; -cvar_t clientport; -int net_sleepforever; - -cvar_t clockwindow; - -cvar_t iphostport; -cvar_t hostport; -cvar_t multicastport; - -#ifdef _WIN32 -cvar_t ipx_hostport; -cvar_t ipx_clientport; -#endif // _WIN32 - -cvar_t fakelag; -cvar_t fakeloss; -cvar_t net_graph; -cvar_t net_graphwidth; -cvar_t net_scale; -cvar_t net_graphpos; - -#endif // HOOK_ENGINE - void NET_ThreadLock() { #ifdef _WIN32 @@ -969,17 +923,13 @@ qboolean NET_GetLong(unsigned char *pData, int size, int *outSize) qboolean NET_QueuePacket(netsrc_t sock) { - int ret; + int ret = -1; struct sockaddr from; socklen_t fromlen; SOCKET net_socket; int protocol; unsigned char buf[MAX_UDP_PACKET]; -#ifdef REHLDS_FIXES - ret = -1; -#endif - #ifdef _WIN32 for (protocol = 0; protocol < 2; protocol++) #else @@ -1229,8 +1179,8 @@ void NET_StartThread() #ifdef _WIN32 InitializeCriticalSection(&net_cs); - hThread = CreateThread(0, 0, NET_ThreadMain, 0, 0, &ThreadId); - if (!hThread) + hNetThread = CreateThread(0, 0, NET_ThreadMain, 0, 0, &dwNetThreadId); + if (!hNetThread) { DeleteCriticalSection(&net_cs); net_thread_initialized = FALSE; @@ -1249,7 +1199,7 @@ void NET_StopThread() if (net_thread_initialized) { #ifdef _WIN32 - TerminateThread(hThread, 0); + TerminateThread(hNetThread, 0); DeleteCriticalSection(&net_cs); #endif // _WIN32 net_thread_initialized = FALSE; @@ -2040,11 +1990,7 @@ void MaxPlayers_f() void NET_Init() { -#ifdef HOOK_ENGINE - Cmd_AddCommand("maxplayers", (xcommand_t)GetOriginalFuncAddrOrDefault("MaxPlayers_f", (void *)MaxPlayers_f)); -#else Cmd_AddCommand("maxplayers", MaxPlayers_f); -#endif // HOOK_ENGINE Cvar_RegisterVariable(&net_address); Cvar_RegisterVariable(&ipname); diff --git a/rehlds/engine/net_ws.h b/rehlds/engine/net_ws.h index af4d25c..7f57ecb 100644 --- a/rehlds/engine/net_ws.h +++ b/rehlds/engine/net_ws.h @@ -112,59 +112,6 @@ typedef struct SPLITPACKET_t const int NET_WS_MAX_FRAGMENTS = 5; -#ifdef HOOK_ENGINE -#define net_thread_initialized (*pnet_thread_initialized) -#define net_address (*pnet_address) -#define ipname (*pipname) -#define defport (*pdefport) -#define ip_clientport (*pip_clientport) -#define clientport (*pclientport) -#define net_sleepforever (*pnet_sleepforever) -#define loopbacks (*ploopbacks) -#define g_pLagData (*pg_pLagData) -#define gFakeLag (*pgFakeLag) -#define net_configured (*pnet_configured) -#define net_message (*pnet_message) -#ifdef _WIN32 -#define net_local_ipx_adr (*pnet_local_ipx_adr) -#endif // _WIN32 -#define net_local_adr (*pnet_local_adr) -#define net_from (*pnet_from) -#define noip (*pnoip) -#ifdef _WIN32 -#define noipx (*pnoipx) -#endif // _WIN32 -#define clockwindow (*pclockwindow) -#define use_thread (*puse_thread) -#define iphostport (*piphostport) -#define hostport (*phostport) -#define multicastport (*pmulticastport) -#ifdef _WIN32 -#define ipx_hostport (*pipx_hostport) -#define ipx_clientport (*pipx_clientport) -#endif // _WIN32 -#define fakelag (*pfakelag) -#define fakeloss (*pfakeloss) - -#define net_graph (*pnet_graph) -#define net_graphwidth (*pnet_graphwidth) -#define net_scale (*pnet_scale) -#define net_graphpos (*pnet_graphpos) -#define net_message_buffer (*pnet_message_buffer) -#define in_message_buf (*pin_message_buf) - -#define in_message (*pin_message) -#define in_from (*pin_from) -#define ip_sockets (*pip_sockets) -#ifdef _WIN32 -#define ipx_sockets (*pipx_sockets) -#endif // _WIN32 -#define gNetSplit (*pgNetSplit) -#define messages (*pmessages) -#define normalqueue (*pnormalqueue) -#endif // HOOK_ENGINE - - extern qboolean net_thread_initialized; extern cvar_t net_address; extern cvar_t ipname; diff --git a/rehlds/engine/pmove.cpp b/rehlds/engine/pmove.cpp index 578a512..e281cd9 100644 --- a/rehlds/engine/pmove.cpp +++ b/rehlds/engine/pmove.cpp @@ -31,36 +31,25 @@ playermove_t *pmove; movevars_t movevars; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t pm_showclip = { "pm_showclip", "0", 0, 0.0f, NULL }; -vec_t player_mins[4][3] = { - { -16.0f, -16.0f, -36.0f, }, - { -16.0f, -16.0f, -18.0f, }, - { 0.0f, 0.0f, 0.0f, }, - { -32.0f, -32.0f, -32.0f, } -}; -vec_t player_maxs[4][3] = { - { 16.0f, 16.0f, 36.0f, }, - { 16.0f, 16.0f, 18.0f, }, - { 0.0f, 0.0f, 0.0f, }, - { 32.0f, 32.0f, 32.0f, } -}; -#else //HOOK_ENGINE -cvar_t pm_showclip; -vec_t player_mins[4][3]; // vec_t player_mins[4][3]; -vec_t player_maxs[4][3]; // vec_t player_maxs[4][3]; +vec3_t player_mins[MAX_MAP_HULLS] = { + { -16.0f, -16.0f, -36.0f, }, + { -16.0f, -16.0f, -18.0f, }, + { 0.0f, 0.0f, 0.0f, }, + { -32.0f, -32.0f, -32.0f, } +}; -#endif //HOOK_ENGINE +vec3_t player_maxs[MAX_MAP_HULLS] = { + { 16.0f, 16.0f, 36.0f, }, + { 16.0f, 16.0f, 18.0f, }, + { 0.0f, 0.0f, 0.0f, }, + { 32.0f, 32.0f, 32.0f, } +}; qboolean PM_AddToTouched(pmtrace_t tr, vec_t *impactvelocity) { int i; - for (i = 0; i < pmove->numtouch; i++) { if (pmove->touchindex[i].ent == tr.ent) @@ -77,10 +66,7 @@ qboolean PM_AddToTouched(pmtrace_t tr, vec_t *impactvelocity) #endif } - tr.deltavelocity[0] = impactvelocity[0]; - tr.deltavelocity[1] = impactvelocity[1]; - tr.deltavelocity[2] = impactvelocity[2]; - + VectorCopy(impactvelocity, tr.deltavelocity); pmove->touchindex[pmove->numtouch++] = tr; return TRUE; @@ -106,52 +92,20 @@ void EXT_FUNC PM_StuckTouch(int hitent, pmtrace_t *ptraceresult) void PM_Init(playermove_t *ppm) { PM_InitBoxHull(); - for (int i = 0; i < 4; i++) + for (int i = 0; i < MAX_MAP_HULLS; i++) { - ppm->_player_mins[i][0] = player_mins[i][0]; - ppm->_player_mins[i][1] = player_mins[i][1]; - ppm->_player_mins[i][2] = player_mins[i][2]; - ppm->_player_maxs[i][0] = player_maxs[i][0]; - ppm->_player_maxs[i][1] = player_maxs[i][1]; - ppm->_player_maxs[i][2] = player_maxs[i][2]; + VectorCopy(player_mins[i], ppm->player_mins[i]); + VectorCopy(player_maxs[i], ppm->player_maxs[i]); } ppm->_movevars = &movevars; -#ifdef HOOK_ENGINE - *(size_t*)&ppm->PM_Info_ValueForKey = (size_t)GetOriginalFuncAddrOrDefault("Info_ValueForKey", (void *)Info_ValueForKey); - *(size_t*)&ppm->PM_Particle = (size_t)GetOriginalFuncAddrOrDefault("CL_Particle", (void *)CL_Particle); - *(size_t*)&ppm->PM_TestPlayerPosition = (size_t)GetOriginalFuncAddrOrDefault("PM_TestPlayerPosition", (void *)PM_TestPlayerPosition); - *(size_t*)&ppm->Con_NPrintf = (size_t)GetFuncRefAddrOrDefault("Con_NPrintf", (void *)Con_NPrintf); - *(size_t*)&ppm->Con_DPrintf = (size_t)GetFuncRefAddrOrDefault("Con_DPrintf", (void *)Con_DPrintf); - *(size_t*)&ppm->Con_Printf = (size_t)GetFuncRefAddrOrDefault("Con_Printf", (void *)Con_Printf); - *(size_t*)&ppm->Sys_FloatTime = (size_t)GetOriginalFuncAddrOrDefault("Sys_FloatTime", (void *)Sys_FloatTime); - *(size_t*)&ppm->PM_StuckTouch = (size_t)GetOriginalFuncAddrOrDefault("PM_StuckTouch", (void *)PM_StuckTouch); - *(size_t*)&ppm->PM_PointContents = (size_t)GetOriginalFuncAddrOrDefault("PM_PointContents", (void *)PM_PointContents); - *(size_t*)&ppm->PM_TruePointContents = (size_t)GetOriginalFuncAddrOrDefault("PM_TruePointContents", (void *)PM_TruePointContents); - *(size_t*)&ppm->PM_HullPointContents = (size_t)GetOriginalFuncAddrOrDefault("PM_HullPointContents", (void *)PM_HullPointContents); - *(size_t*)&ppm->PM_PlayerTrace = (size_t)GetOriginalFuncAddrOrDefault("PM_PlayerTrace", (void *)PM_PlayerTrace); - *(size_t*)&ppm->PM_TraceLine = (size_t)GetOriginalFuncAddrOrDefault("PM_TraceLine", (void *)PM_TraceLine); - *(size_t*)&ppm->PM_TraceModel = (size_t)GetOriginalFuncAddrOrDefault("PM_TraceModel", (void *)PM_TraceModel); - *(size_t*)&ppm->RandomLong = (size_t)GetOriginalFuncAddrOrDefault("RandomLong", (void *)RandomLong); - *(size_t*)&ppm->RandomFloat = (size_t)GetOriginalFuncAddrOrDefault("RandomFloat", (void *)RandomFloat); - *(size_t*)&ppm->PM_GetModelType = (size_t)GetOriginalFuncAddrOrDefault("PM_GetModelType", (void *)PM_GetModelType); - *(size_t*)&ppm->PM_HullForBsp = (size_t)GetOriginalFuncAddrOrDefault("PM_HullForBsp", (void *)PM_HullForBsp); - *(size_t*)&ppm->PM_GetModelBounds = (size_t)GetOriginalFuncAddrOrDefault("PM_GetModelBounds", (void *)PM_GetModelBounds); - *(size_t*)&ppm->COM_FileSize = (size_t)GetOriginalFuncAddrOrDefault("COM_FileSize", (void *)COM_FileSize); - *(size_t*)&ppm->COM_LoadFile = (size_t)GetOriginalFuncAddrOrDefault("COM_LoadFile", (void *)COM_LoadFile); - *(size_t*)&ppm->COM_FreeFile = (size_t)GetOriginalFuncAddrOrDefault("COM_FreeFile", (void *)COM_FreeFile); - *(size_t*)&ppm->memfgets = (size_t)GetOriginalFuncAddrOrDefault("memfgets", (void *)memfgets); - *(size_t*)&ppm->PM_PlayerTraceEx = (size_t)GetOriginalFuncAddrOrDefault("PM_PlayerTraceEx", (void *)PM_PlayerTraceEx); - *(size_t*)&ppm->PM_TestPlayerPositionEx = (size_t)GetOriginalFuncAddrOrDefault("PM_TestPlayerPositionEx", (void *)PM_TestPlayerPositionEx); - *(size_t*)&ppm->PM_TraceLineEx = (size_t)GetOriginalFuncAddrOrDefault("PM_TraceLineEx", (void *)PM_TraceLineEx); -#else ppm->PM_Info_ValueForKey = Info_ValueForKey; ppm->PM_Particle = CL_Particle; ppm->PM_TestPlayerPosition = PM_TestPlayerPosition; - ppm->Con_NPrintf = (void(*)(int idx, char *fmt, ...))Con_NPrintf; - ppm->Con_DPrintf = (void(*)(char *fmt, ...))Con_DPrintf; - ppm->Con_Printf = (void (*)(char *fmt, ...))Con_Printf; + ppm->Con_NPrintf = Con_NPrintf; + ppm->Con_DPrintf = Con_DPrintf; + ppm->Con_Printf = Con_Printf; ppm->Sys_FloatTime = Sys_FloatTime; ppm->PM_StuckTouch = PM_StuckTouch; ppm->PM_PointContents = PM_PointContents; @@ -163,7 +117,7 @@ void PM_Init(playermove_t *ppm) ppm->RandomLong = RandomLong; ppm->RandomFloat = RandomFloat; ppm->PM_GetModelType = PM_GetModelType; - ppm->PM_HullForBsp = (void *(__cdecl *)(physent_t *, float *))PM_HullForBsp; + ppm->PM_HullForBsp = PM_HullForBsp; ppm->PM_GetModelBounds = PM_GetModelBounds; ppm->COM_FileSize = COM_FileSize; ppm->COM_LoadFile = COM_LoadFile; @@ -172,5 +126,4 @@ void PM_Init(playermove_t *ppm) ppm->PM_PlayerTraceEx = PM_PlayerTraceEx; ppm->PM_TestPlayerPositionEx = PM_TestPlayerPositionEx; ppm->PM_TraceLineEx = PM_TraceLineEx; -#endif } diff --git a/rehlds/engine/pmove.h b/rehlds/engine/pmove.h index 9136f35..8748d3a 100644 --- a/rehlds/engine/pmove.h +++ b/rehlds/engine/pmove.h @@ -33,27 +33,14 @@ #include "pm_defs.h" #include "pm_movevars.h" - -#ifdef HOOK_ENGINE -#define pm_showclip (*ppm_showclip) - -#define player_mins (*pplayer_mins) -#define player_maxs (*pplayer_maxs) - -#define pmove (*ppmove) -#define movevars (*pmovevars) -#endif // HOOK_ENGINE - - extern cvar_t pm_showclip; -extern vec_t player_mins[4][3]; -extern vec_t player_maxs[4][3]; +extern vec3_t player_mins[MAX_MAP_HULLS]; +extern vec3_t player_maxs[MAX_MAP_HULLS]; extern playermove_t *pmove; extern movevars_t movevars; - qboolean PM_AddToTouched(pmtrace_t tr, vec_t *impactvelocity); void PM_StuckTouch(int hitent, pmtrace_t *ptraceresult); void PM_Init(playermove_t *ppm); diff --git a/rehlds/engine/pmovetst.h b/rehlds/engine/pmovetst.h index e44c9fa..078409b 100644 --- a/rehlds/engine/pmovetst.h +++ b/rehlds/engine/pmovetst.h @@ -33,13 +33,6 @@ #include "model.h" #include "world.h" -#ifdef HOOK_ENGINE -#define g_contentsresult (*pg_contentsresult) -#define box_hull_0 (*pbox_hull_0) -#define box_clipnodes_0 (*pbox_clipnodes_0) -#define box_planes_0 (*pbox_planes_0) -#endif // HOOK_ENGINE - extern int g_contentsresult; extern hull_t box_hull_0; extern box_clipnodes_t box_clipnodes_0; diff --git a/rehlds/engine/pr_cmds.cpp b/rehlds/engine/pr_cmds.cpp index f7ab9a8..1d6daca 100644 --- a/rehlds/engine/pr_cmds.cpp +++ b/rehlds/engine/pr_cmds.cpp @@ -60,19 +60,8 @@ int c_notvis; vec3_t vec_origin; int r_visframecount; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - sizebuf_t gMsgBuffer = { "MessageBegin/End", 0, gMsgData, sizeof(gMsgData), 0 }; -#else // HOOK_ENGINE - -sizebuf_t gMsgBuffer; - -#endif // HOOK_ENGINE - void EXT_FUNC PF_makevectors_I(const float *rgflVector) { AngleVectors(rgflVector, gGlobalVariables.v_forward, gGlobalVariables.v_right, gGlobalVariables.v_up); diff --git a/rehlds/engine/pr_cmds.h b/rehlds/engine/pr_cmds.h index 1f62fcc..ee209b2 100644 --- a/rehlds/engine/pr_cmds.h +++ b/rehlds/engine/pr_cmds.h @@ -49,30 +49,6 @@ enum AMBIENT_SOUND_NOT_LOOPING = BIT(5) }; -#define SPEAKER_START_SILENT 1 // wait for trigger 'on' to start announcements - - -#ifdef HOOK_ENGINE -#define gMsgData (*pgMsgData) -#define gMsgBuffer (*pgMsgBuffer) -#define gMsgEntity (*pgMsgEntity) -#define gMsgDest (*pgMsgDest) -#define gMsgType (*pgMsgType) -#define gMsgStarted (*pgMsgStarted) -#define gMsgOrigin (*pgMsgOrigin) -#define idum (*pidum) -#define g_groupop (*pg_groupop) -#define g_groupmask (*pg_groupmask) -#define checkpvs (*pcheckpvs) -#define c_invis (*pc_invis) -#define c_notvis (*pc_notvis) - -#define vec_origin (*pvec_origin) - -#define r_visframecount (*pr_visframecount) -#endif // HOOK_ENGINE - - extern unsigned char gMsgData[512]; extern sizebuf_t gMsgBuffer; extern edict_t *gMsgEntity; @@ -86,9 +62,7 @@ extern int g_groupmask; extern unsigned char checkpvs[1024]; extern int c_invis; extern int c_notvis; - extern vec3_t vec_origin; - extern int r_visframecount; enum diff --git a/rehlds/engine/r_studio.cpp b/rehlds/engine/r_studio.cpp index e9b5be0..333d108 100644 --- a/rehlds/engine/r_studio.cpp +++ b/rehlds/engine/r_studio.cpp @@ -65,25 +65,11 @@ mplane_t studio_planes[6 * STUDIO_NUM_HULLS]; float bonetransform[STUDIO_NUM_HULLS][3][4]; float rotationmatrix[3][4]; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t r_cachestudio = { "r_cachestudio", "1", 0, 0.0f, NULL }; sv_blending_interface_t svBlending = { 1, SV_StudioSetupBones }; sv_blending_interface_t *g_pSvBlendingAPI = &svBlending; server_studio_api_t server_studio_api = { Mem_Calloc, Cache_Check, COM_LoadCacheFile, Mod_Extradata }; -#else // HOOK_ENGINE - -cvar_t r_cachestudio; -sv_blending_interface_t svBlending; -sv_blending_interface_t *g_pSvBlendingAPI; -server_studio_api_t server_studio_api; - -#endif // HOOK_ENGINE - void SV_InitStudioHull(void) { if (studio_hull[0].planes == NULL) @@ -782,7 +768,7 @@ hull_t *SV_HullForStudioModel(const edict_t *pEdict, const vec_t *mins, const ve } } } - if (pEdict->v.gamestate == 1 && (g_bIsTerrorStrike == 1 || g_bIsCStrike == 1 || g_bIsCZero == 1)) + if (pEdict->v.gamestate == 1 && (g_eGameType == GT_TerrorStrike || g_eGameType == GT_CStrike || g_eGameType == GT_CZero)) bSkipShield = 1; if ((g_psv.models[pEdict->v.modelindex]->flags & FL_ONGROUND) || useComplexHull == TRUE) diff --git a/rehlds/engine/server.h b/rehlds/engine/server.h index 1b81492..1bf40bb 100644 --- a/rehlds/engine/server.h +++ b/rehlds/engine/server.h @@ -264,159 +264,6 @@ typedef struct deltacallback_s int offset; } deltacallback_t; - -#ifdef HOOK_ENGINE -#define pr_strings (*ppr_strings) -#define gNullString (*pgNullString) -#define scr_skipupdate (*pscr_skipupdate) -#define scr_centertime_off (*pscr_centertime_off) -#define g_LastScreenUpdateTime (*pg_LastScreenUpdateTime) - -#define SV_UPDATE_BACKUP (*pSV_UPDATE_BACKUP) -#define SV_UPDATE_MASK (*pSV_UPDATE_MASK) - -#define gGlobalVariables (*pgGlobalVariables) -#define g_psvs (*psvs) -#define g_psv (*psv) - -#define sv_lan (*psv_lan) -#define sv_lan_rate (*psv_lan_rate) -#define sv_aim (*psv_aim) - -#define sv_skycolor_r (*psv_skycolor_r) -#define sv_skycolor_g (*psv_skycolor_g) -#define sv_skycolor_b (*psv_skycolor_b) -#define sv_skyvec_x (*psv_skyvec_x) -#define sv_skyvec_y (*psv_skyvec_y) -#define sv_skyvec_z (*psv_skyvec_z) -#define sv_skyname (*psv_skyname) - -#define sv_spectatormaxspeed (*psv_spectatormaxspeed) -#define sv_airaccelerate (*psv_airaccelerate) -#define sv_wateraccelerate (*psv_wateraccelerate) -#define sv_waterfriction (*psv_waterfriction) -#define sv_zmax (*psv_zmax) -#define sv_wateramp (*psv_wateramp) -#define mapcyclefile (*pmapcyclefile) -#define motdfile (*pmotdfile) -#define servercfgfile (*pservercfgfile) -#define lservercfgfile (*plservercfgfile) -#define logsdir (*plogsdir) -#define bannedcfgfile (*pbannedcfgfile) - -#define sv_decalnames (*psv_decalnames) -#define sv_decalnamecount (*psv_decalnamecount) - -#define sv_gpNewUserMsgs (*psv_gpNewUserMsgs) -#define sv_gpUserMsgs (*psv_gpUserMsgs) - -#define g_svmove (*pg_svmove) - -#define sv_lastnum (*psv_lastnum) -#define g_sv_instance_baselines (*pg_sv_instance_baselines) -#define g_bOutOfDateRestart (*pg_bOutOfDateRestart) -#define g_userid (*pg_userid) - -#define g_sv_delta (*pg_sv_delta) -#define g_peventdelta (*pg_peventdelta) - -#define rcon_password (*prcon_password) -#define sv_enableoldqueries (*psv_enableoldqueries) -#define sv_instancedbaseline (*psv_instancedbaseline) -#define sv_contact (*psv_contact) -#define sv_maxupdaterate (*psv_maxupdaterate) -#define sv_minupdaterate (*psv_minupdaterate) -#define sv_filterban (*psv_filterban) -#define sv_minrate (*psv_minrate) -#define sv_maxrate (*psv_maxrate) -#define sv_logrelay (*psv_logrelay) -#define violence_hblood (*pviolence_hblood) -#define violence_ablood (*pviolence_ablood) -#define violence_hgibs (*pviolence_hgibs) -#define violence_agibs (*pviolence_agibs) -#define sv_newunit (*psv_newunit) -#define sv_clienttrace (*psv_clienttrace) -#define sv_timeout (*psv_timeout) -#define sv_failuretime (*psv_failuretime) - -#define sv_cheats (*psv_cheats) -#define sv_password (*psv_password) -#define sv_proxies (*psv_proxies) -#define sv_outofdatetime (*psv_outofdatetime) -#define mapchangecfgfile (*pmapchangecfgfile) - -#define allow_cheats (*pallow_cheats) -#define mp_logecho (*pmp_logecho) -#define mp_logfile (*pmp_logfile) - -#define sv_allow_download (*psv_allow_download) -#define sv_send_logos (*psv_send_logos) -#define sv_send_resources (*psv_send_resources) -#define sv_log_singleplayer (*psv_log_singleplayer) -#define sv_logsecret (*psv_logsecret) -#define sv_log_onefile (*psv_log_onefile) -#define sv_logbans (*psv_logbans) -#define sv_allow_upload (*psv_allow_upload) -#define sv_max_upload (*psv_max_upload) -#define hpk_maxsize (*phpk_maxsize) -#define sv_visiblemaxplayers (*psv_visiblemaxplayers) -#define max_queries_sec (*pmax_queries_sec) -#define max_queries_sec_global (*pmax_queries_sec_global) -#define max_queries_window (*pmax_queries_window) -#define sv_logblocks (*psv_logblocks) -#define sv_downloadurl (*psv_downloadurl) -#define sv_allow_dlfile (*psv_allow_dlfile) -#define sv_version (*psv_version) -#define sv_playermodel (*psv_playermodel) - -#define outputbuf (*poutputbuf) -#define sv_redirected (*psv_redirected) -#define sv_redirectto (*psv_redirectto) - -#define sv_rcon_minfailures (*psv_rcon_minfailures) -#define sv_rcon_maxfailures (*psv_rcon_maxfailures) -#define sv_rcon_minfailuretime (*psv_rcon_minfailuretime) -#define sv_rcon_banpenalty (*psv_rcon_banpenalty) - -#define scr_downloading (*pscr_downloading) - -#define g_bCS_CZ_Flags_Initialized (*pg_bCS_CZ_Flags_Initialized) -#define g_bIsCZero (*pg_bIsCZero) -#define g_bIsCZeroRitual (*pg_bIsCZeroRitual) -#define g_bIsTerrorStrike (*pg_bIsTerrorStrike) -#define g_bIsTFC (*pg_bIsTFC) -#define g_bIsHL1 (*pg_bIsHL1) -#define g_bIsCStrike (*pg_bIsCStrike) - -#define fatbytes (*pfatbytes) -#define fatpvs (*pfatpvs) -#define fatpasbytes (*pfatpasbytes) -#define fatpas (*pfatpas) -#define gPacketSuppressed (*pgPacketSuppressed) -#define giNextUserMsg (*pgiNextUserMsg) -#define hashstrings_collisions (*phashstrings_collisions) - -#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 localinfo (*plocalinfo) -#define localmodels (*plocalmodels) - -#define ipfilters (*pipfilters) -#define numipfilters (*pnumipfilters) -#define userfilters (*puserfilters) -#define numuserfilters (*pnumuserfilters) - -#define g_rg_sv_challenges (*pg_rg_sv_challenges) - -#define g_svdeltacallback (*pg_svdeltacallback) - -#endif // HOOK_ENGINE - - extern char *pr_strings; extern char *gNullString; extern qboolean scr_skipupdate; @@ -547,7 +394,6 @@ extern cvar_t sv_rcon_banpenalty; extern cvar_t scr_downloading; -#ifdef REHLDS_FIXES enum GameType_e { GT_Unitialized, @@ -558,24 +404,8 @@ enum GameType_e GT_HL1, GT_CStrike }; -extern GameType_e g_eGameType; -// A crutch to prevent rewriting tons of code. -#define g_bIsCZero (g_eGameType == GT_CZero) -#define g_bIsCZeroRitual (g_eGameType == GT_CZeroRitual) -#define g_bIsTerrorStrike (g_eGameType == GT_TerrorStrike) -#define g_bIsTFC (g_eGameType == GT_TFC) -#define g_bIsHL1 (g_eGameType == GT_HL1) -#define g_bIsCStrike (g_eGameType == GT_CStrike) -#else // REHLDS_FIXES -extern int g_bCS_CZ_Flags_Initialized; -extern int g_bIsCZero; -extern int g_bIsCZeroRitual; -extern int g_bIsTerrorStrike; -extern int g_bIsTFC; -extern int g_bIsHL1; -extern int g_bIsCStrike; -#endif // REHLDS_FIXES +extern GameType_e g_eGameType; extern int fatbytes; extern int giNextUserMsg; @@ -590,7 +420,6 @@ extern delta_t *g_pweapondelta; extern delta_t *g_pusercmddelta; #endif - extern unsigned char fatpvs[1024]; extern int fatpasbytes; extern unsigned char fatpas[1024]; @@ -607,11 +436,6 @@ extern int numuserfilters; extern challenge_t g_rg_sv_challenges[MAX_CHALLENGES]; - -#ifdef HOOK_ENGINE -#define g_rgRconFailures (*pg_rgRconFailures) -#endif // HOOK_ENGINE - extern rcon_failure_t g_rgRconFailures[32]; extern deltacallback_t g_svdeltacallback; diff --git a/rehlds/engine/studio_rehlds.h b/rehlds/engine/studio_rehlds.h index e7e3c31..806b24b 100644 --- a/rehlds/engine/studio_rehlds.h +++ b/rehlds/engine/studio_rehlds.h @@ -42,30 +42,6 @@ typedef mplane_t studio_planes_t[STUDIO_NUM_PLANES]; typedef r_studiocache_t rgStudioCache_t[STUDIO_CACHE_SIZE]; typedef float bonetransform_t[STUDIO_NUM_HULLS][3][4]; -#ifdef HOOK_ENGINE - -#define cache_hull_hitgroup (*pcache_hull_hitgroup) -#define cache_hull (*pcache_hull) -#define cache_planes (*pcache_planes) - -#define pstudiohdr (*ppstudiohdr) -#define studio_hull (*pstudio_hull) -#define studio_hull_hitgroup (*pstudio_hull_hitgroup) -#define studio_clipnodes (*pstudio_clipnodes) -#define studio_planes (*pstudio_planes) -#define rgStudioCache (*prgStudioCache) -#define r_cachecurrent (*pr_cachecurrent) -#define nCurrentHull (*pnCurrentHull) -#define nCurrentPlane (*pnCurrentPlane) -#define bonetransform (*pbonetransform) -#define g_pSvBlendingAPI (*pg_pSvBlendingAPI) -#define svBlending (*psvBlending) -#define server_studio_api (*pserver_studio_api) -#define r_cachestudio (*pr_cachestudio) -#define rotationmatrix (*protationmatrix) - -#endif // HOOK_ENGINE - extern int cache_hull_hitgroup[128]; extern hull_t cache_hull[128]; extern mplane_t cache_planes[768]; diff --git a/rehlds/engine/sv_log.cpp b/rehlds/engine/sv_log.cpp index 9193853..48e8c43 100644 --- a/rehlds/engine/sv_log.cpp +++ b/rehlds/engine/sv_log.cpp @@ -30,21 +30,9 @@ LOGLIST_T *firstLog; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t mp_logecho = { "mp_logecho", "1", 0, 0.0f, NULL }; cvar_t mp_logfile = { "mp_logfile", "1", FCVAR_SERVER, 0.0f, NULL }; -#else // HOOK_ENGINE - -cvar_t mp_logecho; -cvar_t mp_logfile; - -#endif // HOOK_ENGINE - void Log_Printf(const char *fmt, ...) { va_list argptr; diff --git a/rehlds/engine/sv_log.h b/rehlds/engine/sv_log.h index f7c5bad..77ba00b 100644 --- a/rehlds/engine/sv_log.h +++ b/rehlds/engine/sv_log.h @@ -36,10 +36,6 @@ typedef struct loglist struct loglist *next; } LOGLIST_T; -#ifdef HOOK_ENGINE -#define firstLog (*pfirstLog) -#endif // HOOK_ENGINE - extern LOGLIST_T *firstLog; void Log_Printf(const char *fmt, ...); diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 5882001..0975703 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -99,25 +99,9 @@ char outputbuf[MAX_ROUTEABLE_PACKET]; redirect_t sv_redirected; netadr_t sv_redirectto; -// DONE: make one global var with mods enum. -#ifdef REHLDS_FIXES GameType_e g_eGameType = GT_Unitialized; -#else -int g_bCS_CZ_Flags_Initialized; -int g_bIsCZero; -int g_bIsCZeroRitual; -int g_bIsTerrorStrike; -int g_bIsTFC; -int g_bIsHL1; -int g_bIsCStrike; -#endif qboolean allow_cheats; -/* - * Globals initialization - */ -#ifndef HOOK_ENGINE - char *gNullString = ""; int SV_UPDATE_BACKUP = SINGLEPLAYER_BACKUP; int SV_UPDATE_MASK = (SINGLEPLAYER_BACKUP - 1); @@ -209,97 +193,6 @@ cvar_t sv_rcon_banpenalty = { "sv_rcon_banpenalty", "0", 0, 0.0f, NULL }; cvar_t scr_downloading = { "scr_downloading", "0", 0, 0.0f, NULL }; -#else //HOOK_ENGINE - -char *gNullString; -int SV_UPDATE_BACKUP; -int SV_UPDATE_MASK; -int giNextUserMsg; - -cvar_t sv_lan; -cvar_t sv_lan_rate; -cvar_t sv_aim; - -cvar_t sv_skycolor_r; -cvar_t sv_skycolor_g; -cvar_t sv_skycolor_b; -cvar_t sv_skyvec_x; -cvar_t sv_skyvec_y; -cvar_t sv_skyvec_z; - -cvar_t sv_spectatormaxspeed; -cvar_t sv_airaccelerate; -cvar_t sv_wateraccelerate; -cvar_t sv_waterfriction; -cvar_t sv_zmax; -cvar_t sv_wateramp; - -cvar_t sv_skyname; -cvar_t mapcyclefile; -cvar_t motdfile; -cvar_t servercfgfile; -cvar_t lservercfgfile; -cvar_t logsdir; -cvar_t bannedcfgfile; - -int g_userid; - -cvar_t rcon_password; -cvar_t sv_enableoldqueries; - -cvar_t sv_instancedbaseline; -cvar_t sv_contact; -cvar_t sv_maxupdaterate; -cvar_t sv_minupdaterate; -cvar_t sv_filterban; -cvar_t sv_minrate; -cvar_t sv_maxrate; -cvar_t sv_logrelay; - -cvar_t violence_hblood; -cvar_t violence_ablood; -cvar_t violence_hgibs; -cvar_t violence_agibs; -cvar_t sv_newunit; - -cvar_t sv_clienttrace; -cvar_t sv_timeout; -cvar_t sv_failuretime; -cvar_t sv_cheats; -cvar_t sv_password; -cvar_t sv_proxies; -cvar_t sv_outofdatetime; -cvar_t mapchangecfgfile; - -cvar_t sv_allow_download; -cvar_t sv_send_logos; -cvar_t sv_send_resources; -cvar_t sv_log_singleplayer; -cvar_t sv_logsecret; -cvar_t sv_log_onefile; -cvar_t sv_logbans; -cvar_t sv_allow_upload; -cvar_t sv_max_upload; -cvar_t hpk_maxsize; -cvar_t sv_visiblemaxplayers; - -cvar_t max_queries_sec; -cvar_t max_queries_sec_global; -cvar_t max_queries_window; -cvar_t sv_logblocks; -cvar_t sv_downloadurl; -cvar_t sv_allow_dlfile; -cvar_t sv_version; - -cvar_t sv_rcon_minfailures; -cvar_t sv_rcon_maxfailures; -cvar_t sv_rcon_minfailuretime; -cvar_t sv_rcon_banpenalty; - -cvar_t scr_downloading; - -#endif //HOOK_ENGINE - #ifdef REHLDS_FIXES cvar_t sv_echo_unknown_cmd = { "sv_echo_unknown_cmd", "0", 0, 0.0f, NULL }; cvar_t sv_auto_precache_sounds_in_models = { "sv_auto_precache_sounds_in_models", "0", 0, 0.0f, nullptr }; @@ -1417,9 +1310,9 @@ void SV_WriteClientdataToMessage(client_t *client, sizebuf_t *msg) if (globalGameTime > 0.0f) globalGameTime -= (float)g_GameClients[host_client - g_psvs.clients]->GetLocalGameTimeBase(); }; - if (g_bIsCStrike || g_bIsCZero) + if (g_eGameType == GT_CStrike || g_eGameType == GT_CZero) convertGlobalGameTimeToLocal(std::ref(tdata->m_fAimedDamage)); - if (g_bIsHL1 || g_bIsCStrike || g_bIsCZero) + if (g_eGameType == GT_HL1 || g_eGameType == GT_CStrike || g_eGameType == GT_CZero) { convertGlobalGameTimeToLocal(std::ref(tdata->fuser2)); convertGlobalGameTimeToLocal(std::ref(tdata->fuser3)); @@ -5670,64 +5563,32 @@ NOXREF void SV_ReconnectAllClients(void) void SetCStrikeFlags(void) { -#ifdef REHLDS_FIXES - if(g_eGameType==GT_Unitialized) -#else - if (!g_bCS_CZ_Flags_Initialized) // DONE: Convert these to enum -#endif + if (g_eGameType == GT_Unitialized) { if (!Q_stricmp(com_gamedir, "valve")) { -#ifdef REHLDS_FIXES g_eGameType = GT_HL1; -#else - g_bIsHL1 = 1; -#endif } else if (!Q_stricmp(com_gamedir, "cstrike") || !Q_stricmp(com_gamedir, "cstrike_beta")) { -#ifdef REHLDS_FIXES g_eGameType = GT_CStrike; -#else - g_bIsCStrike = 1; -#endif } else if (!Q_stricmp(com_gamedir, "czero")) { -#ifdef REHLDS_FIXES g_eGameType = GT_CZero; -#else - g_bIsCZero = 1; -#endif } else if (!Q_stricmp(com_gamedir, "czeror")) { -#ifdef REHLDS_FIXES g_eGameType = GT_CZeroRitual; -#else - g_bIsCZeroRitual = 1; -#endif } else if (!Q_stricmp(com_gamedir, "terror")) { -#ifdef REHLDS_FIXES g_eGameType = GT_TerrorStrike; -#else - g_bIsTerrorStrike = 1; -#endif } else if (!Q_stricmp(com_gamedir, "tfc")) { -#ifdef REHLDS_FIXES g_eGameType = GT_TFC; -#else - g_bIsTFC = 1; -#endif } - -#ifndef REHLDS_FIXES - g_bCS_CZ_Flags_Initialized = 1; -#endif } } @@ -7819,36 +7680,6 @@ void SV_InitEncoders(void) void SV_Init(void) { -#ifdef HOOK_ENGINE - - Cmd_AddCommand("banid", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_BanId_f", (void *)SV_BanId_f)); - Cmd_AddCommand("removeid", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_RemoveId_f", (void *)SV_RemoveId_f)); - Cmd_AddCommand("listid", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_ListId_f", (void *)SV_ListId_f)); - Cmd_AddCommand("writeid", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_WriteId_f", (void *)SV_WriteId_f)); - Cmd_AddCommand("resetrcon", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_ResetRcon_f", (void *)SV_ResetRcon_f)); - Cmd_AddCommand("logaddress", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_SetLogAddress_f", (void *)SV_SetLogAddress_f)); - Cmd_AddCommand("logaddress_add", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_AddLogAddress_f", (void *)SV_AddLogAddress_f)); - Cmd_AddCommand("logaddress_del", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_DelLogAddress_f", (void *)SV_DelLogAddress_f)); - Cmd_AddCommand("log", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_ServerLog_f", (void *)SV_ServerLog_f)); - Cmd_AddCommand("serverinfo", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_Serverinfo_f", (void *)SV_Serverinfo_f)); - Cmd_AddCommand("localinfo", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_Localinfo_f", (void *)SV_Localinfo_f)); - Cmd_AddCommand("showinfo", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_ShowServerinfo_f", (void *)SV_ShowServerinfo_f)); - Cmd_AddCommand("user", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_User_f", (void *)SV_User_f)); - Cmd_AddCommand("users", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_Users_f", (void *)SV_Users_f)); - Cmd_AddCommand("dlfile", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_BeginFileDownload_f", (void *)SV_BeginFileDownload_f)); - Cmd_AddCommand("addip", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_AddIP_f", (void *)SV_AddIP_f)); - Cmd_AddCommand("removeip", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_RemoveIP_f", (void *)SV_RemoveIP_f)); - Cmd_AddCommand("listip", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_ListIP_f", (void *)SV_ListIP_f)); - Cmd_AddCommand("writeip", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_WriteIP_f", (void *)SV_WriteIP_f)); - Cmd_AddCommand("dropclient", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_Drop_f", (void *)SV_Drop_f)); - Cmd_AddCommand("spawn", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_Spawn_f", (void *)SV_Spawn_f)); - Cmd_AddCommand("new", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_New_f", (void *)SV_New_f)); - Cmd_AddCommand("sendres", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_SendRes_f", (void *)SV_SendRes_f)); - Cmd_AddCommand("sendents", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_SendEnts_f", (void *)SV_SendEnts_f)); - Cmd_AddCommand("fullupdate", (xcommand_t)GetOriginalFuncAddrOrDefault("SV_FullUpdate_f", (void *)SV_FullUpdate_f)); - -#else // HOOK_ENGINE - Cmd_AddCommand("banid", SV_BanId_f); Cmd_AddCommand("removeid", SV_RemoveId_f); Cmd_AddCommand("listid", SV_ListId_f); @@ -7875,8 +7706,6 @@ void SV_Init(void) Cmd_AddCommand("sendents", SV_SendEnts_f); Cmd_AddCommand("fullupdate", SV_FullUpdate_f); -#endif // HOOK_ENGINE - Cvar_RegisterVariable(&sv_failuretime); Cvar_RegisterVariable(&sv_voiceenable); Cvar_RegisterVariable(&rcon_password); diff --git a/rehlds/engine/sv_phys.cpp b/rehlds/engine/sv_phys.cpp index fe14441..fd503a6 100644 --- a/rehlds/engine/sv_phys.cpp +++ b/rehlds/engine/sv_phys.cpp @@ -45,11 +45,6 @@ vec3_t *g_moved_from; edict_t **g_moved_edict; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t sv_maxvelocity = { "sv_maxvelocity", "2000", 0, 0.0f, NULL }; cvar_t sv_gravity = { "sv_gravity", "800", FCVAR_SERVER, 0.0f, NULL }; cvar_t sv_bounce = { "sv_bounce", "1", FCVAR_SERVER, 0.0f, NULL }; @@ -57,17 +52,6 @@ cvar_t sv_stepsize = { "sv_stepsize", "18", FCVAR_SERVER, 0.0f, NULL }; cvar_t sv_friction = { "sv_friction", "4", FCVAR_SERVER, 0.0f, NULL }; cvar_t sv_stopspeed = { "sv_stopspeed", "100", FCVAR_SERVER, 0.0f, NULL }; -#else // HOOK_ENGINE - -cvar_t sv_maxvelocity; -cvar_t sv_gravity; -cvar_t sv_bounce; -cvar_t sv_stepsize; -cvar_t sv_friction; -cvar_t sv_stopspeed; - -#endif // HOOK_ENGINE - NOXREF void SV_CheckAllEnts() { NOXREFCHECK; diff --git a/rehlds/engine/sv_phys.h b/rehlds/engine/sv_phys.h index 4ac0e7f..ca647ee 100644 --- a/rehlds/engine/sv_phys.h +++ b/rehlds/engine/sv_phys.h @@ -32,17 +32,6 @@ #include "model.h" #include "cvar.h" -#ifdef HOOK_ENGINE -#define sv_maxvelocity (*psv_maxvelocity) -#define sv_gravity (*psv_gravity) -#define sv_bounce (*psv_bounce) -#define sv_stepsize (*psv_stepsize) -#define sv_friction (*psv_friction) -#define sv_stopspeed (*psv_stopspeed) -#define g_moved_from (*pg_moved_from) -#define g_moved_edict (*pg_moved_edict) -#endif - extern cvar_t sv_maxvelocity; extern cvar_t sv_gravity; extern cvar_t sv_bounce; diff --git a/rehlds/engine/sv_remoteaccess.cpp b/rehlds/engine/sv_remoteaccess.cpp index 1dcc1ca..e230577 100644 --- a/rehlds/engine/sv_remoteaccess.cpp +++ b/rehlds/engine/sv_remoteaccess.cpp @@ -337,9 +337,4 @@ void NotifyDedicatedServerUI(const char *message) g_ServerRemoteAccess.SendMessageToAdminUI(message); } - -#ifndef HOOK_ENGINE - EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CServerRemoteAccess, IGameServerData, GAMESERVERDATA_INTERFACE_VERSION, g_ServerRemoteAccess) - -#endif //HOOK_ENGINE diff --git a/rehlds/engine/sv_remoteaccess.h b/rehlds/engine/sv_remoteaccess.h index 45ce5af..f5686a7 100644 --- a/rehlds/engine/sv_remoteaccess.h +++ b/rehlds/engine/sv_remoteaccess.h @@ -63,10 +63,5 @@ public: void GetMapList(CUtlBuffer &value); }; -#ifdef HOOK_ENGINE -#define g_ServerRemoteAccess (*pg_ServerRemoteAccess) -#endif - -extern class CServerRemoteAccess g_ServerRemoteAccess; - +extern CServerRemoteAccess g_ServerRemoteAccess; extern void NotifyDedicatedServerUI(const char *message); diff --git a/rehlds/engine/sv_steam3.h b/rehlds/engine/sv_steam3.h index 16a4ff6..ed54bb0 100644 --- a/rehlds/engine/sv_steam3.h +++ b/rehlds/engine/sv_steam3.h @@ -119,11 +119,6 @@ public: void RunFrame(); }; -#ifdef HOOK_ENGINE -#define s_Steam3Server (*ps_Steam3Server) -#define s_Steam3Client (*ps_Steam3Client) -#endif // HOOK_ENGINE - extern CSteam3Server *s_Steam3Server; extern CSteam3Client s_Steam3Client; diff --git a/rehlds/engine/sv_user.cpp b/rehlds/engine/sv_user.cpp index 18ffa41..3e036ad 100644 --- a/rehlds/engine/sv_user.cpp +++ b/rehlds/engine/sv_user.cpp @@ -46,11 +46,6 @@ edict_t *sv_player; //int giSkip; qboolean nofind; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - #if defined(SWDS) && defined(REHLDS_FIXES) command_t clcommands[] = { "status", "name", "kill", "pause", "spawn", "new", "sendres", "dropclient", "kick", "ping", "dlfile", "setinfo", "sendents", "fullupdate", "setpause", "unpause", NULL }; #else @@ -71,43 +66,21 @@ cvar_t mp_consistency = { "mp_consistency", "1", FCVAR_SERVER, 0.0f, NULL }; cvar_t sv_voiceenable = { "sv_voiceenable", "1", FCVAR_SERVER | FCVAR_ARCHIVE, 0.0f, NULL }; clc_func_t sv_clcfuncs[] = { - { clc_bad, "clc_bad", NULL }, - { clc_nop, "clc_nop", NULL }, - { clc_move, "clc_move", &SV_ParseMove }, - { clc_stringcmd, "clc_stringcmd", &SV_ParseStringCommand }, - { clc_delta, "clc_delta", &SV_ParseDelta }, - { clc_resourcelist, "clc_resourcelist", &SV_ParseResourceList }, - { clc_tmove, "clc_tmove", NULL }, - { clc_fileconsistency, "clc_fileconsistency", &SV_ParseConsistencyResponse }, - { clc_voicedata, "clc_voicedata", &SV_ParseVoiceData }, - { clc_hltv, "clc_hltv", &SV_IgnoreHLTV }, - { clc_cvarvalue, "clc_cvarvalue", &SV_ParseCvarValue }, - { clc_cvarvalue2, "clc_cvarvalue2", &SV_ParseCvarValue2 }, - - { clc_endoflist, "End of List", NULL }, + { clc_bad, "clc_bad", nullptr }, + { clc_nop, "clc_nop", nullptr }, + { clc_move, "clc_move", &SV_ParseMove }, + { clc_stringcmd, "clc_stringcmd", &SV_ParseStringCommand }, + { clc_delta, "clc_delta", &SV_ParseDelta }, + { clc_resourcelist, "clc_resourcelist", &SV_ParseResourceList }, + { clc_tmove, "clc_tmove", nullptr }, + { clc_fileconsistency, "clc_fileconsistency", &SV_ParseConsistencyResponse }, + { clc_voicedata, "clc_voicedata", &SV_ParseVoiceData }, + { clc_hltv, "clc_hltv", &SV_IgnoreHLTV }, + { clc_cvarvalue, "clc_cvarvalue", &SV_ParseCvarValue }, + { clc_cvarvalue2, "clc_cvarvalue2", &SV_ParseCvarValue2 }, + { clc_endoflist, "End of List", nullptr }, }; -#else // HOOK_ENGINE - -command_t clcommands[23]; - -cvar_t sv_edgefriction; -cvar_t sv_maxspeed; -cvar_t sv_accelerate; -cvar_t sv_footsteps; -cvar_t sv_rollspeed; -cvar_t sv_rollangle; -cvar_t sv_unlag; -cvar_t sv_maxunlag; -cvar_t sv_unlagpush; -cvar_t sv_unlagsamples; -cvar_t mp_consistency; -cvar_t sv_voiceenable; - -clc_func_t sv_clcfuncs[12]; - -#endif // HOOK_ENGINE - bool EXT_FUNC SV_CheckConsistencyResponse_API(IGameClient *client, resource_t *res, uint32 hash) { return (hash != *(uint32 *)&res->rgucMD5_hash[0]); } diff --git a/rehlds/engine/sv_user.h b/rehlds/engine/sv_user.h index 92f4808..8da3360 100644 --- a/rehlds/engine/sv_user.h +++ b/rehlds/engine/sv_user.h @@ -58,41 +58,11 @@ typedef struct clc_func_s void(*pfnParse)(client_t *); } clc_func_t; -#ifdef HOOK_ENGINE -#define sv_player (*psv_player) -#define clcommands (*pclcommands) -#define truepositions (*ptruepositions) -#define g_balreadymoved (*pg_balreadymoved) -#define sv_clcfuncs (*psv_clcfuncs) - -#define s_LastFullUpdate (*ps_LastFullUpdate) -#define sv_edgefriction (*psv_edgefriction) -#define sv_maxspeed (*psv_maxspeed) -#define sv_accelerate (*psv_accelerate) -#define sv_footsteps (*psv_footsteps) -#define sv_rollspeed (*psv_rollspeed) -#define sv_rollangle (*psv_rollangle) -#define sv_unlag (*psv_unlag) -#define sv_maxunlag (*psv_maxunlag) -#define sv_unlagpush (*psv_unlagpush) -#define sv_unlagsamples (*psv_unlagsamples) -#define mp_consistency (*pmp_consistency) -#define sv_voiceenable (*psv_voiceenable) - -#define nofind (*pnofind) - -#endif // HOOK_ENGINE - extern edict_t *sv_player; extern command_t clcommands[23]; extern sv_adjusted_positions_t truepositions[MAX_CLIENTS]; extern qboolean g_balreadymoved; -#ifdef HOOK_ENGINE -extern clc_func_t sv_clcfuncs[12]; -#else -#endif - extern float s_LastFullUpdate[33]; extern cvar_t sv_edgefriction; extern cvar_t sv_maxspeed; diff --git a/rehlds/engine/sys_dll.cpp b/rehlds/engine/sys_dll.cpp index 39c799b..86d2ae3 100644 --- a/rehlds/engine/sys_dll.cpp +++ b/rehlds/engine/sys_dll.cpp @@ -93,11 +93,6 @@ double g_StartTime; int g_WinNTOrHigher; #endif // _WIN32 -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - int g_FPUCW_Mask_Prec_64Bit = 0; int g_FPUCW_Mask_Prec_64Bit_2 = 0; int g_FPUCW_Mask_Round_Trunc = 0; @@ -196,19 +191,6 @@ enginefuncs_t g_engfuncsExportedToDlls = { EngCheckParm }; -#else // HOOK_ENGINE - -int g_FPUCW_Mask_Prec_64Bit; -int g_FPUCW_Mask_Prec_64Bit_2; -int g_FPUCW_Mask_Round_Trunc; -int g_FPUCW_Mask_Round_Up; - -FileFindHandle_t g_hfind; - -enginefuncs_t g_engfuncsExportedToDlls; - -#endif // HOOK_ENGINE - #ifdef _WIN32 void Sys_SetupFPUOptions() { @@ -1296,12 +1278,7 @@ void Con_Init(void) { con_debuglog = COM_CheckParm("-condebug"); Con_DPrintf("Console initialized.\n"); - -#ifdef HOOK_ENGINE - Cmd_AddCommand("condebug", (xcommand_t)GetOriginalFuncAddrOrDefault("Con_Debug_f", (void *)Con_Debug_f)); -#else Cmd_AddCommand("condebug", Con_Debug_f); -#endif } void Con_DebugLog(const char *file, const char *fmt, ...) diff --git a/rehlds/engine/sys_dll.h b/rehlds/engine/sys_dll.h index 024ccde..630235b 100644 --- a/rehlds/engine/sys_dll.h +++ b/rehlds/engine/sys_dll.h @@ -39,36 +39,6 @@ const int MAX_DISCONNECT_REASON = 256; -#ifdef HOOK_ENGINE -#define g_hfind (*pg_hfind) - -#define g_engfuncsExportedToDlls (*pg_engfuncsExportedToDlls) - -#define gszDisconnectReason (*pgszDisconnectReason) -#define gszExtendedDisconnectReason (*pgszExtendedDisconnectReason) -#define gfExtendedError (*pgfExtendedError) -#define g_bIsDedicatedServer (*pg_bIsDedicatedServer) -#define giSubState (*pgiSubState) -#define giActive (*pgiActive) -#define giStateInfo (*pgiStateInfo) -#define gEntityInterface (*pgEntityInterface) -#define gNewDLLFunctions (*pgNewDLLFunctions) -#define g_modfuncs (*pg_modfuncs) -#define g_rgextdll (*pg_rgextdll) -#define g_iextdllMac (*pg_iextdllMac) -#define gmodinfo (*pgmodinfo) -#define gfBackground (*pgfBackground) - -#ifndef _WIN32 -#define gHasMMXTechnology (*pgHasMMXTechnology) -#endif - -#define con_debuglog (*pcon_debuglog) -#define g_bPrintingKeepAliveDots (*pg_bPrintingKeepAliveDots) -#define Launcher_ConsolePrintf (*pLauncher_ConsolePrintf) -#endif // HOOK_ENGINE - - extern FileFindHandle_t g_hfind; extern enginefuncs_t g_engfuncsExportedToDlls; @@ -83,8 +53,6 @@ extern int giStateInfo; extern DLL_FUNCTIONS gEntityInterface; extern NEW_DLL_FUNCTIONS gNewDLLFunctions; extern modfuncs_t g_modfuncs; - - extern extensiondll_t g_rgextdll[50]; extern int g_iextdllMac; @@ -100,23 +68,6 @@ extern qboolean con_debuglog; extern void(*Launcher_ConsolePrintf)(char *, ...); #ifdef _WIN32 - #ifdef HOOK_ENGINE - #define g_PerfCounterInitialized (*pg_PerfCounterInitialized) - #define g_PerfCounterMutex (*pg_PerfCounterMutex) - - #define g_PerfCounterShiftRightAmount (*pg_PerfCounterShiftRightAmount) - #define g_PerfCounterSlice (*pg_PerfCounterSlice) - #define g_CurrentTime (*pg_CurrentTime) - #define g_StartTime (*pg_StartTime) - - #define g_FPUCW_Mask_Prec_64Bit (*pg_FPUCW_Mask_Prec_64Bit) - #define g_FPUCW_Mask_Prec_64Bit_2 (*pg_FPUCW_Mask_Prec_64Bit_2) - #define g_FPUCW_Mask_Round_Trunc (*pg_FPUCW_Mask_Round_Trunc) - #define g_FPUCW_Mask_Round_Up (*pg_FPUCW_Mask_Round_Up) - - #define g_WinNTOrHigher (*pg_WinNTOrHigher) - #endif - extern int g_PerfCounterInitialized; extern CRITICAL_SECTION g_PerfCounterMutex; diff --git a/rehlds/engine/sys_dll2.cpp b/rehlds/engine/sys_dll2.cpp index 1850b84..75aee66 100644 --- a/rehlds/engine/sys_dll2.cpp +++ b/rehlds/engine/sys_dll2.cpp @@ -33,23 +33,10 @@ qboolean g_bIsWin95; qboolean g_bIsWin98; double g_flLastSteamProgressUpdateTime; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - char *szCommonPreloads = "multiplayer_preloads"; char *szReslistsBaseDir = "reslists"; char *szReslistsExt = ".lst"; -#else // HOOK_ENGINE - -char *szCommonPreloads; -char *szReslistsBaseDir; -char *szReslistsExt; - -#endif // HOOK_ENGINE - const char *GetCurrentSteamAppName(void) { if (!Q_stricmp(com_gamedir, "cstrike") || !Q_stricmp(com_gamedir, "cstrike_beta")) @@ -580,9 +567,7 @@ public: } }; -#ifndef HOOK_ENGINE EXPOSE_SINGLE_INTERFACE(CEngineAPI, IEngineAPI, VENGINE_LAUNCHER_API_VERSION); -#endif // HOOK_ENGINE // TODO: Needs rechecking /* @@ -728,6 +713,4 @@ void CDedicatedServerAPI::UpdateStatus(float *fps, int *nActive, int *nMaxPlayer Host_GetHostInfo(fps, nActive, NULL, nMaxPlayers, pszMap); } -#ifndef HOOK_ENGINE EXPOSE_SINGLE_INTERFACE(CDedicatedServerAPI, IDedicatedServerAPI, VENGINE_HLDS_API_VERSION); -#endif // HOOK_ENGINE diff --git a/rehlds/engine/sys_dll2.h b/rehlds/engine/sys_dll2.h index 0f92706..74a247b 100644 --- a/rehlds/engine/sys_dll2.h +++ b/rehlds/engine/sys_dll2.h @@ -38,21 +38,11 @@ const int FIFTEEN_MB = (15 * 1024 * 1024); -#define MINIMUM_WIN_MEMORY 0x0e00000 -#define WARNING_MEMORY 0x0200000 -#define MAXIMUM_WIN_MEMORY 0x8000000 // Ask for 128 MB max -#define MAXIMUM_DEDICATED_MEMORY 0x8000000 // Ask for 128 MB max -#define DEFAULT_MEMORY 0x2800000 - -#ifdef HOOK_ENGINE -#define dedicated_ (*pdedicated) -#define g_bIsWin95 (*pg_bIsWin95) -#define g_bIsWin98 (*pg_bIsWin98) -#define g_flLastSteamProgressUpdateTime (*pg_flLastSteamProgressUpdateTime) -#define szCommonPreloads (*pszCommonPreloads) -#define szReslistsBaseDir (*pszReslistsBaseDir) -#define szReslistsExt (*pszReslistsExt) -#endif +#define MINIMUM_WIN_MEMORY 0x0e00000 +#define WARNING_MEMORY 0x0200000 +#define MAXIMUM_WIN_MEMORY 0x8000000 // Ask for 128 MB max +#define MAXIMUM_DEDICATED_MEMORY 0x8000000 // Ask for 128 MB max +#define DEFAULT_MEMORY 0x2800000 extern IDedicatedExports *dedicated_; extern qboolean g_bIsWin95; diff --git a/rehlds/engine/sys_engine.cpp b/rehlds/engine/sys_engine.cpp index 726f7a2..ed10b35 100644 --- a/rehlds/engine/sys_engine.cpp +++ b/rehlds/engine/sys_engine.cpp @@ -28,20 +28,9 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - CEngine g_Engine; IEngine *eng = &g_Engine; -#else // HOOK_ENGINE - -IEngine *eng; - -#endif // HOOK_ENGINE - CEngine::CEngine() { m_fFrameTime = 0.0; diff --git a/rehlds/engine/sys_engine.h b/rehlds/engine/sys_engine.h index eeddd83..cedb535 100644 --- a/rehlds/engine/sys_engine.h +++ b/rehlds/engine/sys_engine.h @@ -35,11 +35,6 @@ const int MINIMIZED_SLEEP = 20; const int NOT_FOCUS_SLEEP = 50; // sleep time when not focus -#ifdef HOOK_ENGINE -#define game (*pgame) -#define eng (*peng) -#endif // HOOK_ENGINE - extern IGame* game; extern IEngine* eng; diff --git a/rehlds/engine/sys_linuxwind.cpp b/rehlds/engine/sys_linuxwind.cpp index 72b5061..fa11bc7 100644 --- a/rehlds/engine/sys_linuxwind.cpp +++ b/rehlds/engine/sys_linuxwind.cpp @@ -28,20 +28,9 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - CGame g_Game; IGame *game = &g_Game; -#else // HOOK_ENGINE - -IGame *game; - -#endif // HOOK_ENGINE - CGame::CGame() { m_bActiveApp = true; diff --git a/rehlds/engine/textures.cpp b/rehlds/engine/textures.cpp index 022e7e3..17b65b3 100644 --- a/rehlds/engine/textures.cpp +++ b/rehlds/engine/textures.cpp @@ -39,19 +39,8 @@ texture_t * r_notexture_mip; int nummiptex; char miptex[512][64]; -/* - * Globals initialization - */ -#ifndef HOOK_ENGINE - cvar_t r_wadtextures = { "r_wadtextures", "0", 0, 0.0f, NULL }; -#else // HOOK_ENGINE - -cvar_t r_wadtextures; - -#endif // HOOK_ENGINE - void SafeRead(FileHandle_t f, void *buffer, int count) { if (FS_Read(buffer, count, 1, f) != count) diff --git a/rehlds/engine/textures.h b/rehlds/engine/textures.h index 125e822..afda805 100644 --- a/rehlds/engine/textures.h +++ b/rehlds/engine/textures.h @@ -39,21 +39,6 @@ typedef struct texlumpinfo_s int iTexFile; } texlumpinfo_t; -#ifdef HOOK_ENGINE -#define lumpinfo (*plumpinfo) -#define nTexLumps (*pnTexLumps) -#define texfiles (*ptexfiles) -#define nTexFiles (*pnTexFiles) - -#define texgammatable (*ptexgammatable) -#define r_notexture_mip (*pr_notexture_mip) - -#define nummiptex (*pnummiptex) -#define miptex (*pmiptex) - -#define r_wadtextures (*pr_wadtextures) -#endif - extern texlumpinfo_t* lumpinfo; extern int nTexLumps; extern FILE* texfiles[128]; diff --git a/rehlds/engine/tmessage.cpp b/rehlds/engine/tmessage.cpp index b4472c3..2e518bc 100644 --- a/rehlds/engine/tmessage.cpp +++ b/rehlds/engine/tmessage.cpp @@ -31,11 +31,6 @@ char gNetworkTextMessageBuffer[MAX_NETMESSAGE][512]; client_textmessage_t gMessageParms; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - client_textmessage_t *gMessageTable = NULL; int gMessageTableCount = 0; @@ -62,16 +57,6 @@ client_textmessage_t gNetworkTextMessage[MAX_NETMESSAGE] = gNetworkTextMessageBuffer[0] // pMessage }; -#else // HOOK_ENGINE - -client_textmessage_t *gMessageTable; -int gMessageTableCount; - -const char *gNetworkMessageNames[MAX_NETMESSAGE]; -client_textmessage_t gNetworkTextMessage[MAX_NETMESSAGE]; - -#endif // HOOK_ENGINE - char* EXT_FUNC memfgets(unsigned char *pMemFile, int fileSize, int *pFilePos, char *pBuffer, int bufferSize) { int filePos; @@ -126,7 +111,7 @@ int IsComment(char *pText) if ((length >= 2 && pText[0] == '/' && pText[1] == '/') || length <= 0) { return TRUE; - } + } #endif return FALSE; @@ -148,7 +133,7 @@ int IsWhiteSpace(char space) return isspace(space); #else return space == ' ' || space == '\t' || space == '\r' || space == '\n'; -#endif +#endif } NOXREF const char *SkipSpace(const char *pText) diff --git a/rehlds/engine/tmessage.h b/rehlds/engine/tmessage.h index 12b9330..8ba8c8c 100644 --- a/rehlds/engine/tmessage.h +++ b/rehlds/engine/tmessage.h @@ -44,18 +44,6 @@ const int MSGFILE_TEXT = 1; const int NAME_HEAP_SIZE = 16384; const int MAX_MESSAGES = 1000; -#ifdef HOOK_ENGINE - -#define gMessageTable (*pgMessageTable) -#define gMessageTableCount (*pgMessageTableCount) -#define gMessageParms (*pgMessageParms) - -#define gNetworkTextMessageBuffer (*pgNetworkTextMessageBuffer) -#define gNetworkMessageNames (*pgNetworkMessageNames) -#define gNetworkTextMessage (*pgNetworkTextMessage) - -#endif // HOOK_ENGINE - extern client_textmessage_t *gMessageTable; extern int gMessageTableCount; extern client_textmessage_t gMessageParms; diff --git a/rehlds/engine/traceinit.h b/rehlds/engine/traceinit.h index 242d182..6fb292f 100644 --- a/rehlds/engine/traceinit.h +++ b/rehlds/engine/traceinit.h @@ -30,11 +30,6 @@ #include "utlvector.h" -#ifndef HOOK_ENGINE -#define CInitTracker_construct CInitTracker -#define CInitTracker_destruct ~CInitTracker -#endif - class CInitTracker { public: @@ -67,10 +62,6 @@ private: CUtlVector m_Funcs[NUM_LISTS]; }; -#ifdef HOOK_ENGINE -#define g_InitTracker (*pg_InitTracker) -#endif - extern CInitTracker g_InitTracker; void TraceInit(const char *i, const char *s, int listnum); diff --git a/rehlds/engine/vid_null.cpp b/rehlds/engine/vid_null.cpp index 577a328..e89aa66 100644 --- a/rehlds/engine/vid_null.cpp +++ b/rehlds/engine/vid_null.cpp @@ -30,21 +30,9 @@ float scr_con_current; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - int r_pixbytes = 1; cvar_t gl_vsync = { "gl_vsync", "1", 0, 0.0f, NULL }; -#else // HOOK_ENGINE - -int r_pixbytes; -cvar_t gl_vsync; - -#endif // HOOK_ENGINE - void VID_SetPalette(unsigned char *palette) { } void VID_ShiftPalette(unsigned char *palette) { } void VID_WriteBuffer(const char *pFilename) { } diff --git a/rehlds/engine/vid_null.h b/rehlds/engine/vid_null.h index 5b17592..d242a79 100644 --- a/rehlds/engine/vid_null.h +++ b/rehlds/engine/vid_null.h @@ -30,12 +30,6 @@ #include "maintypes.h" -#ifdef HOOK_ENGINE -#define r_pixbytes (*pr_pixbytes) -#define gl_vsync (*pgl_vsync) -#define scr_con_current (*pscr_con_current) -#endif //HOOK_ENGINE - extern int r_pixbytes; extern cvar_t gl_vsync; extern float scr_con_current; diff --git a/rehlds/engine/wad.h b/rehlds/engine/wad.h index aabd03c..bd95800 100644 --- a/rehlds/engine/wad.h +++ b/rehlds/engine/wad.h @@ -70,10 +70,6 @@ typedef struct lumpinfo_s lumpinfo_t; const int NUM_WADS = 2; -#ifdef HOOK_ENGINE -#define wads (*pwads) -#endif - extern wadlist_t wads[NUM_WADS]; void W_CleanupName(char *in, char *out); diff --git a/rehlds/engine/world.h b/rehlds/engine/world.h index 78115ab..ac15bab 100644 --- a/rehlds/engine/world.h +++ b/rehlds/engine/world.h @@ -73,18 +73,6 @@ typedef dclipnode_t box_clipnodes_t[6]; typedef mplane_t box_planes_t[6]; typedef mplane_t beam_planes_t[6]; -#ifdef HOOK_ENGINE - -#define box_hull (*pbox_hull) -#define beam_hull (*pbeam_hull) -#define box_clipnodes (*pbox_clipnodes) -#define box_planes (*pbox_planes) -#define beam_planes (*pbeam_planes) -#define sv_areanodes (*psv_areanodes) -#define sv_numareanodes (*psv_numareanodes) - -#endif // HOOK_ENGINE - extern hull_t box_hull; extern hull_t beam_hull; extern box_clipnodes_t box_clipnodes; diff --git a/rehlds/engine/zone.cpp b/rehlds/engine/zone.cpp index a07efe2..c4e88b7 100644 --- a/rehlds/engine/zone.cpp +++ b/rehlds/engine/zone.cpp @@ -65,19 +65,8 @@ typedef struct memzone_s memblock_t *rover; } memzone_t; -/* -* Globals initialization -*/ -#ifndef HOOK_ENGINE - cvar_t mem_dbgfile = { "mem_dbgfile", ".\\mem.txt", 0, 0.0f, NULL }; -#else // HOOK_ENGINE - -cvar_t mem_dbgfile; - -#endif // HOOK_ENGINE - memzone_t *mainzone; void Z_ClearZone(memzone_t *zone, int size) diff --git a/rehlds/engine/zone.h b/rehlds/engine/zone.h index eff6819..391978e 100644 --- a/rehlds/engine/zone.h +++ b/rehlds/engine/zone.h @@ -38,20 +38,6 @@ typedef struct hunk_s hunk_t; typedef struct cache_user_s cache_user_t; typedef struct cache_system_s cache_system_t; -#ifdef HOOK_ENGINE - -#define mem_dbgfile (*pmem_dbgfile) -#define mainzone (*pmainzone) -#define hunk_base (*phunk_base) -#define hunk_size (*phunk_size) -#define hunk_low_used (*phunk_low_used) -#define hunk_high_used (*phunk_high_used) -#define hunk_tempactive (*phunk_tempactive) -#define hunk_tempmark (*phunk_tempmark) -#define cache_head (*pcache_head) - -#endif // HOOK_ENGINE - extern cvar_t mem_dbgfile; extern memzone_t *mainzone; extern byte *hunk_base; diff --git a/rehlds/hookers/engine/hooklist.cpp b/rehlds/hookers/engine/hooklist.cpp deleted file mode 100644 index 22c435e..0000000 --- a/rehlds/hookers/engine/hooklist.cpp +++ /dev/null @@ -1,2512 +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/hooker.cpp" - -/* - Requred hooks for runing hooker with rehlds API enabled: - Whole regions: - Common_MSG_region - Common_SZ_region - Sv_Steam3_region - - SysDll_region: - Sys_FloatTime, Sys_InitHardwareTimer - - Pr_Cmds_region: - SeedRandomNumberGenerator, ran1, fran1, RandomFloat, RandomLong, PF_GetPlayerAuthId - - Sv_Main_region: - SV_RejectConnection, SV_FilterUser, SV_CheckChallenge, SV_CheckIPRestrictions, SV_CheckIPConnectionReuse, SV_FinishCertificateCheck, SV_CheckKeyInfo - SV_CheckForDuplicateSteamID, SV_CheckForDuplicateNames, SV_CheckUserInfo, SV_ConnectClient, SVC_GetChallenge, SVC_ServiceChallenge, - SV_SetMaxclients, SV_CompareUserID, SV_GetIDString, SV_GetClientIDString -*/ - -//#define Common_MSG_region -//#define Common_SZ_region -#define Common_COM_region -#define Delta_region -#define Main_region -#define Zone_region -#define FileSystem_Internal_region -#define FileSystem_region -#define Unicode_StrTools_region -#define Cmd_region -#define Cvar_region -#define Info_region -//#define SysDll_region -#define Sys_Dll2_region -#define CModel_region -#define Model_region -#define Sv_Log_region -#define Cl_Null_region -#define Snd_Null_region -//#define Sv_Steam3_region -#define Host_region -#define Host_Cmd_region -#define Pmove_region -#define Pmovetst_region -#define Pr_Edict_region -//#define Pr_Cmds_region -#define Mathlib_region -#define World_region -#define Sv_Phys_region -#define Sv_Move_region -#define Sv_pmove_region -//#define Sv_Main_region -#define R_Studio_region -#define TraceInit_Region -#define Net_ws_region -#define Net_chan_region -#define Hashpak_region -#define Sv_user_region -#define Wad_region -#define Textures_region -#define Tmessage_region -#define Vid_null_region -#define L_studio_region -#define Crc_region -#define Sv_RemoteAccess_region -#define Com_custom -#define Sv_upld -#define Decals -#define IpratelimitWrapper_region -#define Sys_engine -#define Sys_linuxwind -//#define SystemWrapper_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(0x01D50AB0, Mem_Malloc), - HOOK_DEF(0x01D50AD0, Mem_ZeroMalloc), - HOOK_DEF(0x01D50B00, Mem_Realloc), - HOOK_DEF(0x01D50B20, Mem_Calloc), - HOOK_DEF(0x01D50B40, Mem_Strdup), - HOOK_DEF(0x01D50B60, Mem_Free), - -#ifdef _WIN32 - HOOK_SYMBOLDEF(0x01DFE945, "_malloca", malloc_wrapper), - HOOK_SYMBOLDEF(0x01DFEA7F, "realloc", realloc_wrapper), - HOOK_SYMBOLDEF(0x01DFE35D, "_frea", free_wrapper), - HOOK_SYMBOLDEF(0x01DFF016, "calloc", calloc_wrapper), - HOOK_SYMBOLDEF(0x01DFE957, "__nh_malloc", __nh_malloc_wrapper), -#endif //_WIN32 - -#endif // Mem_region - -#ifndef Common_MSG_region - - //HOOK_DEF(0x, Q_memset), - //HOOK_DEF(0x, Q_memcpy), - //HOOK_DEF(0x, Q_memcmp), - //HOOK_DEF(0x01D28AF0, Q_strcpy), - //HOOK_DEF(0x, Q_strncpy), - //HOOK_DEF(0x01D28B50, Q_strlen), - //HOOK_DEF(0x, Q_strrchr), - //HOOK_DEF(0x, Q_strcat), - //HOOK_DEF(0x, Q_strcmp), - //HOOK_DEF(0x, Q_strncmp), - //HOOK_DEF(0x, Q_strncasecmp), - //HOOK_DEF(0x, Q_strcasecmp), - //HOOK_DEF(0x, Q_stricmp), - //HOOK_DEF(0x, Q_strnicmp), - //HOOK_DEF(0x, Q_atoi), - //HOOK_DEF(0x, Q_atof), - //HOOK_DEF(0x, Q_strlwr), - //HOOK_DEF(0x, Q_FileNameCmp), - //HOOK_DEF(0x, Q_strstr), - //HOOK_DEF(0x, Q_strtoull), - - HOOK_DEF(0x01D29290, MSG_WriteChar), - HOOK_DEF(0x01D292B0, MSG_WriteByte), - HOOK_DEF(0x01D292D0, MSG_WriteShort), - HOOK_DEF(0x01D292F0, MSG_WriteWord), - HOOK_DEF(0x01D29310, MSG_WriteLong), - HOOK_DEF(0x01D29340, MSG_WriteFloat), - HOOK_DEF(0x01D29370, MSG_WriteString), - HOOK_DEF(0x01D293B0, MSG_WriteBuf), - HOOK_DEF(0x01D293D0, MSG_WriteAngle), - HOOK_DEF(0x01D29420, MSG_WriteHiresAngle), - HOOK_DEF(0x01D29470, MSG_WriteUsercmd), - HOOK_DEF(0x01D294D0, MSG_WriteOneBit), - HOOK_DEF(0x01D29550, MSG_StartBitWriting), - HOOK_DEF(0x01D29590, MSG_EndBitWriting), - HOOK_DEF(0x01D295E0, MSG_WriteBits), - HOOK_DEF(0x01D29700, MSG_WriteSBits), - HOOK_DEF(0x01D29750, MSG_WriteBitString), - HOOK_DEF(0x01D29790, MSG_WriteBitData), - HOOK_DEF(0x01D297C0, MSG_WriteBitAngle), - HOOK_DEF(0x01D29850, MSG_ReadBitAngle), - HOOK_DEF(0x01D298A0, MSG_CurrentBit), - HOOK_DEF(0x01D298E0, MSG_StartBitReading), - HOOK_DEF(0x01D29930, MSG_EndBitReading), - HOOK_DEF(0x01D29970, MSG_ReadOneBit), - HOOK_DEF(0x01D29A00, MSG_ReadBits), - HOOK_DEF(0x01D29B40, MSG_ReadSBits), - HOOK_DEF(0x01D29BB0, MSG_ReadBitData), - HOOK_DEF(0x01D29C70, MSG_WriteBitCoord), - HOOK_DEF(0x01D29D50, MSG_WriteBitVec3Coord), - HOOK_DEF(0x01D29E60, MSG_WriteCoord), - HOOK_DEF(0x01D29F00, MSG_BeginReading), - HOOK_DEF(0x01D29F10, MSG_ReadChar), - HOOK_DEF(0x01D29F50, MSG_ReadByte), - HOOK_DEF(0x01D29F90, MSG_ReadShort), - HOOK_DEF(0x01D2A030, MSG_ReadLong), - HOOK_DEF(0x01D2A090, MSG_ReadFloat), - HOOK_DEF(0x01D2A0E0, MSG_ReadBuf), - HOOK_DEF(0x01D2A130, MSG_ReadString), - HOOK_DEF(0x01D2A170, MSG_ReadStringLine), - HOOK_DEF(0x01D2A210, MSG_ReadUsercmd), - HOOK_DEF(0x01D29B70, MSG_ReadBitString), // NOXREF - HOOK_DEF(0x01D29BE0, MSG_ReadBitCoord), // NOXREF - HOOK_DEF(0x01D29D00, MSG_ReadBitVec3Coord), // NOXREF - HOOK_DEF(0x01D29E30, MSG_ReadCoord), // NOXREF - HOOK_DEF(0x01D29E80, MSG_ReadVec3Coord), // NOXREF - HOOK_DEF(0x01D29EC0, MSG_WriteVec3Coord), // NOXREF - HOOK_DEF(0x01D29FE0, MSG_ReadWord), // NOXREF - HOOK_DEF(0x01D29580, MSG_IsBitWriting), // NOXREF - HOOK_DEF(0x01D298D0, MSG_IsBitReading), // NOXREF - HOOK_DEF(0x01D29B00, MSG_PeekBits), // NOXREF - HOOK_DEF(0x01D2A1B0, MSG_ReadAngle), // NOXREF - HOOK_DEF(0x01D2A1E0, MSG_ReadHiresAngle), // NOXREF - -#endif // Common_MSG_region - -#ifndef Common_SZ_region - - HOOK_DEF(0x01D2A260, SZ_Alloc), - HOOK_DEF(0x01D2A2A0, SZ_Clear), - HOOK_DEF(0x01D2A2C0, SZ_GetSpace), - HOOK_DEF(0x01D2A380, SZ_Write), - HOOK_DEF(0x01D2A3B0, SZ_Print), - -#endif // Common_SZ_region - -#ifndef Common_COM_region - - HOOK_DEF(0x01D08E50, build_number), - HOOK_DEF(0x01D289E0, Info_Serverinfo), - HOOK_DEF(0x01D28FF0, COM_Nibble), - HOOK_DEF(0x01D29030, COM_HexConvert), - HOOK_DEF(0x01D29100, COM_ExplainDisconnection), - HOOK_DEF(0x01D2A440, COM_StripExtension), - HOOK_DEF(0x01D2A4A0, COM_FileExtension), - HOOK_DEF(0x01D2A4F0, COM_FileBase), - HOOK_DEF(0x01D2A580, COM_DefaultExtension), - HOOK_DEF(0x01D2A5D0, COM_UngetToken), - HOOK_DEF(0x01D2A5E0, COM_Parse), - HOOK_DEF(0x01D2A730, COM_ParseLine), - HOOK_DEF(0x01D2A830, COM_CheckParm), - HOOK_DEF(0x01D2A880, COM_InitArgv), - HOOK_DEF(0x01D2A960, COM_Init), - HOOK_DEF(0x01D2AA00, va), - HOOK_DEF(0x01D2AB70, COM_FixSlashes), - HOOK_DEF(0x01D2AB90, COM_CreatePath), - HOOK_DEF(0x01D2ACD0, COM_FileSize), - HOOK_DEF(0x01D2AD10, COM_LoadFile), - HOOK_DEF(0x01D2AE70, COM_FreeFile), - HOOK_DEF(0x01D2AEA0, COM_CopyFileChunk), - HOOK_DEF(0x01D2B020, COM_LoadHunkFile), - HOOK_DEF(0x01D2B040, COM_LoadTempFile), - HOOK_DEF(0x01D2B060, COM_LoadCacheFile), - HOOK_DEF(0x01D2B0B0, COM_Shutdown), - HOOK_DEF(0x01D2B0E0, COM_AddDefaultDir), - HOOK_DEF(0x01D2B100, COM_StripTrailingSlash), - HOOK_DEF(0x01D2B130, COM_ParseDirectoryFromCmd), - HOOK_DEF(0x01D2B1C0, COM_SetupDirectories), - //HOOK_DEF(0x01D2B3D0, COM_CheckPrintMap), // Totally not exists on Linux (it is inlined), but present and used on Windows, anyway just commented it out - HOOK_DEF(0x01D2B250, COM_ListMaps), - HOOK_DEF(0x01D2B410, COM_Log), - HOOK_DEF(0x01D2B480, COM_LoadFileForMe), - HOOK_DEF(0x01D2B4A0, COM_CompareFileTime), - HOOK_DEF(0x01D2B500, COM_GetGameDir), - HOOK_DEF(0x01D2B530, COM_EntsForPlayerSlots), - HOOK_DEF(0x01D2B590, COM_NormalizeAngles), - HOOK_DEF(0x01D2B610, COM_Munge), - HOOK_DEF(0x01D2B6A0, COM_UnMunge), - HOOK_DEF(0x01D2B730, COM_Munge2), - HOOK_DEF(0x01D2B7C0, COM_UnMunge2), - HOOK_DEF(0x01D2B850, COM_Munge3), - HOOK_DEF(0x01D2B970, COM_GetApproxWavePlayLength), - HOOK_DEF(0x01D2B8E0, COM_UnMunge3), // NOXREF - HOOK_DEF(0x01D2B080, COM_LoadStackFile), // NOXREF - HOOK_DEF(0x01D2B0C0, COM_AddAppDirectory), // NOXREF - HOOK_DEF(0x01D2ABD0, COM_CopyFile), // NOXREF - HOOK_DEF(0x01D2AC70, COM_ExpandFilename), // NOXREF - HOOK_DEF(0x01D2AAD0, COM_WriteFile), // NOXREF - HOOK_DEF(0x01D2A7A0, COM_TokenWaiting), // NOXREF - HOOK_DEF(0x01D29170, COM_ExtendedExplainDisconnection), // NOXREF - HOOK_DEF(0x01D2A410, COM_SkipPath), // NOXREF - HOOK_DEF(0x01D2AA40, vstr), // NOXREF - HOOK_DEF(0x01D2AAA0, memsearch), // NOXREF - //HOOK_DEF(0x01D29080, COM_BinPrintf), // NOXREF - //HOOK_DEF(0x01D2AF40, COM_LoadFileLimit), // NOXREF - -#endif // Common_COM_region - -#ifndef Delta_region - - HOOK_DEF(0x01D351D0, DELTA_FindField), - HOOK_DEF(0x01D35240, DELTA_FindFieldIndex), - HOOK_DEF(0x01D352A0, DELTA_SetField), - HOOK_DEF(0x01D352C0, DELTA_UnsetField), - HOOK_DEF(0x01D352E0, DELTA_SetFieldByIndex), - HOOK_DEF(0x01D35300, DELTA_UnsetFieldByIndex), - HOOK_DEF(0x01D35320, DELTA_ClearFlags), - HOOK_DEF(0x01D35340, DELTA_TestDelta), - HOOK_DEF(0x01D355B0, DELTA_CountSendFields), - HOOK_DEF(0x01D355E0, DELTA_MarkSendFields), - HOOK_DEF(0x01D35830, DELTA_SetSendFlagBits), - HOOK_DEF(0x01D358B0, DELTA_WriteMarkedFields), - HOOK_DEF(0x01D35C10, DELTA_CheckDelta), - HOOK_DEF(0x01D35C40, DELTA_WriteDelta), - HOOK_DEF(0x01D35C80, _DELTA_WriteDelta), - HOOK_DEF(0x01D35D00, DELTA_ParseDelta), - - HOOK_DEF(0x01D36420, DELTA_AddEncoder), - HOOK_DEF(0x01D36460, DELTA_ClearEncoders), - HOOK_DEF(0x01D364A0, DELTA_LookupEncoder), - HOOK_DEF(0x01D364E0, DELTA_CountLinks), - HOOK_DEF(0x01D36500, DELTA_ReverseLinks), - HOOK_DEF(0x01D36520, DELTA_ClearLinks), - HOOK_DEF(0x01D36550, DELTA_BuildFromLinks), - HOOK_DEF(0x01D365F0, DELTA_FindOffset), - HOOK_DEF(0x01D36640, DELTA_ParseType), - HOOK_DEF(0x01D36800, DELTA_ParseField), - HOOK_DEF(0x01D36A10, DELTA_FreeDescription), - HOOK_DEF(0x01D36A50, DELTA_AddDefinition), - HOOK_DEF(0x01D36AB0, DELTA_ClearDefinitions), - HOOK_DEF(0x01D36AF0, DELTA_FindDefinition), - HOOK_DEF(0x01D36B40, DELTA_SkipDescription), - HOOK_DEF(0x01D36BA0, DELTA_ParseOneField), - HOOK_DEF(0x01D36C50, DELTA_ParseDescription), - HOOK_DEF(0x01D36EA0, DELTA_Load), - HOOK_DEF(0x01D36EF0, DELTA_RegisterDescription), - HOOK_DEF(0x01D36F30, DELTA_ClearRegistrations), - HOOK_DEF(0x01D36FC0, DELTA_ClearStats), - HOOK_DEF(0x01D36FF0, DELTA_ClearStats_f), - HOOK_DEF(0x01D36F80, DELTA_LookupRegistration), - HOOK_DEF(0x01D37020, DELTA_PrintStats), - HOOK_DEF(0x01D37090, DELTA_DumpStats_f), - HOOK_DEF(0x01D370C0, DELTA_Init), - HOOK_DEF(0x01D37160, DELTA_Shutdown), - -#endif // Delta_region - -#ifndef Sv_Main_region - - //HOOK_DEF(0x01D87E40, SV_LookupDelta), - //HOOK_DEF(0x01D87F70, SV_GatherStatistics), - //HOOK_DEF(0x01D88190, SV_DeallocateDynamicData), - //HOOK_DEF(0x01D881D0, SV_ReallocateDynamicData), - //HOOK_DEF(0x01D88250, SV_AllocClientFrames), - //HOOK_DEF(0x01D882B0, SV_IsPlayerIndex_wrapped), - //HOOK_DEF(0x01D882D0, SV_ClearPacketEntities), - //HOOK_DEF(0x01D88310, SV_AllocPacketEntities), - //HOOK_DEF(0x01D88370, SV_ClearFrames), - //HOOK_DEF(0x01D883E0, SV_Serverinfo_f), - //HOOK_DEF(0x01D884C0, SV_Localinfo_f), - //HOOK_DEF(0x01D88550, SV_User_f), - //HOOK_DEF(0x01D88640, SV_Users_f), - //HOOK_DEF(0x01D88700, SV_CountPlayers), - //HOOK_DEF(0x01D88740, SV_CountProxies), - //HOOK_DEF(0x01D88790, SV_FindModelNumbers), - //HOOK_DEF(0x01D887D0, SV_StartParticle), - //HOOK_DEF(0x01D88880, SV_StartSound), - //HOOK_DEF(0x01D88960, SV_BuildSoundMsg), - //HOOK_DEF(0x01D88BD0, SV_HashString), - //HOOK_DEF(0x01D88C10, SV_LookupSoundIndex), - //HOOK_DEF(0x01D88CD0, SV_BuildHashedSoundLookupTable), - //HOOK_DEF(0x01D88D20, SV_AddSampleToHashedLookupTable), - //HOOK_DEF(0x01D88DA0, SV_ValidClientMulticast), - //HOOK_DEF(0x01D88E40, SV_Multicast), - //HOOK_DEF(0x01D88FA0, SV_WriteMovevarsToClient), - //HOOK_DEF(0x01D89110, SV_WriteDeltaDescriptionsToClient), - //HOOK_DEF(0x01D891B0, SV_SetMoveVars), - //HOOK_DEF(0x01D892F0, SV_QueryMovevarsChanged), - //HOOK_DEF(0x01D89590, SV_SendServerinfo), - //HOOK_DEF(0x01D897C0, SV_SendResources), - //HOOK_DEF(0x01D89920, SV_WriteClientdataToMessage), - //HOOK_DEF(0x01D89BF0, SV_WriteSpawn), - //HOOK_DEF(0x01D89F10, SV_SendUserReg), - //HOOK_DEF(0x01D89F80, SV_New_f), - //HOOK_DEF(0x01D8A210, SV_SendRes_f), - //HOOK_DEF(0x01D8A2C0, SV_Spawn_f), - //HOOK_DEF(0x01D8A3F0, SV_CheckUpdateRate), - HOOK_DEF(0x01D8A510, SV_RejectConnection), - //HOOK_DEF(0x01D8A5A0, SV_RejectConnectionForPassword), - //HOOK_DEF(0x01D8A610, SV_GetFragmentSize), - HOOK_DEF(0x01D8A680, SV_FilterUser), - //HOOK_DEF(0x01D8A760, SV_CheckProtocol), - HOOK_DEF(0x01D8A7E0, SV_CheckChallenge), - HOOK_DEF(0x01D8A8D0, SV_CheckIPRestrictions), - HOOK_DEF(0x01D8A980, SV_CheckIPConnectionReuse), - HOOK_DEF(0x01D8AA40, SV_FinishCertificateCheck), - HOOK_DEF(0x01D8AB10, SV_CheckKeyInfo), - HOOK_DEF(0x01D8AC30, SV_CheckForDuplicateSteamID), - HOOK_DEF(0x01D8ACE0, SV_CheckForDuplicateNames), - HOOK_DEF(0x01D8AE10, SV_CheckUserInfo), - //HOOK_DEF(0x01D8B080, SV_FindEmptySlot), - HOOK_DEF(0x01D8B100, SV_ConnectClient), - //HOOK_DEF(0x01D8B8E0, SVC_Ping), - HOOK_DEF(0x01D8B930, SVC_GetChallenge), - HOOK_DEF(0x01D8BB20, SVC_ServiceChallenge), - //HOOK_DEF(0x01D8C260, SVC_InfoString), // NOXREF - //HOOK_DEF(0x01D8C720, SVC_Info), // NOXREF - //HOOK_DEF(0x01D8CA40, SVC_PlayerInfo), // NOXREF - //HOOK_DEF(0x01D8CBA0, SVC_RuleInfo), // NOXREF - //HOOK_DEF(0x01D8CCC0, SVC_GameDllQuery), - //HOOK_DEF(0x01D8BCB0, SV_ResetModInfo), - //HOOK_DEF(0x01D8CD70, SV_FlushRedirect), - //HOOK_DEF(0x01D8CE70, SV_BeginRedirect), - //HOOK_DEF(0x01D8CEA0, SV_EndRedirect), - //HOOK_DEF(0x01D8CEB0, SV_ResetRcon_f), - //HOOK_DEF(0x01D8CED0, SV_AddFailedRcon), - //HOOK_DEF(0x01D8D1F0, SV_CheckRconFailure), - //HOOK_DEF(0x01D8D250, SV_Rcon_Validate), - //HOOK_DEF(0x01D8D370, SV_Rcon), - //HOOK_DEF(0x01D8D560, SV_ConnectionlessPacket), - //HOOK_DEF(0x01D8D750, SV_CheckRate), - //HOOK_DEF(0x01D8D810, SV_ProcessFile), - //HOOK_DEF(0x01D8D960, SV_FilterPacket), - //HOOK_DEF(0x01D8DA30, SV_SendBan), - //HOOK_DEF(0x01D8DAB0, SV_ReadPackets), - //HOOK_DEF(0x, ntohl), - //HOOK_DEF(0x, htons), - //HOOK_DEF(0x01D8DCC0, SV_CheckTimeouts), - //HOOK_DEF(0x01D8DD50, SV_CalcPing), - //HOOK_DEF(0x01D8DE20, SV_FullClientUpdate), - //HOOK_DEF(0x01D8DEF0, SV_EmitEvents), - //HOOK_DEF(0x01D8E0F0, SV_AddToFatPVS), - //HOOK_DEF(0x01D8E1B0, SV_FatPVS), - //HOOK_DEF(0x01D8E200, SV_AddToFatPAS), - //HOOK_DEF(0x01D8E2D0, SV_FatPAS), - //HOOK_DEF(0x01D8E320, SV_PointLeafnum), - //HOOK_DEF(0x01D8E370, SV_SetCallback), - //HOOK_DEF(0x01D8E3C0, SV_SetNewInfo), - //HOOK_DEF(0x01D8E3E0, SV_WriteDeltaHeader), - //HOOK_DEF(0x01D8E4E0, SV_InvokeCallback), - //HOOK_DEF(0x01D8E520, SV_FindBestBaseline), - //HOOK_DEF(0x01D8E650, SV_CreatePacketEntities), - //HOOK_DEF(0x01D8E9A0, SV_EmitPacketEntities), - //HOOK_DEF(0x01D8E9E0, SV_ShouldUpdatePing), - //HOOK_DEF(0x01D8EA70, SV_GetNetInfo), - //HOOK_DEF(0x01D8EB00, SV_CheckVisibility), - //HOOK_DEF(0x01D8EBF0, SV_EmitPings), - //HOOK_DEF(0x01D8EC90, SV_WriteEntitiesToClient), - //HOOK_DEF(0x01D8EE90, SV_CleanupEnts), - //HOOK_DEF(0x01D8EEC0, SV_SendClientDatagram), - //HOOK_DEF(0x01D8EFC0, SV_UpdateToReliableMessages), - //HOOK_DEF(0x01D8F230, SV_SkipUpdates), - //HOOK_DEF(0x01D8F280, SV_SendClientMessages), - //HOOK_DEF(0x01D8F470, SV_ExtractFromUserinfo), - //HOOK_DEF(0x01D8F870, SV_ModelIndex), - //HOOK_DEF(0x01D8F8E0, SV_AddResource), - //HOOK_DEF(0x01D8F950, SV_CreateGenericResources), - //HOOK_DEF(0x01D8FC30, SV_CreateResourceList), - //HOOK_DEF(0x01D8FDC0, SV_ClearCaches), - //HOOK_DEF(0x01D8FE00, SV_PropagateCustomizations), - //HOOK_DEF(0x01D8FF00, SV_WriteVoiceCodec), - //HOOK_DEF(0x01D8FF30, SV_CreateBaseline), - //HOOK_DEF(0x01D90170, SV_BroadcastCommand), - //HOOK_DEF(0x01D90260, SV_BuildReconnect), - //HOOK_DEF(0x01D903D0, SetCStrikeFlags), - //HOOK_DEF(0x01D904E0, SV_ActivateServer), - //HOOK_DEF(0x01D90790, SV_ServerShutdown), - //HOOK_DEF(0x01D907C0, SV_SpawnServer), - //HOOK_DEF(0x01D90E70, SV_LoadEntities), - //HOOK_DEF(0x01D90E90, SV_ClearEntities), - //HOOK_DEF(0x01D90ED0, RegUserMsg), - //HOOK_DEF(0x01D90F80, StringToFilter), - //HOOK_DEF(0x01D91020, SV_StringToUserID), - //HOOK_DEF(0x01D910C0, SV_BanId_f), - //HOOK_DEF(0x01D915C0, Host_Kick_f), - //HOOK_DEF(0x01D91990, SV_RemoveId_f), - //HOOK_DEF(0x01D91B90, SV_WriteId_f), - //HOOK_DEF(0x01D91C60, SV_ListId_f), - //HOOK_DEF(0x01D91D00, SV_AddIP_f), - //HOOK_DEF(0x01D91F00, SV_RemoveIP_f), - //HOOK_DEF(0x01D91FD0, SV_ListIP_f), - //HOOK_DEF(0x01D920B0, SV_WriteIP_f), - //HOOK_DEF(0x01D92190, SV_KickPlayer), - //HOOK_DEF(0x01D92300, SV_InactivateClients), - //HOOK_DEF(0x01D923A0, SV_FailDownload), - //HOOK_DEF(0x01D8EA40, SV_HasEventsInQueue), // NOXREF - //HOOK_DEF(0x01D90280, SV_ReconnectAllClients), // NOXREF - //HOOK_DEF(0x01D8BE40, SV_GetFakeClientCount), // NOXREF - //HOOK_DEF(0x01D8BE70, SV_GetModInfo), // NOXREF - //HOOK_DEF(0x01D87E90, SV_DownloadingModules), // NOXREF - //HOOK_DEF(0x01D923E0, Q_stristr), - //HOOK_DEF(0x01D92480, IsSafeFileToDownload), - //HOOK_DEF(0x01D92710, SV_BeginFileDownload_f), - HOOK_DEF(0x01D92940, SV_SetMaxclients), - //HOOK_DEF(0x01D92B00, SV_HandleRconPacket), - //HOOK_DEF(0x01D92B70, SV_CheckCmdTimes), - //HOOK_DEF(0x01D92C60, SV_CheckForRcon), - //HOOK_DEF(0x01D92CC0, SV_IsSimulating), - //HOOK_DEF(0x01D92D00, SV_CheckMapDifferences), - //HOOK_DEF(0x01D92D80, SV_Frame), - //HOOK_DEF(0x01D92E00, SV_Drop_f), - //HOOK_DEF(0x01D92E40, SV_RegisterDelta), - //HOOK_DEF(0x01D92EC0, SV_InitDeltas), - //HOOK_DEF(0x01D93010, SV_InitEncoders), - //HOOK_DEF(0x01D93050, SV_Init), - //HOOK_DEF(0x01D93600, SV_Shutdown), - HOOK_DEF(0x01D93650, SV_CompareUserID), - HOOK_DEF(0x01D936D0, SV_GetIDString), - HOOK_DEF(0x01D938E0, SV_GetClientIDString), - //HOOK_DEF(0x01D93950, GetGameAppID), - //HOOK_DEF(0x01D939C0, IsGameSubscribed), - //HOOK_DEF(0x, TRACE_DELTA), // NOXREF - - //HOOK_DEF(0x01D93A10, BIsValveGame), // NOXREF - //HOOK_DEF(0x01D8BF40, RequireValidChallenge), // NOXREF - //HOOK_DEF(0x01D8BF60, ValidInfoChallenge), // NOXREF - //HOOK_DEF(0x01D8BFB0, GetChallengeNr), // NOXREF - //HOOK_DEF(0x01D8C0C0, CheckChallengeNr), // NOXREF - //HOOK_DEF(0x01D8C180, ReplyServerChallenge), // NOXREF - //HOOK_DEF(0x01D8C200, ValidChallenge), // NOXREF - -#endif // Sv_Main_region - -#ifndef Zone_region - - HOOK_DEF(0x01DBB120, Z_ClearZone), - HOOK_DEF(0x01DBB170, Z_Free), - HOOK_DEF(0x01DBB220, Z_Malloc), - HOOK_DEF(0x01DBB260, Z_TagMalloc), - HOOK_DEF(0x01DBB310, Z_Print), // NOXREF - HOOK_DEF(0x01DBB3C0, Z_CheckHeap), - - HOOK_DEF(0x01DBB440, Hunk_Check), - HOOK_DEF(0x01DBB4B0, Hunk_Print), // NOXREF - HOOK_DEF(0x01DBB6B0, Hunk_AllocName), - HOOK_DEF(0x01DBB750, Hunk_Alloc), - HOOK_DEF(0x01DBB770, Hunk_LowMark), - HOOK_DEF(0x01DBB780, Hunk_FreeToLowMark), - HOOK_DEF(0x01DBB7B0, Hunk_HighMark), - HOOK_DEF(0x01DBB7E0, Hunk_FreeToHighMark), - HOOK_DEF(0x01DBB830, Hunk_HighAllocName), - HOOK_DEF(0x01DBB900, Hunk_TempAlloc), - - HOOK_DEF(0x01DBB960, Cache_Move), - HOOK_DEF(0x01DBB9D0, Cache_FreeLow), - HOOK_DEF(0x01DBBA00, Cache_FreeHigh), - HOOK_DEF(0x01DBBA60, Cache_UnlinkLRU), - HOOK_DEF(0x01DBBAA0, Cache_MakeLRU), - HOOK_DEF(0x01DBBAF0, Cache_TryAlloc), - HOOK_DEF(0x01DBBC30, Cache_Force_Flush), - HOOK_DEF(0x01DBBC60, Cache_Flush), - HOOK_DEF(0x01DBBC90, Cache_Print), // NOXREF - //HOOK_DEF(0x, ComparePath1), // NOXREF // not yet located on windows - //HOOK_DEF(0x, CommatizeNumber), // NOXREF // not yet located on windows - //HOOK_DEF(0x, Cache_Report), // NOXREF // not yet located on windows - //HOOK_DEF(0x, Cache_Compact), // NOXREF // not yet located on windows - HOOK_DEF(0x01DBBED0, Cache_Init), - HOOK_DEF(0x01DBBF00, Cache_Free), - HOOK_DEF(0x01DBBF70, Cache_Check), - HOOK_DEF(0x01DBBFA0, Cache_Alloc), - HOOK_DEF(0x01DBC040, Memory_Init), - HOOK_DEF(0x01DBBD60, CacheSystemCompare), - HOOK_DEF(0x01DBBF50, Cache_TotalUsed), // NOXREF // NOXREF - //HOOK_DEF(0x01DBC0E0, Cache_Print_Models_And_Totals), // NOXREF - //HOOK_DEF(0x01DBC1F0, Cache_Print_Sounds_And_Totals), // NOXREF - -#endif // Zone_region - -#ifndef FileSystem_Internal_region - - HOOK_DEF(0x01D3E2E0, FS_RemoveAllSearchPaths), // NOXREF - HOOK_DEF(0x01D3E2F0, FS_AddSearchPath), - HOOK_DEF(0x01D3E310, FS_RemoveSearchPath), // NOXREF - HOOK_DEF(0x01D3E330, FS_RemoveFile), - HOOK_DEF(0x01D3E350, FS_CreateDirHierarchy), - HOOK_DEF(0x01D3E370, FS_FileExists), - HOOK_DEF(0x01D3E390, FS_IsDirectory), // NOXREF - HOOK_DEF(0x01D3E3B0, FS_Open), - HOOK_DEF(0x01D3E3D0, FS_OpenPathID), - HOOK_DEF(0x01D3E3F0, FS_Close), - HOOK_DEF(0x01D3E410, FS_Seek), - HOOK_DEF(0x01D3E430, FS_Tell), - HOOK_DEF(0x01D3E450, FS_Size), - HOOK_DEF(0x01D3E470, FS_FileSize), - HOOK_DEF(0x01D3E490, FS_GetFileTime), - HOOK_DEF(0x01D3E4B0, FS_FileTimeToString), // NOXREF - HOOK_DEF(0x01D3E4D0, FS_IsOk), - HOOK_DEF(0x01D3E4F0, FS_Flush), - HOOK_DEF(0x01D3E510, FS_EndOfFile), - HOOK_DEF(0x01D3E530, FS_Read), - HOOK_DEF(0x01D3E550, FS_Write), - HOOK_DEF(0x01D3E570, FS_ReadLine), - HOOK_DEF(0x01D3E590, FS_FPrintf), - HOOK_DEF(0x01D3E5E0, FS_FindFirst), - HOOK_DEF(0x01D3E600, FS_FindNext), - HOOK_DEF(0x01D3E620, FS_FindIsDirectory), // NOXREF - HOOK_DEF(0x01D3E640, FS_FindClose), - HOOK_DEF(0x01D3E660, FS_GetLocalCopy), - HOOK_DEF(0x01D3E680, FS_GetLocalPath), - HOOK_DEF(0x01D3E6A0, FS_ParseFile), // NOXREF - HOOK_DEF(0x01D3E6E0, FS_FullPathToRelativePath), // NOXREF - HOOK_DEF(0x01D3E700, FS_GetCurrentDirectory), // NOXREF - HOOK_DEF(0x01D3E720, FS_PrintOpenedFiles), // NOXREF - HOOK_DEF(0x01D3E730, FS_SetWarningFunc), // NOXREF - HOOK_DEF(0x01D3E750, FS_SetWarningLevel), // NOXREF - HOOK_DEF(0x01D3E770, FS_GetCharacter), // NOXREF - HOOK_DEF(0x01D3E790, FS_LogLevelLoadStarted), - HOOK_DEF(0x01D3E7B0, FS_LogLevelLoadFinished), - HOOK_DEF(0x01D3E7D0, FS_SetVBuf), - HOOK_DEF(0x01D3E800, FS_GetInterfaceVersion), - HOOK_DEF(0x01D3E820, FS_GetReadBuffer), - HOOK_DEF(0x01D3E840, FS_ReleaseReadBuffer), - HOOK_DEF(0x01D3E860, FS_Unlink), - HOOK_DEF(0x01D3E8A0, FS_Rename), - HOOK_DEF(0x01D3E940, FS_LoadLibrary), - -#endif // FileSystem_Internal_region - -#ifndef FileSystem_region - - HOOK_DEF(0x01D3D340, GetBaseDirectory), - //HOOK_DEF(0x01D3E250, FileSystem_LoadDLL), // Totally not exists on Linux (it is inlined), but present and used on Windows, anyway just commented it out - //HOOK_DEF(0x01D3E2C0, FileSystem_UnloadDLL), // Totally not exists on Linux (it is inlined), but present and used on Windows, anyway just commented it out - HOOK_DEF(0x01D3D360, BEnabledHDAddon), - HOOK_DEF(0x01D3D390, BEnableAddonsFolder), - - HOOK_DEF(0x01D3D3C0, Host_SetHDModels_f), - HOOK_DEF(0x01D3D440, Host_SetAddonsFolder_f), - HOOK_DEF(0x01D3D4C0, Host_SetVideoLevel_f), - HOOK_DEF(0x01D3D510, Host_GetVideoLevel), - - HOOK_DEF(0x01D3DA60, FileSystem_SetGameDirectory), - HOOK_DEF(0x01D3E130, FileSystem_AddFallbackGameDir), - - HOOK_SYMBOLDEF(0x01D3D355, "_Z20GetFileSystemFactoryv", GetFileSystemFactory), // NOXREF - HOOK_SYMBOLDEF(0x01D3D530, "_Z26CheckLiblistForFallbackDirPKcbS0_b", CheckLiblistForFallbackDir), - HOOK_SYMBOLDEF(0x01D3E200, "_Z15FileSystem_InitPcPv", FileSystem_Init), - HOOK_SYMBOLDEF(0x01D3E2B0, "_Z19FileSystem_Shutdownv", FileSystem_Shutdown), - -#endif // FileSystem_region - -#ifndef Unicode_StrTools_region - - HOOK_SYMBOLDEF(0x01DA8F00, "_Z16Q_IsValidUChar32w", Q_IsValidUChar32), - HOOK_SYMBOLDEF(0x01DA97D0, "_Z15Q_UTF8ToUChar32PKcRwRb", Q_UTF8ToUChar32), - - HOOK_DEF(0x01DA9910, Q_UnicodeValidate), - HOOK_DEF(0x01DA99A0, Q_UnicodeAdvance), - HOOK_DEF(0x01DA9EA0, Q_UnicodeRepair), - HOOK_DEF(0x01DA9E70, V_UTF8ToUChar32), - -#endif // Unicode_StrTools_region - -#ifndef Cmd_region - - HOOK_DEF(0x01D26CD0, Cmd_Wait_f), - HOOK_DEF(0x01D26CE0, Cbuf_Init), - HOOK_DEF(0x01D26D00, Cbuf_AddText), - HOOK_DEF(0x01D26D50, Cbuf_InsertText), - HOOK_DEF(0x01D26DE0, Cbuf_InsertTextLines), - HOOK_DEF(0x01D26E80, Cbuf_Execute), - HOOK_DEF(0x01D26F60, Cmd_StuffCmds_f), - HOOK_DEF(0x01D270F0, Cmd_Exec_f), - HOOK_DEF(0x01D273A0, Cmd_Echo_f), - HOOK_DEF(0x01D273E0, CopyString), - HOOK_DEF(0x01D27410, Cmd_Alias_f), - HOOK_DEF(0x01D276A0, Cmd_GetFirstCmd), - HOOK_DEF(0x01D276B0, Cmd_Init), - HOOK_DEF(0x01D27720, Cmd_Shutdown), - HOOK_DEF(0x01D27750, Cmd_Argc), - HOOK_DEF(0x01D27760, Cmd_Argv), - HOOK_DEF(0x01D27790, Cmd_Args), - HOOK_DEF(0x01D277A0, Cmd_TokenizeString), - - HOOK_DEF(0x01D27900, Cmd_AddCommand), - HOOK_DEF(0x01D27A10, Cmd_AddMallocCommand), - HOOK_DEF(0x01D27AF0, Cmd_AddGameCommand), - HOOK_DEF(0x01D27B10, Cmd_RemoveMallocedCmds), - HOOK_DEF(0x01D27B60, Cmd_RemoveGameCmds), - HOOK_DEF(0x01D27B70, Cmd_RemoveWrapperCmds), - HOOK_DEF(0x01D27B80, Cmd_Exists), - HOOK_DEF(0x01D27D10, Cmd_ExecuteString), - HOOK_DEF(0x01D27DF0, Cmd_ForwardToServerInternal), - HOOK_DEF(0x01D27F40, Cmd_ForwardToServer), - HOOK_DEF(0x01D27F90, Cmd_ForwardToServerUnreliable), - HOOK_DEF(0x01D28000, Cmd_CmdList_f), - HOOK_DEF(0x01D27AB0, Cmd_AddHUDCommand), // NOXREF - HOOK_DEF(0x01D27AD0, Cmd_AddWrapperCommand), // NOXREF - HOOK_DEF(0x01D27B50, Cmd_RemoveHudCmds), // NOXREF - HOOK_DEF(0x01D27BC0, Cmd_CompleteCommand), // NOXREF - HOOK_DEF(0x01D27FA0, Cmd_CheckParm), // NOXREF - HOOK_DEF(0x01D27880, Cmd_FindCmd), // NOXREF - HOOK_DEF(0x01D278C0, Cmd_FindCmdPrev), // NOXREF -#endif // Cmd_region - -#ifndef Cvar_region - - HOOK_DEF(0x01D2D760, Cvar_Init), - HOOK_DEF(0x01D2D770, Cvar_Shutdown), - HOOK_DEF(0x01D2D780, Cvar_FindVar), - HOOK_DEF(0x01D2D800, Cvar_VariableValue), - HOOK_DEF(0x01D2D860, Cvar_VariableString), - HOOK_DEF(0x01D2D9C0, Cvar_DirectSet), - HOOK_DEF(0x01D2DC30, Cvar_Set), - HOOK_DEF(0x01D2DC70, Cvar_SetValue), - HOOK_DEF(0x01D2DD20, Cvar_RegisterVariable), - HOOK_DEF(0x01D2DE70, Cvar_IsMultipleTokens), - HOOK_DEF(0x01D2DED0, Cvar_Command), - HOOK_DEF(0x01D2E350, Cvar_UnlinkExternals), - HOOK_DEF(0x01D2E380, Cvar_CmdInit), - HOOK_DEF(0x01D2D7C0, Cvar_FindPrevVar), // NOXREF - HOOK_DEF(0x01D2D830, Cvar_VariableInt), // NOXREF - HOOK_DEF(0x01D2D880, Cvar_CompleteVariable), // NOXREF - HOOK_DEF(0x01D2DE10, Cvar_RemoveHudCvars), // NOXREF - HOOK_DEF(0x01D2DFA0, Cvar_WriteVariables), // NOXREF - HOOK_DEF(0x01D2E330, Cvar_CountServerVariables), // NOXREF - HOOK_DEF(0x01D2DFE0, Cmd_CvarListPrintCvar), - HOOK_DEF(0x01D2E0F0, Cmd_CvarList_f), - -#endif // Cvar_region - -#ifndef Info_region - - HOOK_DEF(0x01D4B610, Info_ValueForKey), - HOOK_DEF(0x01D4B6E0, Info_RemoveKey), - HOOK_DEF(0x01D4B7D0, Info_RemovePrefixedKeys), - HOOK_DEF(0x01D4B860, Info_IsKeyImportant), - HOOK_DEF(0x01D4B980, Info_FindLargestKey), - HOOK_DEF(0x01D4BA80, Info_SetValueForStarKey), - HOOK_DEF(0x01D4BCF0, Info_SetValueForKey), - HOOK_DEF(0x01D4BD30, Info_Print), - HOOK_DEF(0x01D4BE10, Info_IsValid), - -#endif // Info_region - -#ifndef SysDll_region - - //HOOK_DEF(0x, Sys_PageIn), - //HOOK_DEF(0x01D9ECF0, Sys_FindFirst), - //HOOK_DEF(0x01D9ED50, Sys_FindFirstPathID), - //HOOK_DEF(0x01D9ED90, Sys_FindNext), - //HOOK_DEF(0x01D9EDC0, Sys_FindClose), - //HOOK_DEF(0x01D9EDE0, glob_match_after_star), - //HOOK_DEF(0x01D9EF50, glob_match), - //HOOK_DEF(0x01D9EFD0, Sys_MakeCodeWriteable), - //HOOK_DEF(0x, Sys_SetFPCW), - //HOOK_DEF(0x, Sys_PushFPCW_SetHigh), - //HOOK_DEF(0x, Sys_PopFPCW), - //HOOK_DEF(0x, MaskExceptions), - //HOOK_DEF(0x, Sys_Init), // NOXREF - //HOOK_DEF(0x, Sys_Sleep), - //HOOK_DEF(0x, Sys_DebugOutStraight), - //HOOK_DEF(0x01D9F0E0, Sys_Error), - //HOOK_DEF(0x01D9F1F0, Sys_Warning), - //HOOK_DEF(0x01D9F230, Sys_Printf), - //HOOK_DEF(0x01D9F4A0, Sys_Quit), - HOOK_DEF(0x01D9F2A0, Sys_FloatTime), - //HOOK_DEF(0x01D9F460, Dispatch_Substate), - //HOOK_DEF(0x01D9F470, GameSetSubState), - //HOOK_DEF(0x01D9F4A0, GameSetState), - //HOOK_DEF(0x, GameSetBackground), - //HOOK_DEF(0x01D9F7B0, Voice_GetClientListening), - //HOOK_DEF(0x01D9F810, Voice_SetClientListening), - //HOOK_DEF(0x01D9F890, GetDispatch), - //HOOK_DEF(0x01D9F8D0, FindAddressInTable), - //HOOK_DEF(0x01D9F910, FindNameInTable), - //HOOK_DEF(0x, ConvertNameToLocalPlatform), - //HOOK_DEF(0x01D9FAA0, FunctionFromName), - //HOOK_DEF(0x01D9FB00, NameForFunction), - //HOOK_DEF(0x01D9FB50, GetEntityInit), - //HOOK_DEF(0x01D9FB70, GetIOFunction), - //HOOK_DEF(0x01D9FB90, DLL_SetModKey), - //HOOK_DEF(0x01D9FE50, LoadEntityDLLs), - //HOOK_DEF(0x01DA02D0, LoadThisDll), - //HOOK_DEF(0x01DA0390, ReleaseEntityDlls), - //HOOK_DEF(0x01DA0410, EngineFprintf), - //HOOK_DEF(0x01DA0420, AlertMessage), - //HOOK_DEF(0x01DA0640, Sys_SplitPath), - //HOOK_DEF(0x01D2BD90, Con_Debug_f), - //HOOK_DEF(0x01D2BDD0, Con_Init), - //HOOK_DEF(0x01D2BFC0, Con_DebugLog), - //HOOK_DEF(0x01D2C020, Con_Printf), - //HOOK_DEF(0x01D2C1E0, Con_SafePrintf), - //HOOK_DEF(0x01D2C140, Con_DPrintf), - -#ifdef _WIN32 - HOOK_DEF(0x01DA0A70, Sys_InitHardwareTimer), -#endif //_WIN32 - -#endif // SysDll_region - -#ifndef Sys_Dll2_region - - // virtual functions - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA16B0, "_ZN19CDedicatedServerAPI4InitEPcS0_PFP14IBaseInterfacePKcPiES7_", CDedicatedServerAPI::Init), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1800, "_ZN19CDedicatedServerAPI8ShutdownEv", CDedicatedServerAPI::Shutdown), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1860, "_ZN19CDedicatedServerAPI8RunFrameEv", CDedicatedServerAPI::RunFrame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1880, "_ZN19CDedicatedServerAPI14AddConsoleTextEPc", CDedicatedServerAPI::AddConsoleText), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA18A0, "_ZN19CDedicatedServerAPI12UpdateStatusEPfPiS1_Pc", CDedicatedServerAPI::UpdateStatus), - - HOOK_DEF(0x01DA0670, GetCurrentSteamAppName), - HOOK_DEF(0x01DA07A0, F), - HOOK_DEF(0x01DA0820, Sys_GetCDKey), - HOOK_DEF(0x01DA0D50, Sys_ShutdownMemory), - -#ifdef _WIN32 - HOOK_SYMBOLDEF(0x01DA09E0, "_Z18Sys_CheckOSVersionv", Sys_CheckOSVersion), -#else - //HOOK_SYMBOLDEF(0x0, "_Z19Sys_SetupLegacyAPIsv", Sys_SetupLegacyAPIs), -#endif - - HOOK_SYMBOLDEF(0x01DA0940, "_Z17Legacy_Sys_PrintfPcz", Legacy_Sys_Printf), - HOOK_SYMBOLDEF(0x01DA0B70, "_Z12Sys_InitArgvPc", Sys_InitArgv), - HOOK_SYMBOLDEF(0x01DA0C20, "_Z14Sys_InitMemoryv", Sys_InitMemory), - HOOK_SYMBOLDEF(0x01DA0D70, "_Z25Sys_InitLauncherInterfacev", Sys_InitLauncherInterface), - HOOK_SYMBOLDEF(0x01DA0DA0, "_Z22Sys_InitAuthenticationv", Sys_InitAuthentication), - HOOK_SYMBOLDEF(0x01DA0DC0, "_Z21Sys_ShowProgressTicksPc", Sys_ShowProgressTicks), - HOOK_SYMBOLDEF(0x01DA0ED0, "_Z12Sys_InitGamePcS_Pvi", Sys_InitGame), - HOOK_SYMBOLDEF(0x01DA0FE0, "_Z16Sys_ShutdownGamev", Sys_ShutdownGame), - HOOK_SYMBOLDEF(0x01DA1060, "_Z13ClearIOStatesv", ClearIOStates), - - //HOOK_DEF(0x01DA0930, "_Z19Legacy_ErrorMessageiPKc", Legacy_ErrorMessage), // NOXREF - //HOOK_DEF(0x01DA09C0, "_Z11Sys_IsWin95v", Sys_IsWin95), // NOXREF - //HOOK_DEF(0x01DA09D0, "_Z11Sys_IsWin98v", Sys_IsWin98), // NOXREF - //HOOK_DEF(0x01DA0980, "_Z30Legacy_MP3subsys_Suspend_Audiov", Legacy_MP3subsys_Suspend_Audio), // NOXREF - //HOOK_DEF(0x01DA0990, "_Z29Legacy_MP3subsys_Resume_Audiov", Legacy_MP3subsys_Resume_Audio), // NOXREF - //HOOK_DEF(0x01DA13E0, "_Z22BuildMapCycleListHintsPPc", BuildMapCycleListHints), // NOXREF - - //HOOK_DEF(0x, Sys_Init), // NOXREF - //HOOK_DEF(0x, Sys_Shutdown), // NOXREF - //HOOK_DEF(0x, Sys_ShutdownArgv), // NOXREF - //HOOK_DEF(0x, Sys_ShutdownLauncherInterface), // NOXREF - //HOOK_DEF(0x, Sys_ShutdownAuthentication), // NOXREF - //HOOK_DEF(0x01DA0760, SetRateRegistrySetting), // NOXREF - //HOOK_DEF(0x01DA0780, GetRateRegistrySetting), // NOXREF - -#endif // Sys_Dll2_region - -#ifndef CModel_region - - HOOK_DEF(0x01D281B0, Mod_Init), - HOOK_DEF(0x01D281D0, Mod_DecompressVis), - HOOK_DEF(0x01D28210, Mod_LeafPVS), - HOOK_DEF(0x01D28270, CM_DecompressPVS), - HOOK_DEF(0x01D282E0, CM_LeafPVS), - HOOK_DEF(0x01D28310, CM_LeafPAS), - HOOK_DEF(0x01D28340, CM_FreePAS), - HOOK_DEF(0x01D28380, CM_CalcPAS), - HOOK_DEF(0x01D28580, CM_HeadnodeVisible), - -#endif // CModel_region - -#ifndef Model_region - - HOOK_DEF(0x01D50B80, SW_Mod_Init), - HOOK_DEF(0x01D50B90, Mod_Extradata), - HOOK_DEF(0x01D50BF0, Mod_PointInLeaf), - HOOK_DEF(0x01D50C80, Mod_ClearAll), - HOOK_DEF(0x01D50CC0, Mod_FillInCRCInfo), - HOOK_DEF(0x01D50CE0, Mod_FindName), - HOOK_DEF(0x01D50E90, Mod_LoadModel), - HOOK_DEF(0x01D51110, Mod_ForName), - HOOK_DEF(0x01D51150, Mod_AdInit), - HOOK_DEF(0x01D511F0, Mod_AdSwap), - HOOK_DEF(0x01D51280, Mod_LoadTextures), - HOOK_DEF(0x01D517C0, Mod_LoadLighting), - HOOK_DEF(0x01D51810, Mod_LoadVisibility), - HOOK_DEF(0x01D51860, Mod_LoadEntities), - HOOK_DEF(0x01D51930, Mod_LoadVertexes), - HOOK_DEF(0x01D519E0, Mod_LoadSubmodels), - HOOK_DEF(0x01D51B10, Mod_LoadEdges), - HOOK_DEF(0x01D51BA0, Mod_LoadTexinfo), - HOOK_DEF(0x01D51D60, CalcSurfaceExtents), - HOOK_DEF(0x01D51F10, Mod_LoadFaces), - HOOK_DEF(0x01D52140, Mod_SetParent), - HOOK_DEF(0x01D52180, Mod_LoadNodes), - HOOK_DEF(0x01D52330, Mod_LoadLeafs), - HOOK_DEF(0x01D52490, Mod_LoadClipnodes), - HOOK_DEF(0x01D52630, Mod_MakeHull0), - HOOK_DEF(0x01D52720, Mod_LoadMarksurfaces), - HOOK_DEF(0x01D527E0, Mod_LoadSurfedges), - HOOK_DEF(0x01D52860, Mod_LoadPlanes), - HOOK_DEF(0x01D52970, RadiusFromBounds), - HOOK_DEF(0x01D52A00, Mod_LoadBrushModel), - HOOK_DEF(0x01D53410, Mod_LoadSpriteFrame), - HOOK_DEF(0x01D53510, Mod_LoadSpriteGroup), - HOOK_DEF(0x01D535E0, Mod_LoadSpriteModel), - HOOK_DEF(0x01D53820, Mod_Print), - //HOOK_DEF(0x01D52C30, Mod_LoadAliasFrame), - //HOOK_DEF(0x01D52CE0, Mod_LoadAliasGroup), - //HOOK_DEF(0x01D52DF0, Mod_LoadAliasSkin), - //HOOK_DEF(0x01D52E60, Mod_LoadAliasSkinGroup), - //HOOK_DEF(0x01D52F40, Mod_LoadAliasModel), - //HOOK_DEF(0x01D53800, Mod_UnloadSpriteTextures), - //HOOK_DEF(0x01D538A0, Mod_ChangeGame), - //HOOK_DEF(0x01D51100, Mod_MarkClient), // NOXREF - //HOOK_DEF(0x01D50DF0, Mod_ValidateCRC), // NOXREF - //HOOK_DEF(0x01D50E50, Mod_NeedCRC), // NOXREF - -#endif // Model_region - -#ifndef Sv_Log_region - - HOOK_DEF(0x01D873D0, Log_Printf), - HOOK_DEF(0x01D875A0, Log_PrintServerVars), - HOOK_DEF(0x01D87600, Log_Close), - HOOK_DEF(0x01D87630, Log_Open), - HOOK_DEF(0x01D87850, SV_SetLogAddress_f), - HOOK_DEF(0x01D87990, SV_AddLogAddress_f), - HOOK_DEF(0x01D87BC0, SV_DelLogAddress_f), - -#endif // Sv_Log_region - -#ifndef Cl_Null_region - - //HOOK_DEF(0x, CL_RecordHUDCommand), - //HOOK_DEF(0x, R_DecalRemoveAll), - //HOOK_DEF(0x, CL_CheckForResend), - //HOOK_DEF(0x, CL_CheckFile), - //HOOK_DEF(0x01D17350, CL_ClearClientState), - //HOOK_DEF(0x, CL_Connect_f), - //HOOK_DEF(0x, CL_DecayLights), - //HOOK_DEF(0x01D17490, CL_Disconnect), - //HOOK_DEF(0x01D17660, CL_Disconnect_f), - //HOOK_DEF(0x, CL_EmitEntities), - //HOOK_DEF(0x, CL_InitClosest), - //HOOK_DEF(0x, CL_Init), - HOOK_DEF(0x01D131E0, CL_Particle), - //HOOK_DEF(0x, CL_PredictMove), - //HOOK_DEF(0x, CL_PrintLogos), - //HOOK_DEF(0x, CL_ReadPackets), - //HOOK_DEF(0x, CL_RequestMissingResources), - //HOOK_DEF(0x, CL_Move), - //HOOK_DEF(0x, CL_SendConnectPacket), - //HOOK_DEF(0x01D0FABD, CL_StopPlayback), - //HOOK_DEF(0x, CL_UpdateSoundFade), - //HOOK_DEF(0x, CL_AdjustClock), - //HOOK_DEF(0x01D48910, CL_Save), - //HOOK_DEF(0x01D19650, CL_HudMessage), - //HOOK_DEF(0x, Key_WriteBindings), - //HOOK_DEF(0x, ClientDLL_UpdateClientData), - //HOOK_DEF(0x, ClientDLL_HudVidInit), - //HOOK_DEF(0x, Chase_Init), - //HOOK_DEF(0x, Key_Init), - //HOOK_DEF(0x, ClientDLL_Init), - //HOOK_DEF(0x, Con_Shutdown), - //HOOK_DEF(0x, DispatchDirectUserMsg), - //HOOK_DEF(0x, CL_ShutDownUsrMessages), - //HOOK_DEF(0x, CL_ShutDownClientStatic), - //HOOK_DEF(0x, ClientDLL_MoveClient), - //HOOK_DEF(0x, CL_Shutdown), - //HOOK_DEF(0x, ClientDLL_Frame), - //HOOK_DEF(0x, ClientDLL_CAM_Think), - //HOOK_DEF(0x, CL_InitEventSystem), - //HOOK_DEF(0x, CL_CheckClientState), - //HOOK_DEF(0x, CL_RedoPrediction), - //HOOK_DEF(0x, CL_SetLastUpdate), - //HOOK_DEF(0x, Con_NPrintf), - //HOOK_DEF(0x01D805A0, Sequence_OnLevelLoad), - //HOOK_DEF(0x01D1CDD0, CL_WriteMessageHistory), - //HOOK_DEF(0x, CL_MoveSpectatorCamera), - //HOOK_DEF(0x, CL_AddVoiceToDatagram), - //HOOK_DEF(0x, CL_VoiceIdle), - //HOOK_DEF(0x, PollDInputDevices), - //HOOK_DEF(0x, CL_KeepConnectionActive), - //HOOK_DEF(0x, CL_UpdateModuleC), - //HOOK_DEF(0x, VGuiWrap2_IsInCareerMatch), - //HOOK_DEF(0x, VguiWrap2_GetCareerUI), - //HOOK_DEF(0x, VGuiWrap2_GetLocalizedStringLength), - //HOOK_DEF(0x01D07630, VGuiWrap2_LoadingStarted), - //HOOK_DEF(0x, ConstructTutorMessageDecayBuffer), - //HOOK_DEF(0x, ProcessTutorMessageDecayBuffer), - //HOOK_DEF(0x, GetTimesTutorMessageShown), - //HOOK_DEF(0x, RegisterTutorMessageShown), - //HOOK_DEF(0x, ResetTutorMessageDecayData), - //HOOK_DEF(0x01D83340, SetCareerAudioState), - -#endif // Cl_Null_region - -#ifndef Snd_Null_region - - //HOOK_DEF(0x0, S_Init), - //HOOK_DEF(0x0, S_AmbientOff), - //HOOK_DEF(0x0, S_AmbientOn), - //HOOK_DEF(0x0, S_Shutdown), - //HOOK_DEF(0x0, S_TouchSound), - //HOOK_DEF(0x0, S_ClearBuffer), - //HOOK_DEF(0x0, S_StartStaticSound), - //HOOK_DEF(0x0, S_StartDynamicSound), - //HOOK_DEF(0x0, S_StopSound), - //HOOK_DEF(0x0, S_PrecacheSound), - //HOOK_DEF(0x0, S_ClearPrecache), - //HOOK_DEF(0x0, S_Update), - //HOOK_DEF(0x0, S_StopAllSounds), - //HOOK_DEF(0x0, S_BeginPrecaching), - //HOOK_DEF(0x0, S_EndPrecaching), - //HOOK_DEF(0x0, S_ExtraUpdate), - //HOOK_DEF(0x0, S_LocalSound), - //HOOK_DEF(0x0, S_BlockSound), - //HOOK_DEF(0x0, S_PrintStats), - //HOOK_DEF(0x0, Voice_RecordStart), - //HOOK_DEF(0x0, Voice_IsRecording), - //HOOK_DEF(0x0, Voice_RegisterCvars), - //HOOK_DEF(0x01DB65D0, Voice_Deinit), - //HOOK_DEF(0x0, Voice_Idle), - //HOOK_DEF(0x0, Voice_RecordStop), - -#endif // Snd_Null_region - -#ifndef Sv_Steam3_region - - HOOK_SYMBOLDEF(0x01D994C0, "_ZN13CSteam3Server19NotifyClientConnectEP8client_sPKvj", CSteam3Server::NotifyClientConnect), - HOOK_SYMBOLDEF(0x01D98B20, "_ZN13CSteam3Server14OnLogonFailureEP27SteamServerConnectFailure_t", CSteam3Server::OnLogonFailure), - HOOK_SYMBOLDEF(0x01D99A10, "_ZN13CSteam3Server24SendUpdatedServerDetailsEv", CSteam3Server::SendUpdatedServerDetails), - HOOK_SYMBOLDEF(0x01D98A70, "_ZN13CSteam3Server14OnLogonSuccessEP23SteamServersConnected_t", CSteam3Server::OnLogonSuccess), - HOOK_SYMBOLDEF(0x01D98A40, "_ZN13CSteam3Server18OnGSPolicyResponseEP18GSPolicyResponse_t", CSteam3Server::OnGSPolicyResponse), - HOOK_SYMBOLDEF(0x01D98AE0, "_ZN13CSteam3Server10GetSteamIDEv", CSteam3Server::GetSteamID), - HOOK_SYMBOLDEF(0x01D98F10, "_ZN13CSteam3Server21ClientFindFromSteamIDER8CSteamID", CSteam3Server::ClientFindFromSteamID), - HOOK_SYMBOLDEF(0x01D98DF0, "_ZN13CSteam3Server17OnGSClientApproveEP17GSClientApprove_t", CSteam3Server::OnGSClientApprove), - HOOK_SYMBOLDEF(0x01D99660, "_ZN13CSteam3Server22NotifyClientDisconnectEP8client_s", CSteam3Server::NotifyClientDisconnect), - HOOK_SYMBOLDEF(0x01D98BC0, "_ZN13CSteam3Server20OnGSClientDenyHelperEP8client_s11EDenyReasonPKc", CSteam3Server::OnGSClientDenyHelper), - HOOK_SYMBOLDEF(0x01D98B90, "_ZN13CSteam3Server14OnGSClientDenyEP14GSClientDeny_t", CSteam3Server::OnGSClientDeny), - HOOK_SYMBOLDEF(0x01D98DC0, "_ZN13CSteam3Server14OnGSClientKickEP14GSClientKick_t", CSteam3Server::OnGSClientKick), - HOOK_SYMBOLDEF(0x01D996B0, "_ZN13CSteam3Server19NotifyOfLevelChangeEb", CSteam3Server::NotifyOfLevelChange), - HOOK_SYMBOLDEF(0x01D99110, "_ZN13CSteam3Server8ActivateEv", CSteam3Server::Activate), - HOOK_SYMBOLDEF(0x01D99770, "_ZN13CSteam3Server8RunFrameEv", CSteam3Server::RunFrame), - HOOK_SYMBOLDEF(0x01D99600, "_ZN13CSteam3Server16NotifyBotConnectEP8client_s", CSteam3Server::NotifyBotConnect), - - HOOK_DEF(0x01D99550, ISteamGameServer_CreateUnauthenticatedUserConnection), - HOOK_DEF(0x01D99590, ISteamGameServer_BUpdateUserData), - HOOK_DEF(0x01D995D0, ISteamApps_BIsSubscribedApp), - HOOK_DEF(0x01D99AB0, Steam_GetCommunityName), - HOOK_DEF(0x01D99CA0, Steam_NotifyClientConnect), - HOOK_DEF(0x01D99CD0, Steam_NotifyBotConnect), - HOOK_DEF(0x01D99D00, Steam_NotifyClientDisconnect), - HOOK_DEF(0x01D99D20, Steam_NotifyOfLevelChange), - HOOK_DEF(0x01D99D40, Steam_Shutdown), - HOOK_DEF(0x01D99D70, Steam_Activate), - HOOK_DEF(0x01D99DC0, Steam_RunFrame), - HOOK_DEF(0x01D99DE0, Steam_SetCVar), - HOOK_DEF(0x01D99E10, Steam_ClientRunFrame), - HOOK_DEF(0x01D99E20, Steam_InitClient), - HOOK_DEF(0x01D99E30, Steam_GSInitiateGameConnection), - HOOK_DEF(0x01D99E70, Steam_GSTerminateGameConnection), - HOOK_DEF(0x01D99E90, Steam_ShutdownClient), - HOOK_DEF(0x01D99EA0, Steam_GSGetSteamID), - HOOK_DEF(0x01D99EB0, Steam_GSBSecure), - HOOK_DEF(0x01D99ED0, Steam_GSBLoggedOn), - HOOK_DEF(0x01D99F00, Steam_GSBSecurePreference), - HOOK_DEF(0x01D99F10, Steam_Steam3IDtoSteam2), - HOOK_DEF(0x01D99F50, Steam_StringToSteamID), - HOOK_DEF(0x01D99FD0, Steam_GetGSUniverse), - HOOK_DEF(0x01D9A020, Steam3Server), - HOOK_DEF(0x01D9A1D0, Steam3Client), - HOOK_DEF(0x01D9A1E0, Master_SetMaster_f), - HOOK_DEF(0x01D9A2D0, Steam_HandleIncomingPacket), - -#endif // Sv_Steam3_region - -#ifndef Host_region - - HOOK_DEF(0x01D43A00, Host_EndGame), - HOOK_DEF(0x01D43AC0, Host_Error), - HOOK_DEF(0x01D43BA0, Host_InitLocal), - HOOK_DEF(0x01D43C90, Info_WriteVars), // NOXREF - HOOK_DEF(0x01D43D70, Host_WriteConfiguration), // NOXREF - HOOK_DEF(0x01D43FA0, Host_WriteCustomConfig), - HOOK_DEF(0x01D44190, SV_ClientPrintf), - HOOK_DEF(0x01D441F0, SV_BroadcastPrintf), - HOOK_DEF(0x01D442A0, Host_ClientCommands), - HOOK_DEF(0x01D44310, SV_DropClient), - HOOK_DEF(0x01D44510, Host_ClearClients), - HOOK_DEF(0x01D446B0, Host_ShutdownServer), - HOOK_DEF(0x01D447F0, SV_ClearClientStates), - HOOK_DEF(0x01D44830, Host_CheckDyanmicStructures), - HOOK_DEF(0x01D44880, Host_ClearMemory), - HOOK_DEF(0x01D44900, Host_FilterTime), - HOOK_DEF(0x01D44B50, Master_IsLanGame), - HOOK_DEF(0x01D44B70, Master_Heartbeat_f), - HOOK_DEF(0x01D44B80, Host_ComputeFPS), - HOOK_DEF(0x01D44BB0, Host_GetHostInfo), - HOOK_DEF(0x01D44C80, Host_Speeds), - HOOK_DEF(0x01D44DC0, Host_UpdateScreen), - HOOK_DEF(0x01D44EB0, Host_UpdateSounds), - HOOK_DEF(0x01D44F30, Host_CheckConnectionFailure), - HOOK_DEF(0x01D44F90, _Host_Frame), - HOOK_DEF(0x01D45150, Host_Frame), - HOOK_DEF(0x01D45290, CheckGore), - HOOK_DEF(0x01D45450, Host_IsSinglePlayerGame), - HOOK_DEF(0x01D45470, Host_IsServerActive), - HOOK_DEF(0x01D45480, Host_Version), - HOOK_DEF(0x01D456A0, Host_Init), - HOOK_DEF(0x01D459A0, Host_Shutdown), - -#endif // Host_region - -#ifndef Host_Cmd_region - - HOOK_DEF(0x01D45AF0, SV_GetPlayerHulls), - HOOK_DEF(0x01D45B20, Host_InitializeGameDLL), - HOOK_DEF(0x01D45BA0, Host_Motd_f), - HOOK_DEF(0x01D45D00, Host_Motd_Write_f), - HOOK_DEF(0x01D45E70, Host_GetStartTime), - HOOK_DEF(0x01D45E80, Host_UpdateStats), // UNTESTED Linux - HOOK_DEF(0x01D45FB0, GetStatsString), - HOOK_DEF(0x01D460B0, Host_Stats_f), - HOOK_DEF(0x01D460F0, Host_Quit_f), - HOOK_DEF(0x01D46140, Host_Quit_Restart_f), - HOOK_DEF(0x01D46250, Host_Status_Printf), - HOOK_DEF(0x01D462F0, Host_Status_f), - HOOK_DEF(0x01D467B0, Host_Status_Formatted_f), - HOOK_DEF(0x01D46EC0, Host_Ping_f), - HOOK_DEF(0x01D46F30, Host_Map), - HOOK_DEF(0x01D470D0, Host_Map_f), - HOOK_DEF(0x01D473B0, Host_Career_f), - HOOK_DEF(0x01D473D0, Host_Maps_f), - HOOK_DEF(0x01D47410, Host_Changelevel_f), - HOOK_DEF(0x01D47510, Host_FindRecentSave), - HOOK_DEF(0x01D47600, Host_Restart_f), - HOOK_DEF(0x01D47690, Host_Reload_f), - HOOK_DEF(0x01D47710, Host_Reconnect_f), - HOOK_DEF(0x01D477E0, Host_SaveGameDirectory), - HOOK_DEF(0x01D47810, Host_SavegameComment), - HOOK_DEF(0x01D478B0, Host_SaveAgeList), - HOOK_DEF(0x01D479B0, Host_ValidSave), - HOOK_DEF(0x01D47A70, SaveInit), - HOOK_DEF(0x01D47B80, SaveExit), - HOOK_DEF(0x01D47BC0, SaveGameSlot), - HOOK_DEF(0x01D47E70, Host_Savegame_f), - HOOK_DEF(0x01D47F60, Host_AutoSave_f), - HOOK_DEF(0x01D47FF0, SaveGame), - HOOK_DEF(0x01D48020, SaveReadHeader), - HOOK_DEF(0x01D481A0, SaveReadComment), // NOXREF - HOOK_DEF(0x01D481D0, Host_Loadgame_f), - HOOK_DEF(0x01D48220, LoadGame), - HOOK_DEF(0x01D48250, Host_Load), - HOOK_DEF(0x01D484C0, SaveGamestate), - HOOK_DEF(0x01D48A00, EntityInit), - HOOK_DEF(0x01D48A50, LoadSaveData), - HOOK_DEF(0x01D48C70, ParseSaveTables), - HOOK_DEF(0x01D48DC0, EntityPatchWrite), - HOOK_DEF(0x01D48EB0, EntityPatchRead), - HOOK_DEF(0x01D48F60, LoadGamestate), - HOOK_DEF(0x01D491D0, EntryInTable), - HOOK_DEF(0x01D49220, LandmarkOrigin), - HOOK_DEF(0x01D49290, EntityInSolid), - HOOK_DEF(0x01D49320, CreateEntityList), - HOOK_DEF(0x01D49570, LoadAdjacentEntities), - HOOK_DEF(0x01D49730, FileSize), - HOOK_DEF(0x01D49750, FileCopy), - HOOK_DEF(0x01D497B0, DirectoryCopy), - HOOK_DEF(0x01D49880, DirectoryExtract), - HOOK_DEF(0x01D49930, DirectoryCount), - HOOK_DEF(0x01D49970, Host_ClearSaveDirectory), - HOOK_DEF(0x01D49AB0, Host_ClearGameState), - HOOK_DEF(0x01D49AD0, Host_Changelevel2_f), - HOOK_DEF(0x01D49CB0, Host_Version_f), - HOOK_DEF(0x01D49CE0, Host_FullInfo_f), - HOOK_DEF(0x01D49E00, Host_KillVoice_f), // NOXREF - HOOK_DEF(0x01D49E10, Host_SetInfo_f), - HOOK_DEF(0x01D49EB0, Host_Say), - HOOK_DEF(0x01D4A060, Host_Say_f), - HOOK_DEF(0x01D4A070, Host_Say_Team_f), - HOOK_DEF(0x01D4A080, Host_Tell_f), - HOOK_DEF(0x01D4A230, Host_Kill_f), - HOOK_DEF(0x01D4A280, Host_TogglePause_f), - HOOK_DEF(0x01D4A320, Host_Pause_f), - HOOK_DEF(0x01D4A380, Host_Unpause_f), - HOOK_DEF(0x01D4A620, Host_Interp_f), - HOOK_DEF(0x01D4A650, Host_NextDemo), - HOOK_DEF(0x01D4A700, Host_Startdemos_f), - HOOK_DEF(0x01D4A7C0, Host_Demos_f), - HOOK_DEF(0x01D4A7F0, Host_Stopdemo_f), - HOOK_DEF(0x01D4A810, Host_EndSection), // NOXREF - HOOK_DEF(0x01D4A910, Host_Soundfade_f), - HOOK_DEF(0x01D4AA10, Host_KillServer_f), - HOOK_DEF(0x01D4AA50, Host_VoiceRecordStart_f), - HOOK_DEF(0x01D4AAA0, Host_VoiceRecordStop_f), - HOOK_DEF(0x01D4AC90, Host_Crash_f), // NOXREF - HOOK_DEF(0x01D4ACA0, Host_InitCommands), - HOOK_DEF(0x01D4B060, SV_CheckBlendingInterface), - HOOK_DEF(0x01D4B0D0, SV_CheckSaveGameCommentInterface), - -#endif // Host_Cmd_region - -#ifndef Pmove_region - - HOOK_DEF(0x01D5B490, PM_AddToTouched), - HOOK_DEF(0x01D5B530, PM_StuckTouch), - HOOK_DEF(0x01D5B590, PM_Init), - -#endif // Pmove_region - -#ifndef Pmovetst_region - - HOOK_DEF(0x01D5B8F0, PM_TraceModel), - HOOK_DEF(0x01D5B990, PM_GetModelBounds), - HOOK_DEF(0x01D5B9C0, PM_GetModelType), - HOOK_DEF(0x01D5B9D0, PM_InitBoxHull), - HOOK_DEF(0x01D5BA60, PM_HullForBox), - HOOK_DEF(0x01D5BAB0, PM_HullPointContents), - HOOK_DEF(0x01D5BB50, PM_LinkContents), - HOOK_DEF(0x01D5BC10, PM_PointContents), - HOOK_DEF(0x01D5BCA0, PM_WaterEntity), - HOOK_DEF(0x01D5BD10, PM_TruePointContents), - HOOK_DEF(0x01D5BD40, PM_HullForStudioModel), - HOOK_DEF(0x01D5BDF0, PM_HullForBsp), - HOOK_DEF(0x01D5BEA0, _PM_TestPlayerPosition), - HOOK_DEF(0x01D5C190, PM_TestPlayerPosition), - HOOK_DEF(0x01D5C1B0, PM_TestPlayerPositionEx), - HOOK_DEF(0x01D5C1D0, _PM_PlayerTrace), - HOOK_DEF(0x01D5C890, PM_PlayerTrace), - HOOK_DEF(0x01D5C8F0, PM_PlayerTraceEx), - HOOK_DEF(0x01D5C9C8, PM_TraceLine), - HOOK_DEF(0x01D5CA60, PM_TraceLineEx), - HOOK_DEF(0x01D5CB20, PM_RecursiveHullCheck), - -#endif // Pmovetst_region - -#ifndef Pr_Edict_region - - HOOK_DEF(0x01D61510, ED_ClearEdict), - HOOK_DEF(0x01D61550, ED_Alloc), - HOOK_DEF(0x01D61610, ED_Free), - HOOK_DEF(0x01D616D0, ED_Count), // NOXREF - HOOK_DEF(0x01D61770, ED_NewString), - HOOK_DEF(0x01D617D0, ED_ParseEdict), - HOOK_DEF(0x01D61A70, ED_LoadFromFile), - HOOK_DEF(0x01D61B80, PR_Init), // NOXREF - HOOK_DEF(0x01D61B90, EDICT_NUM), - HOOK_DEF(0x01D61BD0, NUM_FOR_EDICT), - HOOK_DEF(0x01D61C10, SuckOutClassname), - HOOK_DEF(0x01D61CD0, ReleaseEntityDLLFields), - HOOK_DEF(0x01D61CF0, InitEntityDLLFields), - HOOK_DEF(0x01D61D00, PvAllocEntPrivateData), - HOOK_DEF(0x01D61D30, PvEntPrivateData), - HOOK_DEF(0x01D61D50, FreeEntPrivateData), - HOOK_DEF(0x01D61D90, FreeAllEntPrivateData), - HOOK_DEF(0x01D61DD0, PEntityOfEntOffset), - HOOK_DEF(0x01D61DE0, EntOffsetOfPEntity), - HOOK_DEF(0x01D61DF0, IndexOfEdict), - HOOK_DEF(0x01D61E40, PEntityOfEntIndex), - HOOK_DEF(0x01D61E80, SzFromIndex), - HOOK_DEF(0x01D61E90, GetVarsOfEnt), - HOOK_DEF(0x01D61EA0, FindEntityByVars), - HOOK_DEF(0x01D61EE0, CVarGetFloat), - HOOK_DEF(0x01D61F00, CVarGetString), - HOOK_DEF(0x01D61F20, CVarGetPointer), - HOOK_DEF(0x01D61F40, CVarSetFloat), - HOOK_DEF(0x01D61F60, CVarSetString), - HOOK_DEF(0x01D61F80, CVarRegister), - HOOK_DEF(0x01D61FA0, AllocEngineString), - HOOK_DEF(0x01D61FC0, SaveSpawnParms), - HOOK_DEF(0x01D61FF0, GetModelPtr), - -#endif // Pr_Edict_region - -#ifndef Pr_Cmds_region - - //HOOK_DEF(0x01D5CF00, PF_makevectors_I), - //HOOK_DEF(0x01D5CF20, PF_Time), - //HOOK_DEF(0x01D5CF40, PF_setorigin_I), - //HOOK_DEF(0x01D5CF80, SetMinMaxSize), - //HOOK_DEF(0x01D5D030, PF_setsize_I), - //HOOK_DEF(0x01D5D050, PF_setmodel_I), - //HOOK_DEF(0x01D5D0F0, PF_modelindex), - //HOOK_DEF(0x01D5D110, ModelFrames), - //HOOK_DEF(0x01D5D150, PF_bprint), - //HOOK_DEF(0x01D5D170, PF_sprint), - //HOOK_DEF(0x01D5D1D0, ServerPrint), - //HOOK_DEF(0x01D5D1F0, ClientPrintf), - //HOOK_DEF(0x01D5D2A0, PF_vectoyaw_I), - //HOOK_DEF(0x01D5D330, PF_vectoangles_I), - //HOOK_DEF(0x01D5D350, PF_particle_I), - //HOOK_DEF(0x01D5D380, PF_ambientsound_I), - //HOOK_DEF(0x01D5D4C0, PF_sound_I), - //HOOK_DEF(0x01D5D5A0, PF_traceline_Shared), - //HOOK_DEF(0x01D5D600, PF_traceline_DLL), - //HOOK_DEF(0x01D5D6C0, TraceHull), - //HOOK_DEF(0x01D5D770, TraceSphere), - //HOOK_DEF(0x01D5D780, TraceModel), - //HOOK_DEF(0x01D5D890, SurfaceAtPoint), - //HOOK_DEF(0x01D5DA90, TraceTexture), - //HOOK_DEF(0x01D5DCA0, PF_TraceToss_Shared), - //HOOK_DEF(0x01D5DCE0, SV_SetGlobalTrace), - //HOOK_DEF(0x01D5DD80, PF_TraceToss_DLL), - //HOOK_DEF(0x01D5DE40, TraceMonsterHull), - //HOOK_DEF(0x01D5DF10, PF_newcheckclient), - //HOOK_DEF(0x01D5DFF0, PF_checkclient_I), - //HOOK_DEF(0x01D5E110, PVSNode), - //HOOK_DEF(0x01D5E1D0, PVSMark), - //HOOK_DEF(0x01D5E250, PVSFindEntities), - //HOOK_DEF(0x01D5E360, ValidCmd), - //HOOK_DEF(0x01D5E390, PF_stuffcmd_I), - //HOOK_DEF(0x01D5E450, PF_localcmd_I), - //HOOK_DEF(0x01D5E480, PF_localexec_I), - //HOOK_DEF(0x01D5E490, FindEntityInSphere), - //HOOK_DEF(0x01D5E5C0, PF_Spawn_I), - //HOOK_DEF(0x01D5E5D0, CreateNamedEntity), - //HOOK_DEF(0x01D5E640, PF_Remove_I), - //HOOK_DEF(0x01D5E920, PF_find_Shared), - //HOOK_DEF(0x01D5E660, iGetIndex), - //HOOK_DEF(0x01D5E8C0, FindEntityByString), - //HOOK_DEF(0x01D5E9B0, GetEntityIllum), - //HOOK_DEF(0x01D5EA50, PR_IsEmptyString), - //HOOK_DEF(0x01D5EA60, PF_precache_sound_I), - //HOOK_DEF(0x01D5EB50, EV_Precache), - //HOOK_DEF(0x01D5ECD0, EV_PlayReliableEvent), - //HOOK_DEF(0x01D5EE10, EV_Playback), - //HOOK_DEF(0x01D5F190, EV_SV_Playback), - //HOOK_DEF(0x01D5F210, PF_precache_model_I), - //HOOK_DEF(0x01D5F310, PF_precache_generic_I), - //HOOK_DEF(0x01D5F3E0, PF_IsMapValid_I), - //HOOK_DEF(0x01D5F430, PF_NumberOfEntities_I), - //HOOK_DEF(0x01D5F460, PF_GetInfoKeyBuffer_I), - //HOOK_DEF(0x01D5F4B0, PF_InfoKeyValue_I), - //HOOK_DEF(0x01D5F4D0, PF_SetKeyValue_I), - //HOOK_DEF(0x01D5F530, PF_RemoveKey_I), - //HOOK_DEF(0x01D5F550, PF_SetClientKeyValue_I), - //HOOK_DEF(0x01D5F5E0, PF_walkmove_I), - //HOOK_DEF(0x01D5F690, PF_droptofloor_I), - //HOOK_DEF(0x01D5F780, PF_DecalIndex), - //HOOK_DEF(0x01D5F7D0, PF_lightstyle_I), - //HOOK_DEF(0x01D5F860, PF_checkbottom_I), - //HOOK_DEF(0x01D5F880, PF_pointcontents_I), - //HOOK_DEF(0x01D5F8A0, PF_aim_I), - //HOOK_DEF(0x01D5FB60, PF_changeyaw_I), - //HOOK_DEF(0x01D5FC50, PF_changepitch_I), - //HOOK_DEF(0x01D5FD40, PF_setview_I), - //HOOK_DEF(0x01D5FDC0, PF_crosshairangle_I), - //HOOK_DEF(0x01D5FEC0, PF_CreateFakeClient_I), - //HOOK_DEF(0x01D60070, PF_RunPlayerMove_I), - //HOOK_DEF(0x01D60180, WriteDest_Parm), - //HOOK_DEF(0x01D60260, PF_MessageBegin_I), - //HOOK_DEF(0x01D60350, PF_MessageEnd_I), - //HOOK_DEF(0x01D605E0, PF_WriteByte_I), - //HOOK_DEF(0x01D60610, PF_WriteChar_I), - //HOOK_DEF(0x01D60640, PF_WriteShort_I), - //HOOK_DEF(0x01D60670, PF_WriteLong_I), - //HOOK_DEF(0x01D606A0, PF_WriteAngle_I), - //HOOK_DEF(0x01D606D0, PF_WriteCoord_I), - //HOOK_DEF(0x01D60710, PF_WriteString_I), - //HOOK_DEF(0x01D60740, PF_WriteEntity_I), - //HOOK_DEF(0x01D60770, PF_makestatic_I), - //HOOK_DEF(0x01D608C0, PF_StaticDecal), - //HOOK_DEF(0x01D60940, PF_setspawnparms_I), - //HOOK_DEF(0x01D60970, PF_changelevel_I), - HOOK_DEF(0x01D609D0, SeedRandomNumberGenerator), - HOOK_DEF(0x01D60A10, ran1), - HOOK_DEF(0x01D60AE0, fran1), - HOOK_DEF(0x01D60B30, RandomFloat), - HOOK_DEF(0x01D60B60, RandomLong), - //HOOK_DEF(0x01D60BC0, PF_FadeVolume), - //HOOK_DEF(0x01D60C60, PF_SetClientMaxspeed), - //HOOK_DEF(0x01D60CA0, PF_GetPlayerUserId), - //HOOK_DEF(0x01D60CF0, PF_GetPlayerWONId), - HOOK_DEF(0x01D60D00, PF_GetPlayerAuthId), - //HOOK_DEF(0x01D60E00, PF_BuildSoundMsg_I), - //HOOK_DEF(0x01D60E50, PF_IsDedicatedServer), - //HOOK_DEF(0x01D60E60, PF_GetPhysicsInfoString), - //HOOK_DEF(0x01D60EB0, PF_GetPhysicsKeyValue), - //HOOK_DEF(0x01D60F10, PF_SetPhysicsKeyValue), - //HOOK_DEF(0x01D60F70, PF_GetCurrentPlayer), - //HOOK_DEF(0x01D60FB0, PF_CanSkipPlayer), - //HOOK_DEF(0x01D61000, PF_SetGroupMask), - //HOOK_DEF(0x01D61020, PF_CreateInstancedBaseline), - //HOOK_DEF(0x01D61070, PF_Cvar_DirectSet), - //HOOK_DEF(0x01D61090, PF_ForceUnmodified), - //HOOK_DEF(0x01D611B0, PF_GetPlayerStats), - //HOOK_DEF(0x01D61230, QueryClientCvarValueCmd), // NOXREF - //HOOK_DEF(0x01D612D0, QueryClientCvarValueCmd2), // NOXREF - //HOOK_DEF(0x01D61390, QueryClientCvarValue), - //HOOK_DEF(0x01D61410, QueryClientCvarValue2), - //HOOK_DEF(0x01D614A0, hudCheckParm), - //HOOK_DEF(0x01D614F0, EngCheckParm), - -#endif // Pr_Cmds_region - -#ifndef Mathlib_region - - HOOK_DEF(0x01D4F570, anglemod), - //HOOK_DEF(0x, BOPS_Error), - HOOK_DEF(0x01DBEE44, BoxOnPlaneSide), - //HOOK_DEF(0x, InvertMatrix), - HOOK_DEF(0x01D4FD10, AngleVectors), - HOOK_DEF(0x01D4FE70, AngleVectorsTranspose), - HOOK_DEF(0x01D4FF90, AngleMatrix), - //HOOK_DEF(0x, AngleIMatrix), - //HOOK_DEF(0x, NormalizeAngles), - //HOOK_DEF(0x, InterpolateAngles), - HOOK_DEF(0x01D502C0, VectorTransform), - HOOK_DEF(0x01D50320, VectorCompare), - HOOK_DEF(0x01D50350, VectorMA), - //HOOK_DEF(0x, _DotProduct), - //HOOK_DEF(0x, _VectorSubtract), - //HOOK_DEF(0x, _VectorAdd), - //HOOK_DEF(0x, _VectorCopy), - HOOK_DEF(0x01D50420, CrossProduct), - HOOK_DEF(0x01D50460, Length), - HOOK_DEF(0x01D504A0, VectorNormalize), - //HOOK_DEF(0x, VectorInverse), - //HOOK_DEF(0x01D50550, VectorScale), - //HOOK_DEF(0x, Q_log2), - //HOOK_DEF(0x, VectorMatrix), - HOOK_DEF(0x01D50640, VectorAngles), - //HOOK_DEF(0x, R_ConcatRotations), - HOOK_DEF(0x01D50850, R_ConcatTransforms), - //HOOK_DEF(0x, FloorDivMod), - //HOOK_DEF(0x, GreatestCommonDivisor), - //HOOK_DEF(0x, Invert24To16), - -#endif // Mathlib_region - -#ifndef World_region - - HOOK_DEF(0x01DB9050, ClearLink), - HOOK_DEF(0x01DB9060, RemoveLink), - HOOK_DEF(0x01DB9080, InsertLinkBefore), - //HOOK_DEF(0x01DB90A0, InsertLinkAfter), // NOXREF - HOOK_DEF(0x01DB90C0, SV_InitBoxHull), - HOOK_DEF(0x01DB9180, SV_HullForBox), - //HOOK_DEF(0x01DB91D0, SV_HullForBeam), // NOXREF - HOOK_DEF(0x01DB9640, SV_HullForBsp), - HOOK_DEF(0x01DB9780, SV_HullForEntity), - HOOK_DEF(0x01DB9850, SV_CreateAreaNode), - HOOK_DEF(0x01DB9970, SV_ClearWorld), - HOOK_DEF(0x01DB99B0, SV_UnlinkEdict), - HOOK_DEF(0x01DB99E0, SV_TouchLinks), - HOOK_DEF(0x01DB9BC0, SV_FindTouchedLeafs), - HOOK_DEF(0x01DB9CF0, SV_LinkEdict), - HOOK_DEF(0x01DC0614, SV_HullPointContents), - HOOK_DEF(0x01DB9EB0, SV_LinkContents), - HOOK_DEF(0x01DBA0A0, SV_PointContents), - HOOK_DEF(0x01DBA0F0, SV_TestEntityPosition), - HOOK_DEF(0x01DBA160, SV_RecursiveHullCheck), - HOOK_DEF(0x01DBA550, SV_SingleClipMoveToEntity), - HOOK_DEF(0x01DBA950, SV_ClipMoveToEntity), - HOOK_DEF(0x01DBA990, SV_ClipToLinks), - HOOK_DEF(0x01DBAC60, SV_ClipToWorldbrush), - HOOK_DEF(0x01DBAE00, SV_MoveBounds), - HOOK_DEF(0x01DBAE80, SV_MoveNoEnts), - HOOK_DEF(0x01DBAFC0, SV_Move), - -#endif // World_region - -#ifndef Sv_Phys_region - - //HOOK_DEF(0x01D94A90, SV_CheckAllEnts), // NOXREF - HOOK_DEF(0x01D94B00, SV_CheckVelocity), - HOOK_DEF(0x01D94C00, SV_RunThink), - HOOK_DEF(0x01D94CB0, SV_Impact), - HOOK_DEF(0x01D94D50, ClipVelocity), - HOOK_DEF(0x01D94E10, SV_FlyMove), - HOOK_DEF(0x01D952F0, SV_AddGravity), - //HOOK_DEF(0x01D95370, SV_AddCorrectGravity), // NOXREF - //HOOK_DEF(0x01D953F0, SV_FixupGravityVelocity), // NOXREF - HOOK_DEF(0x01D95450, SV_PushEntity), - HOOK_DEF(0x01D95550, SV_PushMove), - HOOK_DEF(0x01D958F0, SV_PushRotate), - HOOK_DEF(0x01D95F00, SV_Physics_Pusher), - HOOK_DEF(0x01D960F0, SV_CheckWater), - - HOOK_DEF(0x01D96290, SV_RecursiveWaterLevel), - HOOK_DEF(0x01D96310, SV_Submerged), - HOOK_DEF(0x01D96410, SV_Physics_None), - HOOK_DEF(0x01D96430, SV_Physics_Follow), - HOOK_DEF(0x01D964F0, SV_Physics_Noclip), - - HOOK_DEF(0x01D96560, SV_CheckWaterTransition), - HOOK_DEF(0x01D96740, SV_Physics_Toss), - HOOK_DEF(0x01D96B20, PF_WaterMove), - - HOOK_DEF(0x01D96E70, SV_Physics_Step), - HOOK_DEF(0x01D97240, SV_Physics), - HOOK_DEF(0x01D97480, SV_Trace_Toss), - -#endif // Sv_Phys_region - -#ifndef Sv_Move_region - - HOOK_DEF(0x01D93A40, SV_CheckBottom), - HOOK_DEF(0x01D93CB0, SV_movetest), - HOOK_DEF(0x01D93ED0, SV_movestep), - HOOK_DEF(0x01D94250, SV_StepDirection), - HOOK_DEF(0x01D942D0, SV_FlyDirection), - HOOK_DEF(0x01D94310, SV_FixCheckBottom), - //HOOK_DEF(0x01D94330, SV_NewChaseDir), // NOXREF - //HOOK_DEF(0x01D94620, SV_CloseEnough), // NOXREF - //HOOK_DEF(0x01D94680, SV_ReachedGoal), // NOXREF - HOOK_DEF(0x01D946D0, SV_NewChaseDir2), - HOOK_DEF(0x01D949C0, SV_MoveToOrigin_I), - -#endif // Sv_Move_region - -#ifndef Sv_pmove_region - - HOOK_DEF(0x01D975F0, PM_SV_PlaybackEventFull), - HOOK_DEF(0x01D97630, PM_SV_PlaySound), - HOOK_DEF(0x01D97670, PM_SV_TraceTexture), - -#endif // Sv_pmove_region - -#ifndef R_Studio_region - - HOOK_DEF(0x01D6F260, SV_InitStudioHull), - HOOK_DEF(0x01D6F2F0, R_CheckStudioCache), - //HOOK_DEF(0x01D6F3C0, R_AddToStudioCache), // NOXREF - HOOK_DEF(0x01D6F500, AngleQuaternion), - HOOK_DEF(0x01D6F600, QuaternionSlerp), - HOOK_DEF(0x01D6F810, QuaternionMatrix), - HOOK_DEF(0x01D6F900, R_StudioCalcBoneAdj), - HOOK_DEF(0x01D6FB60, R_StudioCalcBoneQuaterion), - HOOK_DEF(0x01D6FD20, R_StudioCalcBonePosition), - HOOK_DEF(0x01D6FE70, R_StudioSlerpBones), - HOOK_DEF(0x01D6FF80, R_GetAnim), - HOOK_DEF(0x01D70020, SV_StudioSetupBones), - HOOK_DEF(0x01D70390, SV_SetStudioHullPlane), - HOOK_DEF(0x01D70400, R_StudioHull), - HOOK_DEF(0x01D70A40, SV_HitgroupForStudioHull), - //HOOK_DEF(0x01D70A50, R_InitStudioCache), // NOXREF - //HOOK_DEF(0x01D70A90, R_FlushStudioCache), // NOXREF - HOOK_DEF(0x01D70AA0, R_StudioBodyVariations), - HOOK_DEF(0x01D70AF0, R_StudioPlayerBlend), - HOOK_DEF(0x01D70BD0, SV_HullForStudioModel), - HOOK_DEF(0x01D70E10, DoesSphereIntersect), - HOOK_DEF(0x01D70ED0, SV_CheckSphereIntersection), - HOOK_DEF(0x01D70FF0, AnimationAutomove), - HOOK_DEF(0x01D71000, GetBonePosition), - HOOK_DEF(0x01D710A0, GetAttachment), - HOOK_DEF(0x01D71170, ModelFrameCount), - HOOK_DEF(0x01D76260, R_StudioBoundVertex), - HOOK_DEF(0x01D762F0, R_StudioBoundBone), - HOOK_DEF(0x01D76380, R_StudioAccumulateBoneVerts), - HOOK_DEF(0x01D76420, R_StudioComputeBounds), - HOOK_DEF(0x01D76600, R_GetStudioBounds), - HOOK_DEF(0x01D76C40, R_ResetSvBlending), - -#endif // R_Studio_region - -#ifndef Net_ws_region - - HOOK_DEF(0x01D57050, NET_ThreadLock), - HOOK_DEF(0x01D57070, NET_ThreadUnlock), - HOOK_DEF(0x01D57090, Q_ntohs), - HOOK_DEF(0x01D570A0, NetadrToSockadr), - HOOK_DEF(0x01D57160, SockadrToNetadr), - HOOK_DEF(0x01D571D0, NET_HostToNetShort), // NOXREF - HOOK_DEF(0x01D571E0, NET_CompareAdr), - HOOK_DEF(0x01D57270, NET_CompareClassBAdr), - HOOK_DEF(0x01D572C0, NET_IsReservedAdr), - HOOK_DEF(0x01D57310, NET_CompareBaseAdr), - HOOK_DEF(0x01D57380, NET_AdrToString), - HOOK_DEF(0x01D574A0, NET_BaseAdrToString), - HOOK_DEF(0x01D575A0, NET_StringToSockaddr), - HOOK_DEF(0x01D57820, NET_StringToAdr), - HOOK_DEF(0x01D57890, NET_IsLocalAddress), - HOOK_DEF(0x01D578A0, NET_ErrorString), - HOOK_DEF(0x01D57B20, NET_TransferRawData), - HOOK_DEF(0x01D57B50, NET_GetLoopPacket), - HOOK_DEF(0x01D57C00, NET_SendLoopPacket), - HOOK_DEF(0x01D57C80, NET_RemoveFromPacketList), - HOOK_DEF(0x01D57CA0, NET_CountLaggedList), - HOOK_DEF(0x01D57CC0, NET_ClearLaggedList), - HOOK_DEF(0x01D57D10, NET_AddToLagged), - HOOK_DEF(0x01D57D80, NET_AdjustLag), - HOOK_DEF(0x01D57EC0, NET_LagPacket), - HOOK_DEF(0x01D58090, NET_FlushSocket), - HOOK_DEF(0x01D580E0, NET_GetLong), - HOOK_DEF(0x01D582F0, NET_QueuePacket), - -#ifdef __linux__ - //HOOK_DEF(0x0, NET_Sleep_Timeout), -#endif // __linux__ - - HOOK_DEF(0x01D584A0, NET_Sleep), - HOOK_DEF(0x01D58630, NET_StartThread), - HOOK_DEF(0x01D586B0, NET_StopThread), - HOOK_DEF(0x01D586F0, net_malloc), - HOOK_DEF(0x01D58710, NET_AllocMsg), - HOOK_DEF(0x01D58760, NET_FreeMsg), - HOOK_DEF(0x01D587A0, NET_GetPacket), - HOOK_DEF(0x01D588B0, NET_AllocateQueues), - HOOK_DEF(0x01D588F0, NET_FlushQueues), - HOOK_DEF(0x01D58960, NET_SendLong), - HOOK_DEF(0x01D58AE0, NET_SendPacket), - HOOK_DEF(0x01D58C80, NET_IPSocket), - HOOK_DEF(0x01D58E80, NET_OpenIP), -#ifdef _WIN32 - HOOK_DEF(0x01D59000, NET_IPXSocket), - HOOK_DEF(0x01D59170, NET_OpenIPX), -#endif //_WIN32 - HOOK_DEF(0x01D59240, NET_GetLocalAddress), - HOOK_DEF(0x01D59410, NET_IsConfigured), - HOOK_DEF(0x01D59420, NET_Config), - HOOK_DEF(0x01D596F0, MaxPlayers_f), - HOOK_DEF(0x01D594D0, NET_Init), - HOOK_DEF(0x01D59790, NET_ClearLagData), - HOOK_DEF(0x01D597E0, NET_Shutdown), - HOOK_DEF(0x01D59810, NET_JoinGroup), - HOOK_DEF(0x01D59870, NET_LeaveGroup), - -#endif // Net_ws_region - -#ifndef Net_chan_region - - HOOK_DEF(0x01D54DB0, Netchan_UnlinkFragment), - HOOK_DEF(0x01D54E20, Netchan_OutOfBand), - HOOK_DEF(0x01D54EA0, Netchan_OutOfBandPrint), - HOOK_DEF(0x01D54F00, Netchan_ClearFragbufs), - HOOK_DEF(0x01D54F30, Netchan_ClearFragments), - HOOK_DEF(0x01D54FA0, Netchan_Clear), - HOOK_DEF(0x01D55040, Netchan_Setup), - HOOK_DEF(0x01D550D0, Netchan_CanPacket), - HOOK_DEF(0x01D55130, Netchan_UpdateFlow), - HOOK_DEF(0x01D55240, Netchan_Transmit), - HOOK_DEF(0x01D558E0, Netchan_FindBufferById), - HOOK_DEF(0x01D55950, Netchan_CheckForCompletion), - HOOK_DEF(0x01D55A00, Netchan_Validate), - HOOK_DEF(0x01D55A90, Netchan_Process), - HOOK_DEF(0x01D55F40, Netchan_FragSend), - HOOK_DEF(0x01D55F90, Netchan_AddBufferToList), - HOOK_DEF(0x01D55FE0, Netchan_AllocFragbuf), - HOOK_DEF(0x01D56010, Netchan_AddFragbufToTail), - HOOK_DEF(0x01D56050, Netchan_CreateFragments_), - HOOK_DEF(0x01D56210, Netchan_CreateFragments), - HOOK_DEF(0x01D56250, Netchan_CreateFileFragmentsFromBuffer), - HOOK_DEF(0x01D56450, Netchan_CreateFileFragments), - HOOK_DEF(0x01D56850, Netchan_FlushIncoming), - HOOK_DEF(0x01D568C0, Netchan_CopyNormalFragments), - HOOK_DEF(0x01D569D0, Netchan_CopyFileFragments), - //HOOK_DEF(0x01D56DB0, Netchan_IsSending), - //HOOK_DEF(0x01D56DE0, Netchan_IsReceiving), - HOOK_DEF(0x01D56E10, Netchan_IncomingReady), - //HOOK_DEF(0x01D56E40, Netchan_UpdateProgress), - HOOK_DEF(0x01D56FE0, Netchan_Init), - //HOOK_DEF(0x01D57030, Netchan_CompressPacket), // NOXREF - //HOOK_DEF(0x01D57040, Netchan_DecompressPacket), // NOXREF - -#endif // Net_chan_region - -#ifndef Hashpak_region - - HOOK_DEF(0x01D3E970, HPAK_GetDataPointer), - HOOK_DEF(0x01D3EC40, HPAK_FindResource), - HOOK_DEF(0x01D3ECB0, HPAK_AddToQueue), - HOOK_DEF(0x01D3EDC0, HPAK_FlushHostQueue), - HOOK_DEF(0x01D3EE20, HPAK_AddLump), - HOOK_DEF(0x01D3F3D0, HPAK_RemoveLump), - HOOK_DEF(0x01D3F850, HPAK_ResourceForIndex), - HOOK_DEF(0x01D3F9E0, HPAK_ResourceForHash), - HOOK_DEF(0x01D3FBA0, HPAK_List_f), - HOOK_DEF(0x01D3FE30, HPAK_CreatePak), - HOOK_DEF(0x01D40140, HPAK_Remove_f), - HOOK_DEF(0x01D401F0, HPAK_Validate_f), - HOOK_DEF(0x01D405B0, HPAK_Extract_f), - HOOK_DEF(0x01D409A0, HPAK_Init), - HOOK_DEF(0x01D409F1, HPAK_GetItem), // NOXREF - HOOK_DEF(0x01D40B90, HPAK_CheckSize), - HOOK_DEF(0x01D40CE0, HPAK_ValidatePak), - HOOK_DEF(0x01D40F80, HPAK_CheckIntegrity), - -#endif // Hashpak_region - -#ifndef Wad_region - - HOOK_DEF(0x01DB8D30, W_CleanupName), - HOOK_DEF(0x01DB8D90, W_LoadWadFile), - HOOK_DEF(0x01DB8EF0, W_GetLumpinfo), - HOOK_DEF(0x01DB8F70, W_GetLumpName), - //HOOK_DEF(0x, W_GetLumpNum), // NOXREF - HOOK_DEF(0x01DB8FF0, W_Shutdown), - HOOK_DEF(0x01DB9020, SwapPic), - -#endif // Wad_region - -#ifndef Textures_region - - HOOK_DEF(0x01DA7200, SafeRead), - HOOK_DEF(0x01DA7230, CleanupName), - HOOK_DEF(0x01DA7290, lump_sorter), - HOOK_DEF(0x01DA72E0, ForwardSlashes), - HOOK_DEF(0x01DA7300, TEX_InitFromWad), - HOOK_DEF(0x01DA75D0, TEX_CleanupWadInfo), - HOOK_DEF(0x01DA7630, TEX_LoadLump), - HOOK_DEF(0x01DA76D4, FindMiptex), - HOOK_DEF(0x01DA7740, TEX_AddAnimatingTextures), - -#endif // Textures_region - -#ifndef Sv_user_region - - HOOK_DEF(0x01D9B3B0, SV_ParseConsistencyResponse), - HOOK_DEF(0x01D9B790, SV_FileInConsistencyList), - HOOK_DEF(0x01D9B7F0, SV_TransferConsistencyInfo), - HOOK_DEF(0x01D9B960, SV_SendConsistencyList), - HOOK_DEF(0x01D9BA50, SV_PreRunCmd), - HOOK_DEF(0x01D9BA60, SV_CopyEdictToPhysent), - HOOK_DEF(0x01D9BD70, SV_AddLinksToPM_), - HOOK_DEF(0x01D9C070, SV_AddLinksToPM), - HOOK_DEF(0x01D9C1A0, SV_PlayerRunPreThink), - HOOK_DEF(0x01D9C1C0, SV_PlayerRunThink), - HOOK_DEF(0x01D9C260, SV_CheckMovingGround), - HOOK_DEF(0x01D9C340, SV_ConvertPMTrace), - HOOK_DEF(0x01D9C3A0, SV_ForceFullClientsUpdate), - HOOK_DEF(0x01D9C470, SV_RunCmd), - HOOK_DEF(0x01D9D69F, SV_ValidateClientCommand), - HOOK_DEF(0x01D9D6EF, SV_CalcClientTime), - HOOK_DEF(0x01D9D86F, SV_ComputeLatency), - HOOK_DEF(0x01D9D88F, SV_UnlagCheckTeleport), - HOOK_DEF(0x01D9D8DF, SV_GetTrueOrigin), - HOOK_DEF(0x01D9D96F, SV_GetTrueMinMax), - HOOK_DEF(0x01D9D9EF, SV_FindEntInPack), - HOOK_DEF(0x01D9DA2F, SV_SetupMove), - HOOK_DEF(0x01D9E01F, SV_RestoreMove), - HOOK_DEF(0x01D9E17F, SV_ParseStringCommand), - HOOK_DEF(0x01D9E1DF, SV_ParseDelta), - HOOK_DEF(0x01D9E1FF, SV_EstablishTimeBase), - HOOK_DEF(0x01D9E2EF, SV_ParseMove), - HOOK_DEF(0x01D9E76F, SV_ParseVoiceData), - HOOK_DEF(0x01D9E8DF, SV_IgnoreHLTV), - HOOK_DEF(0x01D9E8EF, SV_ParseCvarValue), - HOOK_DEF(0x01D9E92F, SV_ParseCvarValue2), - HOOK_DEF(0x01D9E9AF, SV_ExecuteClientMessage), - HOOK_DEF(0x01D9EACF, SV_SetPlayer), - HOOK_DEF(0x01D9EB2F, SV_ShowServerinfo_f), - HOOK_DEF(0x01D9EB4F, SV_SendEnts_f), - HOOK_DEF(0x01D9EB7F, SV_FullUpdate_f), - -#endif // Sv_user_region - -#ifndef Tmessage_region - - HOOK_DEF(0x01DA7B00, memfgets), - HOOK_DEF(0x01DA7B90, IsComment), - HOOK_DEF(0x01DA7BD0, IsStartOfText), - HOOK_DEF(0x01DA7BF0, IsEndOfText), - HOOK_DEF(0x01DA7C10, IsWhiteSpace), - //HOOK_DEF(0x01DA7C40, SkipSpace), // NOXREF - //HOOK_DEF(0x01DA7C80, SkipText), // NOXREF - //HOOK_DEF(0x01DA7CC0, ParseFloats), // NOXREF - HOOK_DEF(0x01DA7D10, TrimSpace), - //HOOK_DEF(0x01DA7D90, IsToken), // NOXREF - //HOOK_DEF(0x01DA7DD0, ParseDirective), // NOXREF - //HOOK_DEF(0x01DA80A0, TextMessageParse), // NOXREF - //HOOK_DEF(0x01DA8030, TextMessageShutdown), // NOXREF - //HOOK_DEF(0x01DA8050, TextMessageInit), // NOXREF - //HOOK_DEF(0x01DA8410, TextMessageGet), // NOXREF - -#endif // Tmessage_region - -#ifndef TraceInit_Region - - //HOOK_SYMBOLDEF(0x01DA8B60, "_ZN12CInitTrackerC2Ev", MethodThunk::Constructor), - //HOOK_SYMBOLDEF(0x01DA8BD0, "_ZN12CInitTrackerD2Ev", MethodThunk::Destructor), - - HOOK_SYMBOLDEF(0x01DA8CA0, "_ZN12CInitTracker4InitEPKcS1_i", CInitTracker::Init), - HOOK_SYMBOLDEF(0x01DA8D80, "_ZN12CInitTracker8ShutdownEPKci", CInitTracker::Shutdown), - HOOK_SYMBOLDEF(0x01DA8E60, "_Z9TraceInitPKcS0_i", TraceInit), - HOOK_SYMBOLDEF(0x01DA8E80, "_Z13TraceShutdownPKci", TraceShutdown), - -#endif // TraceInit_Region - -#ifndef Vid_null_region - - //HOOK_DEF(0x, VID_SetPalette), - //HOOK_DEF(0x, VID_ShiftPalette), - //HOOK_DEF(0x, VID_WriteBuffer), - //HOOK_DEF(0x01DB4BD0, VID_Init), - //HOOK_DEF(0x, D_FlushCaches), - //HOOK_DEF(0x, R_SetStackBase), - //HOOK_DEF(0x01D7E3D0, SCR_UpdateScreen), - //HOOK_DEF(0x, V_Init), - //HOOK_DEF(0x, Draw_Init), - //HOOK_DEF(0x, SCR_Init), - //HOOK_DEF(0x01D65630, R_Init), - //HOOK_DEF(0x01D67B20, R_ForceCVars), - //HOOK_DEF(0x01D7E320, SCR_BeginLoadingPlaque), - //HOOK_DEF(0x01D7E3A0, SCR_EndLoadingPlaque), - //HOOK_DEF(0x, R_InitSky), - //HOOK_DEF(0x01D65F70, R_MarkLeaves), - HOOK_DEF(0x01D65570, R_InitTextures), - //HOOK_DEF(0x, StartLoadingProgressBar), - //HOOK_DEF(0x01D07670, ContinueLoadingProgressBar), - //HOOK_DEF(0x01D07700, SetLoadingProgressBarStatusText), - -#endif // Vid_null_region - -#ifndef L_studio_region - - HOOK_DEF(0x01D4F0E0, Mod_LoadStudioModel), - -#endif // L_studio_region - -#ifndef Crc_region - - HOOK_DEF(0x01D2C610, CRC32_Init), - HOOK_DEF(0x01D2C620, CRC32_Final), - HOOK_DEF(0x01D2C630, CRC32_ProcessByte), - HOOK_DEF(0x01D2C660, CRC32_ProcessBuffer), - HOOK_DEF(0x01D2C8D0, COM_BlockSequenceCRCByte), - HOOK_DEF(0x01D2C970, CRC_File), // NOXREF - HOOK_DEF(0x01D2CA40, CRC_MapFile), - HOOK_DEF(0x01D2CBB0, MD5Init), - HOOK_DEF(0x01D2CBE0, MD5Update), - HOOK_DEF(0x01D2CCB0, MD5Final), - HOOK_DEF(0x01D2CD40, MD5Transform), - HOOK_DEF(0x01D2D5B0, MD5_Hash_File), - HOOK_DEF(0x01D2D6F0, MD5_Print), - -#endif // Crc_region - -#ifndef Sv_RemoteAccess_region - - // virtual functions - HOOK_SYMBOL_VIRTUAL_DEF(0x01D97850, "_ZN19CServerRemoteAccess16WriteDataRequestEPKvi", CServerRemoteAccess::WriteDataRequest), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D979A0, "_ZN19CServerRemoteAccess16ReadDataResponseEPvi", CServerRemoteAccess::ReadDataResponse), - - HOOK_SYMBOLDEF(0x01D984E0, "_ZN19CServerRemoteAccess20SendMessageToAdminUIEPKc", CServerRemoteAccess::SendMessageToAdminUI), - HOOK_SYMBOLDEF(0x01D98090, "_ZN19CServerRemoteAccess17LookupStringValueEPKc", CServerRemoteAccess::LookupStringValue), - HOOK_SYMBOLDEF(0x01D97D40, "_ZN19CServerRemoteAccess11LookupValueEPKcR10CUtlBuffer", CServerRemoteAccess::LookupValue), - HOOK_SYMBOLDEF(0x01D98190, "_ZN19CServerRemoteAccess14GetUserBanListER10CUtlBuffer", CServerRemoteAccess::GetUserBanList), - HOOK_SYMBOLDEF(0x01D98280, "_ZN19CServerRemoteAccess13GetPlayerListER10CUtlBuffer", CServerRemoteAccess::GetPlayerList), - HOOK_SYMBOLDEF(0x01D983B0, "_ZN19CServerRemoteAccess10GetMapListER10CUtlBuffer", CServerRemoteAccess::GetMapList), - HOOK_SYMBOLDEF(0x01D97AD0, "_ZN19CServerRemoteAccess12RequestValueEiPKc", CServerRemoteAccess::RequestValue), - HOOK_SYMBOLDEF(0x01D97C20, "_ZN19CServerRemoteAccess8SetValueEPKcS1_", CServerRemoteAccess::SetValue), - HOOK_SYMBOLDEF(0x01D97D10, "_ZN19CServerRemoteAccess11ExecCommandEPKc", CServerRemoteAccess::ExecCommand), - - HOOK_DEF(0x01D985E0, NotifyDedicatedServerUI), - -#endif // Sv_RemoteAccess_region - -#ifndef IpratelimitWrapper_region - - //HOOK_DEF(0x01D4D990, CheckIP), - -#endif // IpratelimitWrapper_region - -#ifndef Com_custom - - HOOK_DEF(0x01D28610, COM_ClearCustomizationList), - HOOK_DEF(0x01D28740, COM_CreateCustomization), - HOOK_DEF(0x01D28980, COM_SizeofResourceList), - -#endif // Com_custom - -#ifndef Sv_upld - - HOOK_DEF(0x01D9A980, SV_CheckFile), - HOOK_DEF(0x01D9AA50, SV_ClearResourceLists), - HOOK_DEF(0x01D9AA90, SV_CreateCustomizationList), - HOOK_DEF(0x01D9ABB0, SV_Customization), - HOOK_DEF(0x01D9AD20, SV_RegisterResources), - HOOK_DEF(0x01D9AD70, SV_MoveToOnHandList), - HOOK_DEF(0x01D9ADB0, SV_AddToResourceList), - HOOK_DEF(0x01D9AE00, SV_ClearResourceList), - HOOK_DEF(0x01D9AE50, SV_RemoveFromResourceList), - HOOK_DEF(0x01D9AE80, SV_EstimateNeededResources), - HOOK_DEF(0x01D9AEF0, SV_RequestMissingResourcesFromClients), - HOOK_DEF(0x01D9AF40, SV_UploadComplete), - HOOK_DEF(0x01D9AFA0, SV_BatchUploadRequest), - HOOK_DEF(0x01D9B040, SV_RequestMissingResources), - HOOK_DEF(0x01D9B070, SV_ParseResourceList), - -#endif // Sv_upld - -#ifndef Decals - - HOOK_DEF(0x01D33EF0, Draw_Shutdown), - HOOK_DEF(0x01D33F30, Draw_DecalShutdown), - HOOK_DEF(0x01D33F60, Draw_AllocateCacheSpace), - HOOK_DEF(0x01D33F90, Draw_CacheWadInitFromFile), - HOOK_DEF(0x01D34070, Draw_CacheWadInit), - HOOK_DEF(0x01D340C0, Draw_CustomCacheWadInit), - HOOK_DEF(0x01D3A830, Draw_MiptexTexture), - HOOK_DEF(0x01D34290, Draw_CacheWadHandler), - HOOK_DEF(0x01D342B0, Draw_FreeWad), - HOOK_DEF(0x01D34380, Draw_DecalSetName), // NOXREF - HOOK_DEF(0x01D343C0, Draw_DecalIndex), // NOXREF - HOOK_DEF(0x01D34450, Draw_DecalCount), - HOOK_DEF(0x01D34460, Draw_DecalSize), - HOOK_DEF(0x01D34490, Draw_DecalName), - HOOK_DEF(0x01D344C0, Draw_DecalTexture), // NOXREF - HOOK_DEF(0x01D34560, Draw_CacheByIndex), - HOOK_DEF(0x01D34600, Draw_DecalIndexFromName), // NOXREF - HOOK_DEF(0x01D34670, Decal_ReplaceOrAppendLump), - HOOK_DEF(0x01D34710, Decal_CountLumps), - HOOK_DEF(0x01D34730, Decal_SizeLumps), - HOOK_DEF(0x01D34750, Decal_MergeInDecals), - HOOK_DEF(0x01D349A0, Decal_Init), - HOOK_DEF(0x01D34B00, CustomDecal_Validate), - HOOK_DEF(0x01D34B60, CustomDecal_Init), - HOOK_DEF(0x01D34BD0, Draw_CacheGet), // NOXREF - HOOK_DEF(0x01D34CC0, Draw_CustomCacheGet), - HOOK_DEF(0x01D34D60, Draw_CacheReload), // NOXREF - HOOK_DEF(0x01D34E40, Draw_ValidateCustomLogo), - HOOK_DEF(0x01D35000, Draw_CacheLoadFromCustom), - HOOK_DEF(0x01D35110, Draw_CacheIndex), // NOXREF - HOOK_DEF(0x01D351A9, Draw_CacheFindIndex), // NOXREF - -#endif // Decals - -#ifndef Sys_engine - - //HOOK_SYMBOLDEF(0x, "_ZN7CEngineC2Ev", MethodThunk::Constructor), - //HOOK_SYMBOLDEF(0x, "_ZN7CEngineD0Ev", MethodThunk::Destructor), - - // virtual functions - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1C80, "_ZN7CEngine6UnloadEv", CEngine::Unload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1CA0, "_ZN7CEngine4LoadEbPcS0_", CEngine::Load), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1CF0, "_ZN7CEngine5FrameEv", CEngine::Frame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1DD0, "_ZN7CEngine11SetSubStateEi", CEngine::SetSubState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1DF0, "_ZN7CEngine8SetStateEi", CEngine::SetState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1E10, "_ZN7CEngine8GetStateEv", CEngine::GetState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1E20, "_ZN7CEngine11GetSubStateEv", CEngine::GetSubState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1E30, "_ZN7CEngine12GetFrameTimeEv", CEngine::GetFrameTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1E40, "_ZN7CEngine10GetCurTimeEv", CEngine::GetCurTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1E50, "_ZN7CEngine13TrapKey_EventEib", CEngine::TrapKey_Event), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1E90, "_ZN7CEngine15TrapMouse_EventEib", CEngine::TrapMouse_Event), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1ED0, "_ZN7CEngine13StartTrapModeEv", CEngine::StartTrapMode), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1EE0, "_ZN7CEngine10IsTrappingEv", CEngine::IsTrapping), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1EF0, "_ZN7CEngine17CheckDoneTrappingERiS0_", CEngine::CheckDoneTrapping), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1F30, "_ZN7CEngine11SetQuittingEi", CEngine::SetQuitting), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA1F40, "_ZN7CEngine11GetQuittingEv", CEngine::GetQuitting), - -#endif // Sys_engine - -#ifndef Sys_linuxwind - - // Disable/enable all at once! - // virtual functions - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5A10, "_ZN5CGame4InitEPv", CGame::Init), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5A20, "_ZN5CGame8ShutdownEv", CGame::Shutdown), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5760, "_ZN5CGame16CreateGameWindowEv", CGame::CreateGameWindow), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA4B20, "_ZN5CGame15SleepUntilInputEi", CGame::SleepUntilInput), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5A40, "_ZN5CGame13GetMainWindowEv", CGame::GetMainWindow), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5A50, "_ZN5CGame20GetMainWindowAddressEv", CGame::GetMainWindowAddress), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5A60, "_ZN5CGame11SetWindowXYEii", CGame::SetWindowXY), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5A80, "_ZN5CGame13SetWindowSizeEii", CGame::SetWindowSize), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5B00, "_ZN5CGame13GetWindowRectEPiS0_S0_S0_", CGame::GetWindowRect), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5B40, "_ZN5CGame11IsActiveAppEv", CGame::IsActiveApp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5B60, "_ZN5CGame13IsMultiplayerEv", CGame::IsMultiplayer), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5BB0, "_ZN5CGame17PlayStartupVideosEv", CGame::PlayStartupVideos), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5BC0, "_ZN5CGame14PlayAVIAndWaitEPKc", CGame::PlayAVIAndWait), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5B70, "_ZN5CGame16SetCursorVisibleEb", CGame::SetCursorVisible), - -#endif // Sys_linuxwind - -#ifndef SystemWrapper_region - - HOOK_DEF(0x01DA5CB0, SystemWrapper_Init), - HOOK_DEF(0x01DA5CD0, SystemWrapper_RunFrame), - HOOK_DEF(0x01DA5CF0, SystemWrapper_ShutDown), - HOOK_DEF(0x01DA5D00, SystemWrapper_LoadModule), // NOXREF - HOOK_DEF(0x01DA5D30, SystemWrapper_ExecuteString), - HOOK_DEF(0x01DA5D50, SystemWrapper_CommandForwarder), - - // virtual functions - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA7120, "_ZN13SystemWrapper4InitEP11IBaseSystemiPc", SystemWrapper::Init), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA7130, "_ZN13SystemWrapper8RunFrameEd", SystemWrapper::RunFrame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA7150, "_ZN13SystemWrapper14ExecuteCommandEiPc", SystemWrapper::ExecuteCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA71A0, "_ZN13SystemWrapper13GetStatusLineEv", SystemWrapper::GetStatusLine), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA71B0, "_ZN13SystemWrapper7GetTypeEv", SystemWrapper::GetType), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA71E0, "_ZN13SystemWrapper8ShutDownEv", SystemWrapper::ShutDown), - - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6730, "_ZN13SystemWrapper7GetTimeEv", SystemWrapper::GetTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6950, "_ZN13SystemWrapper7GetTickEv", SystemWrapper::GetTick), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6FA0, "_ZN13SystemWrapper6SetFPSEf", SystemWrapper::SetFPS), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6750, "_ZN13SystemWrapper6PrintfEPcz", SystemWrapper::Printf), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6820, "_ZN13SystemWrapper7DPrintfEPcz", SystemWrapper::DPrintf), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6740, "_ZN13SystemWrapper14RedirectOutputEPci", SystemWrapper::RedirectOutput), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6900, "_ZN13SystemWrapper13GetFileSystemEv", SystemWrapper::GetFileSystem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6910, "_ZN13SystemWrapper8LoadFileEPKcPi", SystemWrapper::LoadFile), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6930, "_ZN13SystemWrapper8FreeFileEPh", SystemWrapper::FreeFile), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6710, "_ZN13SystemWrapper8SetTitleEPc", SystemWrapper::SetTitle), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6720, "_ZN13SystemWrapper13SetStatusLineEPc", SystemWrapper::SetStatusLine), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6FB0, "_ZN13SystemWrapper11ShowConsoleEb", SystemWrapper::ShowConsole), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6A90, "_ZN13SystemWrapper10LogConsoleEPc", SystemWrapper::LogConsole), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6AD0, "_ZN13SystemWrapper8InitVGUIEP11IVGuiModule", SystemWrapper::InitVGUI), -#ifdef _WIN32 - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6AC0, "_ZN13SystemWrapper8GetPanelEv", SystemWrapper::GetPanel), -#endif // _WIN32 - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6850, "_ZN13SystemWrapper15RegisterCommandEPcP13ISystemModulei", SystemWrapper::RegisterCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA69F0, "_ZN13SystemWrapper17GetCommandMatchesEPcP10ObjectList", SystemWrapper::GetCommandMatches), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6CA0, "_ZN13SystemWrapper13ExecuteStringEPc", SystemWrapper::ExecuteString), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA67E0, "_ZN13SystemWrapper11ExecuteFileEPc", SystemWrapper::ExecuteFile), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6200, "_ZN13SystemWrapper6ErrorfEPcz", SystemWrapper::Errorf), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA61C0, "_ZN13SystemWrapper10CheckParamEPc", SystemWrapper::CheckParam), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6AE0, "_ZN13SystemWrapper9AddModuleEP13ISystemModulePc", SystemWrapper::AddModule), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6B50, "_ZN13SystemWrapper9GetModuleEPcS0_S0_", SystemWrapper::GetModule), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6BD0, "_ZN13SystemWrapper12RemoveModuleEP13ISystemModule", SystemWrapper::RemoveModule), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6300, "_ZN13SystemWrapper4StopEv", SystemWrapper::Stop), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6FC0, "_ZN13SystemWrapper14COM_GetBaseDirEv", SystemWrapper::GetBaseDir), - - HOOK_SYMBOLDEF(0x01DA6D60, "_ZN13SystemWrapper15DispatchCommandEPc", SystemWrapper::DispatchCommand), - HOOK_SYMBOLDEF(0x01DA65C0, "_ZN13SystemWrapper10GetLibraryEPc", SystemWrapper::GetLibrary), - HOOK_SYMBOLDEF(0x01DA6A10, "_ZN13SystemWrapper10FindModuleEPcS0_", SystemWrapper::FindModule), - HOOK_SYMBOLDEF(0x01DA6960, "_ZN13SystemWrapper11CMD_ModulesEPc", SystemWrapper::CMD_Modules), - HOOK_SYMBOLDEF(0x01DA6420, "_ZN13SystemWrapper14CMD_LoadModuleEPc", SystemWrapper::CMD_LoadModule), - HOOK_SYMBOLDEF(0x01DA64E0, "_ZN13SystemWrapper16CMD_UnloadModuleEPc", SystemWrapper::CMD_UnloadModule), - - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6E40, "_ZN13EngineWrapper4InitEP11IBaseSystemiPc", EngineWrapper::Init), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6E70, "_ZN13EngineWrapper8RunFrameEd", EngineWrapper::RunFrame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6EF0, "_ZN13EngineWrapper13ReceiveSignalEP13ISystemModulejPv", EngineWrapper::ReceiveSignal), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6E90, "_ZN13EngineWrapper14ExecuteCommandEiPc", EngineWrapper::ExecuteCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F10, "_ZN13EngineWrapper16RegisterListenerEP13ISystemModule", EngineWrapper::RegisterListener), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F30, "_ZN13EngineWrapper14RemoveListenerEP13ISystemModule", EngineWrapper::RemoveListener), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F50, "_ZN13EngineWrapper9GetSystemEv", EngineWrapper::GetSystem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F60, "_ZN13EngineWrapper9GetSerialEv", EngineWrapper::GetSerial), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5EC0, "_ZN13EngineWrapper13GetStatusLineEv", EngineWrapper::GetStatusLine), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5EB0, "_ZN13EngineWrapper7GetTypeEv", EngineWrapper::GetType), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F70, "_ZN13EngineWrapper7GetNameEv", EngineWrapper::GetName), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F80, "_ZN13EngineWrapper8GetStateEv", EngineWrapper::GetState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6F90, "_ZN13EngineWrapper10GetVersionEv", EngineWrapper::GetVersion), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6E60, "_ZN13EngineWrapper8ShutDownEv", EngineWrapper::ShutDown), - - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5ED0, "_ZN13EngineWrapper13GetViewOriginEPf", EngineWrapper::GetViewOrigin), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5F00, "_ZN13EngineWrapper13GetViewAnglesEPf", EngineWrapper::GetViewAngles), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6070, "_ZN13EngineWrapper14GetTraceEntityEv", EngineWrapper::GetTraceEntity), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5F30, "_ZN13EngineWrapper12GetCvarFloatEPc", EngineWrapper::GetCvarFloat), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5F60, "_ZN13EngineWrapper13GetCvarStringEPc", EngineWrapper::GetCvarString), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5F80, "_ZN13EngineWrapper7SetCvarEPcS0_", EngineWrapper::SetCvar), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5FA0, "_ZN13EngineWrapper12Cbuf_AddTextEPc", EngineWrapper::Cbuf_AddText), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5FC0, "_ZN13EngineWrapper20DemoUpdateClientDataEP13client_data_s", EngineWrapper::DemoUpdateClientData), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5FE0, "_ZN13EngineWrapper13CL_QueueEventEiifP12event_args_s", EngineWrapper::CL_QueueEvent), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6000, "_ZN13EngineWrapper13HudWeaponAnimEii", EngineWrapper::HudWeaponAnim), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6020, "_ZN13EngineWrapper16CL_DemoPlaySoundEiPcffii", EngineWrapper::CL_DemoPlaySound), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6050, "_ZN13EngineWrapper24ClientDLL_ReadDemoBufferEiPh", EngineWrapper::ClientDLL_ReadDemoBuffer), - -#endif // SystemWrapper_region - - { NULL, NULL, NULL }, -}; - - -AddressRef g_FunctionRefs[] = -{ -#ifndef Function_References_region - - { 0x01D4D990, "CheckIP", (size_t)&pCheckIP }, - - // Find C STD functions - { 0x01E000AE, "time", 0 }, - { 0x01E0008C, "rand", 0 }, - { 0x01E0007F, "srand", 0 }, - { 0x01E00AF1, "localtime", 0 }, - -#endif // Function_References_region - - { NULL, NULL, NULL }, -}; - -AddressRef g_DataRefs[] = -{ -#ifndef Data_References_region - - - GLOBALVAR_LINK(0x0229AE80, "pr_strings", ppr_strings), - GLOBALVAR_LINK(0x01E45C04, "gNullString", pgNullString), - GLOBALVAR_LINK(0x01E46480, "SV_UPDATE_BACKUP", pSV_UPDATE_BACKUP), - GLOBALVAR_LINK(0x01E46484, "SV_UPDATE_MASK", pSV_UPDATE_MASK), - GLOBALVAR_LINK(0x021D3E80, "gGlobalVariables", pgGlobalVariables), - GLOBALVAR_LINK(0x021D3DE0, "svs", psvs), - GLOBALVAR_LINK(0x021D4960, "sv", psv), - GLOBALVAR_LINK(0x0208F788, "gPacketSuppressed", pgPacketSuppressed), - GLOBALVAR_LINK(0x01E45C08, "giNextUserMsg", pgiNextUserMsg), - GLOBALVAR_LINK(0x0208F7A4, "hashstrings_collisions", phashstrings_collisions), - GLOBALVAR_LINK(0x0208F76C, "g_pplayerdelta", pg_pplayerdelta), - GLOBALVAR_LINK(0x0208F770, "g_pentitydelta", pg_pentitydelta), - GLOBALVAR_LINK(0x0208F774, "g_pcustomentitydelta", pg_pcustomentitydelta), - GLOBALVAR_LINK(0x0208F778, "g_pclientdelta", pg_pclientdelta), - GLOBALVAR_LINK(0x0208F77C, "g_pweapondelta", pg_pweapondelta), - GLOBALVAR_LINK(0x021C2B60, "localinfo", plocalinfo), - GLOBALVAR_LINK(0x021D3F40, "localmodels", plocalmodels), - GLOBALVAR_LINK(0x0221AD80, "ipfilters", pipfilters), - GLOBALVAR_LINK(0x021D4940, "numipfilters", pnumipfilters), - GLOBALVAR_LINK(0x0229B6C0, "userfilters", puserfilters), - GLOBALVAR_LINK(0x0208F798, "numuserfilters", pnumuserfilters), - GLOBALVAR_LINK(0x01E45F84, "sv_lan", psv_lan), - GLOBALVAR_LINK(0x01E45FAC, "sv_lan_rate", psv_lan_rate), - GLOBALVAR_LINK(0x01E45E8C, "sv_aim", psv_aim), - GLOBALVAR_LINK(0x021D1BC0, "sv_decalnames", psv_decalnames), - GLOBALVAR_LINK(0x0208F78C, "sv_decalnamecount", psv_decalnamecount), - GLOBALVAR_LINK(0x01E46274, "sv_skycolor_r", psv_skycolor_r), - GLOBALVAR_LINK(0x01E46298, "sv_skycolor_g", psv_skycolor_g), - GLOBALVAR_LINK(0x01E462BC, "sv_skycolor_b", psv_skycolor_b), - GLOBALVAR_LINK(0x01E462E0, "sv_skyvec_x", psv_skyvec_x), - GLOBALVAR_LINK(0x01E46304, "sv_skyvec_y", psv_skyvec_y), - GLOBALVAR_LINK(0x01E46328, "sv_skyvec_z", psv_skyvec_z), - GLOBALVAR_LINK(0x01E48F64, "sv_spectatormaxspeed", psv_spectatormaxspeed), - GLOBALVAR_LINK(0x01E48F90, "sv_airaccelerate", psv_airaccelerate), - GLOBALVAR_LINK(0x01E48FBC, "sv_wateraccelerate", psv_wateraccelerate), - GLOBALVAR_LINK(0x01E48FE4, "sv_waterfriction", psv_waterfriction), - GLOBALVAR_LINK(0x01E49008, "sv_zmax", psv_zmax), - GLOBALVAR_LINK(0x01E4902C, "sv_wateramp", psv_wateramp), - GLOBALVAR_LINK(0x01E49054, "sv_skyname", psv_skyname), - GLOBALVAR_LINK(0x01E46034, "mapcyclefile", pmapcyclefile), - GLOBALVAR_LINK(0x01E46060, "motdfile", pmotdfile), - GLOBALVAR_LINK(0x01E46090, "servercfgfile", pservercfgfile), - GLOBALVAR_LINK(0x01E460F0, "lservercfgfile", plservercfgfile), - GLOBALVAR_LINK(0x01E46114, "logsdir", plogsdir), - GLOBALVAR_LINK(0x01E46144, "bannedcfgfile", pbannedcfgfile), - GLOBALVAR_LINK(0x0208F790, "sv_gpNewUserMsgs", psv_gpNewUserMsgs), - GLOBALVAR_LINK(0x0208F794, "sv_gpUserMsgs", psv_gpUserMsgs), - GLOBALVAR_LINK(0x0239BCE0, "g_svmove", pg_svmove), - GLOBALVAR_LINK(0x0208F760, "sv_lastnum", psv_lastnum), - GLOBALVAR_LINK(0x02089220, "g_sv_instance_baselines", pg_sv_instance_baselines), - GLOBALVAR_LINK(0x0208F764, "g_bOutOfDateRestart", pg_bOutOfDateRestart), - GLOBALVAR_LINK(0x01E45C00, "g_userid", pg_userid), - GLOBALVAR_LINK(0x0208F768, "g_sv_delta", pg_sv_delta), - GLOBALVAR_LINK(0x0208F780, "g_peventdelta", pg_peventdelta), - GLOBALVAR_LINK(0x01E45C1C, "rcon_password", prcon_password), - GLOBALVAR_LINK(0x01E45C48, "sv_enableoldqueries", psv_enableoldqueries), - GLOBALVAR_LINK(0x01E45C74, "sv_instancedbaseline", psv_instancedbaseline), - GLOBALVAR_LINK(0x01E45C94, "sv_contact", psv_contact), - GLOBALVAR_LINK(0x01E45CC4, "sv_maxupdaterate", psv_maxupdaterate), - GLOBALVAR_LINK(0x01E45CF4, "sv_minupdaterate", psv_minupdaterate), - GLOBALVAR_LINK(0x01E45D18, "sv_filterban", psv_filterban), - GLOBALVAR_LINK(0x01E45D3C, "sv_minrate", psv_minrate), - GLOBALVAR_LINK(0x01E45D60, "sv_maxrate", psv_maxrate), - GLOBALVAR_LINK(0x01E45D84, "sv_logrelay", psv_logrelay), - GLOBALVAR_LINK(0x01E45DD0, "violence_hblood", pviolence_hblood), - GLOBALVAR_LINK(0x01E45DF8, "violence_ablood", pviolence_ablood), - GLOBALVAR_LINK(0x01E45E20, "violence_hgibs", pviolence_hgibs), - GLOBALVAR_LINK(0x01E45E48, "violence_agibs", pviolence_agibs), - GLOBALVAR_LINK(0x01E45E6C, "sv_newunit", psv_newunit), - GLOBALVAR_LINK(0x01E45ED8, "sv_clienttrace", psv_clienttrace), - GLOBALVAR_LINK(0x01E45EFC, "sv_timeout", psv_timeout), - GLOBALVAR_LINK(0x01E45F24, "sv_failuretime", psv_failuretime), - GLOBALVAR_LINK(0x01E45F44, "sv_cheats", psv_cheats), - GLOBALVAR_LINK(0x01E45F64, "sv_password", psv_password), - GLOBALVAR_LINK(0x01E45FD0, "sv_proxies", psv_proxies), - GLOBALVAR_LINK(0x01E46000, "sv_outofdatetime", psv_outofdatetime), - GLOBALVAR_LINK(0x01E460B8, "mapchangecfgfile", pmapchangecfgfile), - GLOBALVAR_LINK(0x021D1BA0, "allow_cheats", pallow_cheats), - GLOBALVAR_LINK(0x01E455A8, "mp_logecho", pmp_logecho), - GLOBALVAR_LINK(0x01E45584, "mp_logfile", pmp_logfile), - GLOBALVAR_LINK(0x01E4616C, "sv_allow_download", psv_allow_download), - GLOBALVAR_LINK(0x01E46190, "sv_send_logos", psv_send_logos), - GLOBALVAR_LINK(0x01E461B8, "sv_send_resources", psv_send_resources), - GLOBALVAR_LINK(0x01E455FC, "sv_log_singleplayer", psv_log_singleplayer), - GLOBALVAR_LINK(0x01E45620, "sv_logsecret", psv_logsecret), - GLOBALVAR_LINK(0x01E455D0, "sv_log_onefile", psv_log_onefile), - GLOBALVAR_LINK(0x01E461DC, "sv_logbans", psv_logbans), - GLOBALVAR_LINK(0x01E46204, "sv_allow_upload", psv_allow_upload), - GLOBALVAR_LINK(0x01E4622C, "sv_max_upload", psv_max_upload), - GLOBALVAR_LINK(0x01E46250, "hpk_maxsize", phpk_maxsize), - GLOBALVAR_LINK(0x01E46358, "sv_visiblemaxplayers", psv_visiblemaxplayers), - GLOBALVAR_LINK(0x01E46380, "max_queries_sec", pmax_queries_sec), - GLOBALVAR_LINK(0x01E463B0, "max_queries_sec_global", pmax_queries_sec_global), - GLOBALVAR_LINK(0x01E463DC, "max_queries_window", pmax_queries_window), - GLOBALVAR_LINK(0x01E46400, "sv_logblocks", psv_logblocks), - GLOBALVAR_LINK(0x01E46424, "sv_downloadurl", psv_downloadurl), - GLOBALVAR_LINK(0x01E4644C, "sv_allow_dlfile", psv_allow_dlfile), - GLOBALVAR_LINK(0x01E4646C, "sv_version", psv_version), - GLOBALVAR_LINK(0x0229B2A0, "sv_playermodel", psv_playermodel), - GLOBALVAR_LINK(0x026EB5E0, "cls", pcls), - GLOBALVAR_LINK(0x026F1DE0, "cl", pcl), - GLOBALVAR_LINK(0x01FED50C, "key_dest", pkey_dest), - GLOBALVAR_LINK(0x0269BB00, "g_clmove", pg_clmove), - GLOBALVAR_LINK(0x028A1454, "cl_inmovie", pcl_inmovie), - GLOBALVAR_LINK(0x01E2F0F8, "cl_name", pcl_name), - GLOBALVAR_LINK(0x01E2F1B4, "rate", prate), - GLOBALVAR_LINK(0x01E33D6C, "console", pconsole), - GLOBALVAR_LINK(0x01E39FF4, "host_name", phost_name), - GLOBALVAR_LINK(0x01E3A040, "host_speeds", phost_speeds), - GLOBALVAR_LINK(0x01E3A064, "host_profile", phost_profile), - GLOBALVAR_LINK(0x01E3A084, "developer", pdeveloper), - GLOBALVAR_LINK(0x01E3A0AC, "host_limitlocal", phost_limitlocal), - GLOBALVAR_LINK(0x01E3A0C8, "skill", pskill), - GLOBALVAR_LINK(0x01E3A0EC, "deathmatch", pdeathmatch), - GLOBALVAR_LINK(0x01E3A108, "coop", pcoop), - GLOBALVAR_LINK(0x0266AFA0, "realtime", prealtime), - GLOBALVAR_LINK(0x01FED0C0, "rolling_fps", prolling_fps), - GLOBALVAR_LINK(0x0266AF20, "host_parms", phost_parms), - GLOBALVAR_LINK(0x01FED0B4, "host_initialized", phost_initialized), - GLOBALVAR_LINK(0x0266AEC8, "host_frametime", phost_frametime), - GLOBALVAR_LINK(0x0266AED0, "host_framecount", phost_framecount), - GLOBALVAR_LINK(0x0266AEDC, "host_client", phost_client), - GLOBALVAR_LINK(0x01FED0B8, "gfNoMasterServer", pgfNoMasterServer), - GLOBALVAR_LINK(0x0266AF38, "oldrealtime", poldrealtime), - GLOBALVAR_LINK(0x0266AEC4, "host_hunklevel", phost_hunklevel), - GLOBALVAR_LINK(0x0266AF60, "host_abortserver", phost_abortserver), - GLOBALVAR_LINK(0x0266AEE0, "host_enddemo", phost_enddemo), - GLOBALVAR_LINK(0x0266AED4, "host_basepal", phost_basepal), - GLOBALVAR_LINK(0x01FD9778, "bfread", pbfread), - GLOBALVAR_LINK(0x01FD9790, "bfwrite", pbfwrite), - GLOBALVAR_LINK(0x02699D48, "msg_readcount", pmsg_readcount), - GLOBALVAR_LINK(0x02699D4C, "msg_badread", pmsg_badread), - GLOBALVAR_LINK(0x01FEB260, "decal_wad", pdecal_wad), - GLOBALVAR_LINK(0x01FEB264, "menu_wad", pmenu_wad), - GLOBALVAR_LINK(0x0266D440, "szCustName", pszCustName), - GLOBALVAR_LINK(0x0266B440, "decal_names", pdecal_names), - GLOBALVAR_LINK(0x01FEB268, "m_bDrawInitialized", pm_bDrawInitialized), - GLOBALVAR_LINK(0x01FEB25C, "gfCustomBuild", pgfCustomBuild), - GLOBALVAR_LINK(0x01FEB26C, "g_defs", pg_defs), - GLOBALVAR_LINK(0x01FEB270, "g_encoders", pg_encoders), - GLOBALVAR_LINK(0x01FEB274, "g_deltaregistry", pg_deltaregistry), - GLOBALVAR_LINK(0x021B97E0, "gNetworkTextMessageBuffer", pgNetworkTextMessageBuffer), - GLOBALVAR_LINK(0x021B9FE0, "gMessageParms", pgMessageParms), - GLOBALVAR_LINK(0x02095C8C, "gMessageTable", pgMessageTable), - GLOBALVAR_LINK(0x02095C90, "gMessageTableCount", pgMessageTableCount), - GLOBALVAR_LINK(0x01E4CE10, "gNetworkMessageNames", pgNetworkMessageNames), - GLOBALVAR_LINK(0x01E4CE30, "gNetworkTextMessage", pgNetworkTextMessage), - GLOBALVAR_LINK(0x021B61C4, "hunk_base", phunk_base), - GLOBALVAR_LINK(0x021B61C8, "hunk_tempactive", phunk_tempactive), - GLOBALVAR_LINK(0x021B61D0, "hunk_low_used", phunk_low_used), - GLOBALVAR_LINK(0x021B61D4, "hunk_size", phunk_size), - GLOBALVAR_LINK(0x021B61D8, "hunk_high_used", phunk_high_used), - GLOBALVAR_LINK(0x021B61E0, "cache_head", pcache_head), - GLOBALVAR_LINK(0x021B6238, "hunk_tempmark", phunk_tempmark), - GLOBALVAR_LINK(0x01E4DEC0, "mem_dbgfile", pmem_dbgfile), - GLOBALVAR_LINK(0x021B61CC, "mainzone", pmainzone), - GLOBALVAR_LINK(0x0266AEC0, "current_skill", pcurrent_skill), - GLOBALVAR_LINK(0x01FED1E0, "g_careerState", pg_careerState), - GLOBALVAR_LINK(0x01FED1D8, "gHostSpawnCount", pgHostSpawnCount), - GLOBALVAR_LINK(0x01E3A960, "g_pSaveGameCommentFunc", pg_pSaveGameCommentFunc), - GLOBALVAR_LINK(0x01E5C834, "g_LastScreenUpdateTime", pg_LastScreenUpdateTime), - GLOBALVAR_LINK(0x023FECB4, "scr_skipupdate", pscr_skipupdate), - GLOBALVAR_LINK(0x023FF0C0, "scr_centertime_off", pscr_centertime_off), - GLOBALVAR_LINK(0x02699460, "serverinfo", pserverinfo), - GLOBALVAR_LINK(0x026995EC, "com_argc", pcom_argc), - GLOBALVAR_LINK(0x02699708, "com_argv", pcom_argv), - GLOBALVAR_LINK(0x02699840, "com_token", pcom_token), - GLOBALVAR_LINK(0x01FE1FA0, "com_ignorecolons", pcom_ignorecolons), - GLOBALVAR_LINK(0x01FE1FA4, "s_com_token_unget", ps_com_token_unget), - GLOBALVAR_LINK(0x02699600, "com_clientfallback", pcom_clientfallback), - GLOBALVAR_LINK(0x02699720, "com_gamedir", pcom_gamedir), - GLOBALVAR_LINK(0x02699C40, "com_cmdline", pcom_cmdline), - GLOBALVAR_LINK(0x02699580, "gpszVersionString", pgpszVersionString), - GLOBALVAR_LINK(0x026995C0, "gpszProductString", pgpszProductString), - GLOBALVAR_LINK(0x02699D44, "bigendien", pbigendien), - GLOBALVAR_LINK(0x026995E8, "BigShort", pBigShort), - GLOBALVAR_LINK(0x026995E0, "LittleShort", pLittleShort), - GLOBALVAR_LINK(0x0269970C, "BigLong", pBigLong), - GLOBALVAR_LINK(0x02699710, "LittleLong", pLittleLong), - GLOBALVAR_LINK(0x026995A0, "BigFloat", pBigFloat), - GLOBALVAR_LINK(0x02699560, "LittleFloat", pLittleFloat), - GLOBALVAR_LINK(0x01FD3420, "cmd_argc", pcmd_argc), - GLOBALVAR_LINK(0x01FD3428, "cmd_argv", pcmd_argv), - GLOBALVAR_LINK(0x01FD366C, "cmd_args", pcmd_args), - GLOBALVAR_LINK(0x02699D7C, "cmd_source", pcmd_source), - GLOBALVAR_LINK(0x02699D74, "cmd_wait", pcmd_wait), - GLOBALVAR_LINK(0x01FD3670, "cmd_functions", pcmd_functions), - GLOBALVAR_LINK(0x02699D60, "cmd_text", pcmd_text), - GLOBALVAR_LINK(0x02699D84, "cmd_alias", pcmd_alias), - GLOBALVAR_LINK(0x01FE501C, "cvar_vars", pcvar_vars), - GLOBALVAR_LINK(0x026995E4, "loadcache", ploadcache), - GLOBALVAR_LINK(0x02699704, "loadbuf", ploadbuf), - GLOBALVAR_LINK(0x02699D40, "loadsize", ploadsize), - GLOBALVAR_LINK(0x01FEC4C8, "g_fallbackLocalizationFiles", pg_fallbackLocalizationFiles), - GLOBALVAR_LINK(0x01FEC4E0, "s_pBaseDir", ps_pBaseDir), - GLOBALVAR_LINK(0x01FEC6E8, "bLowViolenceBuild", pbLowViolenceBuild), - GLOBALVAR_LINK(0x01FEC6EC, "g_pFileSystem", pg_pFileSystem), - GLOBALVAR_LINK(0x01FEC6E0, "g_pFileSystemModule", pg_pFileSystemModule), - GLOBALVAR_LINK(0x01FEC6E4, "g_FileSystemFactory", pg_FileSystemFactory), - GLOBALVAR_LINK(0x01E4AAC0, "g_hfind", pg_hfind), - GLOBALVAR_LINK(0x01E4AAC8, "g_engfuncsExportedToDlls", pg_engfuncsExportedToDlls), - GLOBALVAR_LINK(0x021C2260, "gszDisconnectReason", pgszDisconnectReason), - GLOBALVAR_LINK(0x021C27C0, "gszExtendedDisconnectReason", pgszExtendedDisconnectReason), - GLOBALVAR_LINK(0x02090C64, "gfExtendedError", pgfExtendedError), - GLOBALVAR_LINK(0x021C28F8, "g_bIsDedicatedServer", pg_bIsDedicatedServer), - GLOBALVAR_LINK(0x021C2248, "giSubState", pgiSubState), - GLOBALVAR_LINK(0x021C2448, "giActive", pgiActive), - GLOBALVAR_LINK(0x02090C60, "giStateInfo", pgiStateInfo), - GLOBALVAR_LINK(0x021C2380, "gEntityInterface", pgEntityInterface), - GLOBALVAR_LINK(0x021C28E0, "gNewDLLFunctions", pgNewDLLFunctions), - GLOBALVAR_LINK(0x01FF0638, "g_modfuncs", pg_modfuncs), - GLOBALVAR_LINK(0x021C2480, "g_rgextdll", pg_rgextdll), - GLOBALVAR_LINK(0x02090C94, "g_iextdllMac", pg_iextdllMac), - GLOBALVAR_LINK(0x021C2900, "gmodinfo", pgmodinfo), - GLOBALVAR_LINK(0x02090C90, "gfBackground", pgfBackground), - GLOBALVAR_LINK(0x02699454, "con_debuglog", pcon_debuglog), - GLOBALVAR_LINK(0x02090C78, "g_bPrintingKeepAliveDots", pg_bPrintingKeepAliveDots), - GLOBALVAR_LINK(0x02090C80, "Launcher_ConsolePrintf", pLauncher_ConsolePrintf), - GLOBALVAR_LINK(0x01E42EC4, "registry", pregistry), - GLOBALVAR_LINK(0x0239B740, "outputbuf", poutputbuf), - GLOBALVAR_LINK(0x021CAB94, "sv_redirected", psv_redirected), - GLOBALVAR_LINK(0x021CAB80, "sv_redirectto", psv_redirectto), - GLOBALVAR_LINK(0x01E464A0, "sv_rcon_minfailures", psv_rcon_minfailures), - GLOBALVAR_LINK(0x01E464CC, "sv_rcon_maxfailures", psv_rcon_maxfailures), - GLOBALVAR_LINK(0x01E464FC, "sv_rcon_minfailuretime", psv_rcon_minfailuretime), - GLOBALVAR_LINK(0x01E46528, "sv_rcon_banpenalty", psv_rcon_banpenalty), - GLOBALVAR_LINK(0x0208E828, "g_rgRconFailures", pg_rgRconFailures), - GLOBALVAR_LINK(0x01E42FF8, "scr_downloading", pscr_downloading), - -#ifndef REHLDS_FIXES - GLOBALVAR_LINK(0x0208F7B8, "g_bCS_CZ_Flags_Initialized", pg_bCS_CZ_Flags_Initialized), - GLOBALVAR_LINK(0x0208F7AC, "g_bIsCZero", pg_bIsCZero), - GLOBALVAR_LINK(0x0208F7B4, "g_bIsCZeroRitual", pg_bIsCZeroRitual), - GLOBALVAR_LINK(0x0208F7B0, "g_bIsTerrorStrike", pg_bIsTerrorStrike), - GLOBALVAR_LINK(0x0208F7BC, "g_bIsTFC", pg_bIsTFC), - GLOBALVAR_LINK(0x0208F7C0, "g_bIsHL1", pg_bIsHL1), - GLOBALVAR_LINK(0x0208F7A8, "g_bIsCStrike", pg_bIsCStrike), -#endif - - GLOBALVAR_LINK(0x01FD3E80, "gPAS", pgPAS), - GLOBALVAR_LINK(0x01FD3E84, "gPVS", pgPVS), - GLOBALVAR_LINK(0x01FD3A78, "gPVSRowBytes", pgPVSRowBytes), - GLOBALVAR_LINK(0x01FD3A80, "mod_novis", pmod_novis), - GLOBALVAR_LINK(0x0229AE84, "fatbytes", pfatbytes), - GLOBALVAR_LINK(0x0229B2C0, "fatpvs", pfatpvs), - GLOBALVAR_LINK(0x0229B2A4, "fatpasbytes", pfatpasbytes), - GLOBALVAR_LINK(0x0229AEA0, "fatpas", pfatpas), - GLOBALVAR_LINK(0x0208FAB8, "s_Steam3Server", ps_Steam3Server), - GLOBALVAR_LINK(0x0208FA58, "s_Steam3Client", ps_Steam3Client), - GLOBALVAR_LINK(0x01E39F14, "sys_ticrate", psys_ticrate), - GLOBALVAR_LINK(0x01E39F3C, "sys_timescale", psys_timescale), - GLOBALVAR_LINK(0x01E39F60, "fps_max", pfps_max), - GLOBALVAR_LINK(0x01E39F84, "host_killtime", phost_killtime), - GLOBALVAR_LINK(0x01E39FA4, "sv_stats", psv_stats), - GLOBALVAR_LINK(0x01E39FC8, "fps_override", pfps_override), - GLOBALVAR_LINK(0x01E3A01C, "host_framerate", phost_framerate), - GLOBALVAR_LINK(0x01E3A128, "pausable", ppausable), - GLOBALVAR_LINK(0x01E43F6C, "suitvolume", psuitvolume), - GLOBALVAR_LINK(0x0208FAC0, "truepositions", ptruepositions), - GLOBALVAR_LINK(0x021C2B44, "sv_player", psv_player), - GLOBALVAR_LINK(0x01E4A328, "clcommands", pclcommands), - GLOBALVAR_LINK(0x0209064C, "g_balreadymoved", pg_balreadymoved), - GLOBALVAR_LINK(0x01E4A658, "sv_clcfuncs", psv_clcfuncs), - GLOBALVAR_LINK(0x020905C0, "s_LastFullUpdate", ps_LastFullUpdate), - GLOBALVAR_LINK(0x01E4A3E0, "sv_edgefriction", psv_edgefriction), - GLOBALVAR_LINK(0x01E4A404, "sv_maxspeed", psv_maxspeed), - GLOBALVAR_LINK(0x01E4A42C, "sv_accelerate", psv_accelerate), - GLOBALVAR_LINK(0x01E4A3BC, "sv_footsteps", psv_footsteps), - GLOBALVAR_LINK(0x01E4A454, "sv_rollspeed", psv_rollspeed), - GLOBALVAR_LINK(0x01E4A47C, "sv_rollangle", psv_rollangle), - GLOBALVAR_LINK(0x01E4A49C, "sv_unlag", psv_unlag), - GLOBALVAR_LINK(0x01E4A4C0, "sv_maxunlag", psv_maxunlag), - GLOBALVAR_LINK(0x01E4A4E8, "sv_unlagpush", psv_unlagpush), - GLOBALVAR_LINK(0x01E4A510, "sv_unlagsamples", psv_unlagsamples), - GLOBALVAR_LINK(0x01E4A398, "mp_consistency", pmp_consistency), - GLOBALVAR_LINK(0x01E4A568, "sv_voiceenable", psv_voiceenable), - GLOBALVAR_LINK(0x02090648, "nofind", pnofind), - GLOBALVAR_LINK(0x01E3F7F4, "pm_showclip", ppm_showclip), - GLOBALVAR_LINK(0x01E3F808, "player_mins", pplayer_mins), - GLOBALVAR_LINK(0x01E3F838, "player_maxs", pplayer_maxs), - GLOBALVAR_LINK(0x02004308, "pmove", ppmove), - GLOBALVAR_LINK(0x025E3F00, "movevars", pmovevars), - GLOBALVAR_LINK(0x01FED51C, "vec3_origin", pvec3_origin), - GLOBALVAR_LINK(0x02004980, "gMsgData", pgMsgData), - GLOBALVAR_LINK(0x01E3F9AC, "gMsgBuffer", pgMsgBuffer), - GLOBALVAR_LINK(0x02004B80, "gMsgEntity", pgMsgEntity), - GLOBALVAR_LINK(0x02004B84, "gMsgDest", pgMsgDest), - GLOBALVAR_LINK(0x02004B88, "gMsgType", pgMsgType), - GLOBALVAR_LINK(0x02004B8C, "gMsgStarted", pgMsgStarted), - GLOBALVAR_LINK(0x020043A8, "gMsgOrigin", pgMsgOrigin), - GLOBALVAR_LINK(0x02004B90, "idum", pidum), - GLOBALVAR_LINK(0x02004B9C, "g_groupop", pg_groupop), - GLOBALVAR_LINK(0x02004B98, "g_groupmask", pg_groupmask), - GLOBALVAR_LINK(0x025E39E0, "checkpvs", pcheckpvs), - GLOBALVAR_LINK(0x025E3DE0, "c_invis", pc_invis), - GLOBALVAR_LINK(0x025E39CC, "c_notvis", pc_notvis), - GLOBALVAR_LINK(0x0208F7E0, "vec_origin", pvec_origin), - GLOBALVAR_LINK(0x025DFD94, "r_visframecount", pr_visframecount), - GLOBALVAR_LINK(0x02052A48, "cache_hull_hitgroup", pcache_hull_hitgroup), - GLOBALVAR_LINK(0x0206FB60, "cache_hull", pcache_hull), - GLOBALVAR_LINK(0x0201CDC8, "cache_planes", pcache_planes), - GLOBALVAR_LINK(0x0206FB50, "pstudiohdr", ppstudiohdr), - GLOBALVAR_LINK(0x0200A398, "studio_hull", pstudio_hull), - GLOBALVAR_LINK(0x02052C48, "studio_hull_hitgroup", pstudio_hull_hitgroup), - GLOBALVAR_LINK(0x0200C998, "studio_planes", pstudio_planes), - GLOBALVAR_LINK(0x02052E48, "studio_clipnodes", pstudio_clipnodes), - GLOBALVAR_LINK(0x0206E908, "rgStudioCache", prgStudioCache), - GLOBALVAR_LINK(0x0206FB54, "r_cachecurrent", pr_cachecurrent), - GLOBALVAR_LINK(0x02016DC4, "nCurrentHull", pnCurrentHull), - GLOBALVAR_LINK(0x0200A384, "nCurrentPlane", pnCurrentPlane), - GLOBALVAR_LINK(0x025DD0E0, "bonetransform", pbonetransform), - GLOBALVAR_LINK(0x01E42284, "r_cachestudio", pr_cachestudio), - GLOBALVAR_LINK(0x01E424E8, "g_pSvBlendingAPI", pg_pSvBlendingAPI), - GLOBALVAR_LINK(0x01E424E0, "svBlending", psvBlending), - GLOBALVAR_LINK(0x01E424D0, "server_studio_api", pserver_studio_api), - GLOBALVAR_LINK(0x025DEEE0, "rotationmatrix", protationmatrix), - GLOBALVAR_LINK(0x021B1568, "box_hull", pbox_hull, 1), - GLOBALVAR_LINK(0x021B1540, "beam_hull", pbeam_hull), - GLOBALVAR_LINK(0x021B1590, "box_clipnodes", pbox_clipnodes, 1), - GLOBALVAR_LINK(0x021B15C0, "box_planes", pbox_planes, 1), - GLOBALVAR_LINK(0x021B14C8, "beam_planes", pbeam_planes), - GLOBALVAR_LINK(0x021B6240, "sv_areanodes", psv_areanodes), - GLOBALVAR_LINK(0x021B6640, "sv_numareanodes", psv_numareanodes), - GLOBALVAR_LINK(0x02004310, "g_contentsresult", pg_contentsresult), - GLOBALVAR_LINK(0x025E3E00, "box_hull", pbox_hull_0, 2), - GLOBALVAR_LINK(0x025E3E40, "box_clipnodes", pbox_clipnodes_0, 2), - GLOBALVAR_LINK(0x025E3E80, "box_planes", pbox_planes_0, 2), - GLOBALVAR_LINK(0x01E48EF0, "sv_maxvelocity", psv_maxvelocity), - GLOBALVAR_LINK(0x01E48EC4, "sv_gravity", psv_gravity), - GLOBALVAR_LINK(0x01E48F34, "sv_bounce", psv_bounce), - GLOBALVAR_LINK(0x01E48F14, "sv_stepsize", psv_stepsize), - GLOBALVAR_LINK(0x01E48E78, "sv_friction", psv_friction), - GLOBALVAR_LINK(0x01E48EA0, "sv_stopspeed", psv_stopspeed), - GLOBALVAR_LINK(0x021C2B48, "g_moved_from", pg_moved_from), - GLOBALVAR_LINK(0x021C2B4C, "sv_numareanodes", pg_moved_edict), - //GLOBALVAR_LINK(0x021C2B50, "c_yes", pc_yes), - //GLOBALVAR_LINK(0x021C2B54, "c_no", pc_no), - GLOBALVAR_LINK(0x020042AC, "net_thread_initialized", pnet_thread_initialized), - GLOBALVAR_LINK(0x01E3E8DC, "net_address", pnet_address), - GLOBALVAR_LINK(0x01E3E900, "ipname", pipname), - GLOBALVAR_LINK(0x01E3E968, "defport", pdefport), - GLOBALVAR_LINK(0x01E3E98C, "ip_clientport", pip_clientport), - GLOBALVAR_LINK(0x01E3E9B4, "clientport", pclientport), - GLOBALVAR_LINK(0x01E3EB34, "net_sleepforever", pnet_sleepforever), - GLOBALVAR_LINK(0x01FF2B60, "loopbacks", ploopbacks), - GLOBALVAR_LINK(0x01FF2AE8, "g_pLagData", pg_pLagData), - GLOBALVAR_LINK(0x020042D8, "gFakeLag", pgFakeLag), - GLOBALVAR_LINK(0x020042FC, "net_configured", pnet_configured), - GLOBALVAR_LINK(0x025F4020, "net_message", pnet_message), - GLOBALVAR_LINK(0x025F4040, "net_local_adr", pnet_local_adr), - GLOBALVAR_LINK(0x02604060, "net_from", pnet_from), - GLOBALVAR_LINK(0x020042BC, "noip", pnoip), - GLOBALVAR_LINK(0x01E3E9D8, "clockwindow", pclockwindow), - GLOBALVAR_LINK(0x020042B0, "use_thread", puse_thread), - GLOBALVAR_LINK(0x025F4000, "in_message", pin_message), - GLOBALVAR_LINK(0x025F3FC0, "in_from", pin_from), - GLOBALVAR_LINK(0x020042C0, "ip_sockets", pip_sockets), - GLOBALVAR_LINK(0x01E3E924, "iphostport", piphostport), - GLOBALVAR_LINK(0x01E3E944, "hostport", phostport), - GLOBALVAR_LINK(0x01E3EA04, "multicastport", pmulticastport), - GLOBALVAR_LINK(0x01E3EA70, "fakelag", pfakelag), - GLOBALVAR_LINK(0x01E3EA94, "fakeloss", pfakeloss), - GLOBALVAR_LINK(0x01E3EAB4, "net_graph", pnet_graph), - GLOBALVAR_LINK(0x01E3EADC, "net_graphwidth", pnet_graphwidth), - GLOBALVAR_LINK(0x01E3EAFC, "net_scale", pnet_scale), - GLOBALVAR_LINK(0x01E3EB20, "net_graphpos", pnet_graphpos), - GLOBALVAR_LINK(0x025F4060, "net_message_buffer", pnet_message_buffer), - GLOBALVAR_LINK(0x025E3FC0, "in_message_buf", pin_message_buf), - -#ifdef _WIN32 - GLOBALVAR_LINK(0x025F3FE0, "net_local_ipx_adr", pnet_local_ipx_adr), - GLOBALVAR_LINK(0x020042B8, "noipx", pnoipx), - GLOBALVAR_LINK(0x01E3EA28, "ipx_hostport", pipx_hostport), - GLOBALVAR_LINK(0x01E3EA50, "ipx_clientport", pipx_clientport), - GLOBALVAR_LINK(0x020042CC, "ipx_sockets", pipx_sockets), -#endif // _WIN32 - - GLOBALVAR_LINK(0x02604080, "gNetSplit", pgNetSplit), - GLOBALVAR_LINK(0x020042E8, "messages", pmessages), - GLOBALVAR_LINK(0x020042F4, "normalqueue", pnormalqueue), - GLOBALVAR_LINK(0x02605040, "gDownloadFile", pgDownloadFile), - GLOBALVAR_LINK(0x02605140, "net_drop", pnet_drop), - GLOBALVAR_LINK(0x01E3E00C, "net_log", pnet_log), - GLOBALVAR_LINK(0x01E3E034, "net_showpackets", pnet_showpackets), - GLOBALVAR_LINK(0x01E3E058, "net_showdrop", pnet_showdrop), - GLOBALVAR_LINK(0x01E3E080, "net_drawslider", pnet_drawslider), - GLOBALVAR_LINK(0x01E3E0A4, "net_chokeloopback", pnet_chokeloopback), - GLOBALVAR_LINK(0x01E3E0D8, "sv_filetransfercompression", psv_filetransfercompression), - GLOBALVAR_LINK(0x01E3E110, "sv_filetransfermaxsize", psv_filetransfermaxsize), - -#ifdef _WIN32 - GLOBALVAR_LINK(0x02090C88, "g_PerfCounterInitialized", pg_PerfCounterInitialized), - GLOBALVAR_LINK(0x021C2460, "g_PerfCounterMutex", pg_PerfCounterMutex), - GLOBALVAR_LINK(0x021C2454, "g_PerfCounterShiftRightAmount", pg_PerfCounterShiftRightAmount), - GLOBALVAR_LINK(0x021C28C0, "g_PerfCounterSlice", pg_PerfCounterSlice), - GLOBALVAR_LINK(0x02090C68, "g_CurrentTime", pg_CurrentTime), - GLOBALVAR_LINK(0x02090C70, "g_StartTime", pg_StartTime), - GLOBALVAR_LINK(0x01E4E98C, "g_FPUCW_Mask_Prec_64Bit", pg_FPUCW_Mask_Prec_64Bit), - GLOBALVAR_LINK(0x01E4E990, "g_FPUCW_Mask_Prec_64Bit_2", pg_FPUCW_Mask_Prec_64Bit_2), - GLOBALVAR_LINK(0x01E4E988, "g_FPUCW_Mask_ZeroDiv_OFlow", pg_FPUCW_Mask_Round_Trunc), - GLOBALVAR_LINK(0x01E4E984, "g_FPUCW_Mask_OFlow", pg_FPUCW_Mask_Round_Up), - GLOBALVAR_LINK(0x021C2244, "g_WinNTOrHigher", pg_WinNTOrHigher), - GLOBALVAR_LINK(0x020914E4, "g_bIsWin95", pg_bIsWin95), - GLOBALVAR_LINK(0x020914E8, "g_bIsWin98", pg_bIsWin98), -#endif // _WIN32 - - GLOBALVAR_LINK(0x02605180, "loadmodel", ploadmodel), - GLOBALVAR_LINK(0x02605160, "loadname", ploadname), - GLOBALVAR_LINK(0x026051A0, "mod_known", pmod_known), - GLOBALVAR_LINK(0x02605144, "mod_numknown", pmod_numknown), - GLOBALVAR_LINK(0x026671A0, "mod_base", pmod_base), - GLOBALVAR_LINK(0x01FF062C, "wadpath", pwadpath), - GLOBALVAR_LINK(0x01FF0630, "tested", ptested), - GLOBALVAR_LINK(0x01FF0634, "ad_enabled", pad_enabled), - GLOBALVAR_LINK(0x026671C0, "ad_wad", pad_wad), - GLOBALVAR_LINK(0x01FED528, "mod_known_info", pmod_known_info), - GLOBALVAR_LINK(0x02095B48, "lumpinfo", plumpinfo), - GLOBALVAR_LINK(0x02095B4C, "nTexLumps", pnTexLumps), - GLOBALVAR_LINK(0x021C2040, "texfiles", ptexfiles), - GLOBALVAR_LINK(0x02095B44, "nTexFiles", pnTexFiles), - GLOBALVAR_LINK(0x021B7660, "texgammatable", ptexgammatable), - GLOBALVAR_LINK(0x025DFCE4, "r_notexture_mip", pr_notexture_mip), - GLOBALVAR_LINK(0x021C2020, "nummiptex", pnummiptex), - GLOBALVAR_LINK(0x021BA020, "miptex", pmiptex), - GLOBALVAR_LINK(0x01E41A30, "r_wadtextures", pr_wadtextures), - GLOBALVAR_LINK(0x01E42270, "r_dointerp", pr_dointerp), - GLOBALVAR_LINK(0x025DFE40, "r_origin", pr_origin), - GLOBALVAR_LINK(0x01E415BC, "r_pixbytes", pr_pixbytes), - GLOBALVAR_LINK(0x01E43090, "gl_vsync", pgl_vsync), - GLOBALVAR_LINK(0x023FF0D0, "scr_con_current", pscr_con_current), - GLOBALVAR_LINK(0x0208F7EC, "g_ServerRemoteAccess", pg_ServerRemoteAccess), - GLOBALVAR_LINK(0x01FED1E8, "cpuPercent", pcpuPercent), - GLOBALVAR_LINK(0x01FED1D4, "startTime", pstartTime), - GLOBALVAR_LINK(0x01FED1E4, "g_bMajorMapChange", pg_bMajorMapChange), - GLOBALVAR_LINK(0x01E3A97C, "voice_recordtofile", pvoice_recordtofile), - GLOBALVAR_LINK(0x01E3A9A8, "voice_inputfromfile", pvoice_inputfromfile), - GLOBALVAR_LINK(0x01E3B250, "gTitleComments", pgTitleComments), - GLOBALVAR_LINK(0x01E3A9D8, "gGameHeaderDescription", pgGameHeaderDescription), - GLOBALVAR_LINK(0x01E3AAA0, "gSaveHeaderDescription", pgSaveHeaderDescription), - GLOBALVAR_LINK(0x01E3ABB0, "gAdjacencyDescription", pgAdjacencyDescription), - GLOBALVAR_LINK(0x01E3AC20, "gEntityTableDescription", pgEntityTableDescription), - GLOBALVAR_LINK(0x01E3AC80, "gLightstyleDescription", pgLightstyleDescription), - GLOBALVAR_LINK(0x01E3ACB0, "gHostMap", pgHostMap), - GLOBALVAR_LINK(0x01FED208, "g_iQuitCommandIssued", pg_iQuitCommandIssued), - GLOBALVAR_LINK(0x01FED20C, "g_pPostRestartCmdLineArgs", pg_pPostRestartCmdLineArgs), - GLOBALVAR_LINK(0x021CABA0, "g_rg_sv_challenges", pg_rg_sv_challenges), - GLOBALVAR_LINK(0x0239BCC0, "g_svdeltacallback", pg_svdeltacallback), - GLOBALVAR_LINK(0x01FED4D0, "_ZL11rateChecker", prateChecker), - GLOBALVAR_LINK(0x01FEC7F4, "gp_hpak_queue", pgp_hpak_queue), - GLOBALVAR_LINK(0x01FEC7F8, "hash_pack_dir", phash_pack_dir), - GLOBALVAR_LINK(0x0266AFB0, "hash_pack_header", phash_pack_header), - GLOBALVAR_LINK(0x020891D8, "firstLog", pfirstLog), - GLOBALVAR_LINK(0x01E4C6C4, "game", pgame), - GLOBALVAR_LINK(0x01E4BB44, "eng", peng), - GLOBALVAR_LINK(0x021B1468, "wads", pwads), - GLOBALVAR_LINK(0x01FF06B0, "g_module", pg_module), - GLOBALVAR_LINK(0x020914E0, "dedicated", pdedicated), - GLOBALVAR_LINK(0x020914E4, "g_bIsWin95", pg_bIsWin95), - GLOBALVAR_LINK(0x020914E8, "g_bIsWin98", pg_bIsWin98), - GLOBALVAR_LINK(0x020914F8, "g_flLastSteamProgressUpdateTime", pg_flLastSteamProgressUpdateTime), - GLOBALVAR_LINK(0x01E4B3E0, "szCommonPreloads", pszCommonPreloads), - GLOBALVAR_LINK(0x01E4B3F0, "szReslistsBaseDir", pszReslistsBaseDir), - GLOBALVAR_LINK(0x01E4B3FC, "szReslistsExt", pszReslistsExt), - GLOBALVAR_LINK(0x02095C98, "g_InitTracker", pg_InitTracker), - GLOBALVAR_LINK(0x020935A0, "gSystemWrapper", pgSystemWrapper), - -#ifndef _WIN32 - //GLOBALVAR_LINK(0x0, "gHasMMXTechnology", pgHasMMXTechnology), -#endif - -#endif // Data_References_region - - { NULL, NULL, NULL }, -}; diff --git a/rehlds/hookers/engine/hooklist.h b/rehlds/hookers/engine/hooklist.h deleted file mode 100644 index 9016390..0000000 --- a/rehlds/hookers/engine/hooklist.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "hookers/memory.h" -#include "hookers/helper.h" -#include "hookers/hooker.h" diff --git a/rehlds/hookers/engine/main.cpp b/rehlds/hookers/engine/main.cpp deleted file mode 100644 index 98f8fe0..0000000 --- a/rehlds/hookers/engine/main.cpp +++ /dev/null @@ -1,115 +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" - -IBaseInterface *CreateFileSystemInterface(); -InterfaceReg iface = InterfaceReg(CreateFileSystemInterface, "VFileSystem009"); - -#ifdef _WIN32 -const char *ORIGINAL_ENGINE_DLL_NAME = "swds.dll"; -const char *ORIGINAL_FILESYSTEM_DLL_NAME = "filesystem_stdio2.dll"; -#else -const char *ORIGINAL_ENGINE_DLL_NAME = "engine_i486.so"; -const char *ORIGINAL_FILESYSTEM_DLL_NAME = "filesystem_stdio2.so"; -#endif - -CSysModule *g_pOriginalFileSystemModule = NULL; -CreateInterfaceFn g_OriginalFileSystemFactory = NULL; -IFileSystem *g_pOriginalFileSystem = NULL; - -IBaseInterface *CreateFileSystemInterface() -{ - if (g_pOriginalFileSystem) - return g_pOriginalFileSystem; - - if (g_pOriginalFileSystemModule) - { - g_OriginalFileSystemFactory = Sys_GetFactory(g_pOriginalFileSystemModule); - if (g_OriginalFileSystemFactory) - { - int returnCode = 0; - g_pOriginalFileSystem = reinterpret_cast(g_OriginalFileSystemFactory(FILESYSTEM_INTERFACE_VERSION, &returnCode)); - return g_pOriginalFileSystem; - } - } - - return NULL; -} - -#ifdef _WIN32 - -// DLL entry point -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - if (fdwReason == DLL_PROCESS_ATTACH) - { - g_RehldsRuntimeConfig.parseFromCommandLine(GetCommandLineA()); - -#ifdef HOOK_ENGINE - size_t addr = (size_t)Sys_GetProcAddress(ORIGINAL_ENGINE_DLL_NAME, CREATEINTERFACE_PROCNAME); - HookModule("hlds.exe", addr); - - g_pOriginalFileSystemModule = Sys_LoadModule(ORIGINAL_FILESYSTEM_DLL_NAME); -#endif // HOOK_ENGINE - } - else if (fdwReason == DLL_PROCESS_DETACH) - { - if (g_pOriginalFileSystemModule) - { - Sys_UnloadModule(g_pOriginalFileSystemModule); - g_pOriginalFileSystemModule = NULL; - g_OriginalFileSystemFactory = NULL; - g_pOriginalFileSystem = NULL; - } - } - return TRUE; -} - -#else // _WIN32 - -void __attribute__((constructor)) DllMainLoad() -{ - size_t addr = (size_t)Sys_GetProcAddress(ORIGINAL_ENGINE_DLL_NAME, CREATEINTERFACE_PROCNAME); - HookModule("hlds.exe", addr); - - g_pOriginalFileSystemModule = Sys_LoadModule(ORIGINAL_FILESYSTEM_DLL_NAME); -} - -void __attribute__((destructor)) DllMainUnload() -{ - if (g_pOriginalFileSystemModule) - { - Sys_UnloadModule(g_pOriginalFileSystemModule); - g_pOriginalFileSystemModule = NULL; - g_OriginalFileSystemFactory = NULL; - g_pOriginalFileSystem = NULL; - } -} - -#endif // _WIN32 diff --git a/rehlds/hookers/helper.h b/rehlds/hookers/helper.h index ec521a3..926d551 100644 --- a/rehlds/hookers/helper.h +++ b/rehlds/hookers/helper.h @@ -8,7 +8,7 @@ #include #include -#if defined(HOOK_ENGINE) || defined(HOOK_HLTV) || defined(HOOK_FILESYSTEM) +#if defined(HOOK_HLTV) || defined(HOOK_FILESYSTEM) #define private public #define protected public @@ -160,4 +160,4 @@ namespace MsvcMethod { #error Hooking stuff is only available using MSVC compiler. #endif // _MSC_VER -#endif // #if defined(HOOK_ENGINE) || defined(HOOK_HLTV) || defined(HOOK_FILESYSTEM) +#endif // #if defined(HOOK_HLTV) || defined(HOOK_FILESYSTEM) diff --git a/rehlds/hookers/hooker.cpp b/rehlds/hookers/hooker.cpp index 2927c60..1fce842 100644 --- a/rehlds/hookers/hooker.cpp +++ b/rehlds/hookers/hooker.cpp @@ -137,14 +137,6 @@ int HookModule(const char *pszAppName, size_t addr) return (FALSE); } -#if defined(_WIN32) && defined(HOOK_ENGINE) - Module application; - if (!FindModuleByName(pszAppName, &application)) - printf("%s: launcher is not %s, tests playing/recording is disabled!\n", __func__, pszAppName); - else - TestSuite_Init(&g_Module, &application, g_FunctionRefs); -#endif - refData = g_DataRefs; while (refData->addressRef != NULL) { @@ -161,66 +153,37 @@ int HookModule(const char *pszAppName, size_t addr) refFunc++; } -#ifdef HOOK_ENGINE - // Actually hook all things - if (!g_RehldsRuntimeConfig.disableAllHooks) -#endif // SWDS + hookFunc = g_FunctionHooks; + while (hookFunc->handlerFunc != NULL) { - hookFunc = g_FunctionHooks; - while (hookFunc->handlerFunc != NULL) - { - if (!HookFunction(&g_Module, hookFunc)) - return (FALSE); - hookFunc++; - } + if (!HookFunction(&g_Module, hookFunc)) + return (FALSE); + hookFunc++; } -#if defined(_WIN32) && defined(HOOK_ENGINE) - Rehlds_Debug_Init(&g_Module); -#endif // _WIN32 - return (TRUE); } #ifdef _WIN32 void *malloc_wrapper(size_t size) { - void *res = malloc(size); -#ifdef HOOK_ENGINE - //Rehlds_Debug_logAlloc(size, res); -#endif // HOOK_ENGINE - return res; + return malloc(size); } void *realloc_wrapper(void *orig, size_t newSize) { - void *res = realloc(orig, newSize); -#ifdef HOOK_ENGINE - //Rehlds_Debug_logRealloc(newSize, orig, res); -#endif // HOOK_ENGINE - return res; + return realloc(orig, newSize); } void free_wrapper(void *mem) { -#ifdef HOOK_ENGINE - //Rehlds_Debug_logFree(mem); -#endif // HOOK_ENGINE free(mem); } void *calloc_wrapper(size_t count, size_t size) { - void *res = calloc(count, size); -#ifdef HOOK_ENGINE - //Rehlds_Debug_logAlloc(size * count, res); -#endif // HOOK_ENGINE - return res; + return calloc(count, size); } void *__nh_malloc_wrapper(size_t sz, int unk) { - void *res = malloc(sz); -#ifdef HOOK_ENGINE - //Rehlds_Debug_logAlloc(sz, res); -#endif // HOOK_ENGINE - return res; + return malloc(sz); } char *strdup_wrapper(const char *s) { diff --git a/rehlds/hookers/iosutil.h b/rehlds/hookers/iosutil.h deleted file mode 100644 index 34e56d8..0000000 --- a/rehlds/hookers/iosutil.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include - -class IosFlagSaver { -public: - explicit IosFlagSaver(std::ostream& _ios) : - ios(_ios), - f(_ios.flags()) { - } - ~IosFlagSaver() { - ios.flags(f); - } - - IosFlagSaver(const IosFlagSaver &rhs) = delete; - IosFlagSaver& operator= (const IosFlagSaver& rhs) = delete; - -private: - std::ostream& ios; - std::ios::fmtflags f; -}; diff --git a/rehlds/hookers/rehlds_debug.cpp b/rehlds/hookers/rehlds_debug.cpp deleted file mode 100644 index 45e379c..0000000 --- a/rehlds/hookers/rehlds_debug.cpp +++ /dev/null @@ -1,678 +0,0 @@ -#include "precompiled.h" - -const int REHLDS_DEBUG_MAX_EDICTS = 2048; - -uint32 calcFloatChecksum(uint32 crc, const float* pFloat) { - uint32 sVal = *reinterpret_cast(pFloat); - return _mm_crc32_u32(crc, sVal); -} - -uint32 calcVec3Checksum(uint32 crc, const vec_t* v) -{ - crc = calcFloatChecksum(crc, v); - crc = calcFloatChecksum(crc, v + 1); - crc = calcFloatChecksum(crc, v + 2); - return crc; -} - -uint32 calcEdictRefChecksum(uint32 crc, edict_t* ed) { - if (ed == NULL) { - return _mm_crc32_u32(crc, -1); - } - - return _mm_crc32_u32(crc, ed - g_psv.edicts); -} - -uint32 calcEngStringChecksum(uint32 crc, int str) { - if (str == 0) { - return _mm_crc32_u8(crc, 0); - } - - crc = _mm_crc32_u8(crc, 1); - const char* cc = pr_strings + str; - while (*cc) { - crc = _mm_crc32_u8(crc, *cc); - ++cc; - } - - crc = _mm_crc32_u8(crc, 0); - return crc; -} - -uint32 calcEntvarsChecksum(uint32 crc, const entvars_t* ev) { - crc = calcEngStringChecksum(crc, ev->classname); - crc = calcEngStringChecksum(crc, ev->globalname); - - crc = calcVec3Checksum(crc, ev->origin); - crc = calcVec3Checksum(crc, ev->oldorigin); - crc = calcVec3Checksum(crc, ev->velocity); - crc = calcVec3Checksum(crc, ev->basevelocity); - crc = calcVec3Checksum(crc, ev->clbasevelocity); - crc = calcVec3Checksum(crc, ev->movedir); - crc = calcVec3Checksum(crc, ev->angles); - crc = calcVec3Checksum(crc, ev->avelocity); - crc = calcVec3Checksum(crc, ev->punchangle); - crc = calcVec3Checksum(crc, ev->v_angle); - - crc = calcVec3Checksum(crc, ev->endpos); - crc = calcVec3Checksum(crc, ev->startpos); - crc = calcFloatChecksum(crc, &ev->impacttime); - crc = calcFloatChecksum(crc, &ev->starttime); - - crc = _mm_crc32_u32(crc, ev->fixangle); - crc = calcFloatChecksum(crc, &ev->idealpitch); - crc = calcFloatChecksum(crc, &ev->pitch_speed); - crc = calcFloatChecksum(crc, &ev->ideal_yaw); - crc = calcFloatChecksum(crc, &ev->yaw_speed); - - crc = _mm_crc32_u32(crc, ev->modelindex); - - crc = calcEngStringChecksum(crc, ev->model); - - crc = calcEngStringChecksum(crc, ev->viewmodel); - crc = calcEngStringChecksum(crc, ev->weaponmodel); - - crc = calcVec3Checksum(crc, ev->absmin); - crc = calcVec3Checksum(crc, ev->absmax); - crc = calcVec3Checksum(crc, ev->mins); - crc = calcVec3Checksum(crc, ev->maxs); - crc = calcVec3Checksum(crc, ev->size); - - crc = calcFloatChecksum(crc, &ev->ltime); - crc = calcFloatChecksum(crc, &ev->nextthink); - - crc = _mm_crc32_u32(crc, ev->movetype); - crc = _mm_crc32_u32(crc, ev->solid); - - crc = _mm_crc32_u32(crc, ev->skin); - crc = _mm_crc32_u32(crc, ev->body); - crc = _mm_crc32_u32(crc, ev->effects); - - crc = calcFloatChecksum(crc, &ev->gravity); - crc = calcFloatChecksum(crc, &ev->friction); - - crc = _mm_crc32_u32(crc, ev->light_level); - - crc = _mm_crc32_u32(crc, ev->sequence); - crc = _mm_crc32_u32(crc, ev->gaitsequence); - crc = calcFloatChecksum(crc, &ev->frame); - crc = calcFloatChecksum(crc, &ev->animtime); - crc = calcFloatChecksum(crc, &ev->framerate); - crc = _mm_crc32_u32(crc, *(uint32*)&ev->controller[0]); - crc = _mm_crc32_u16(crc, *(uint16*)&ev->blending[0]); - - crc = calcFloatChecksum(crc, &ev->scale); - - crc = _mm_crc32_u32(crc, ev->rendermode); - crc = calcFloatChecksum(crc, &ev->renderamt); - crc = calcVec3Checksum(crc, ev->rendercolor); - crc = _mm_crc32_u32(crc, ev->renderfx); - - crc = calcFloatChecksum(crc, &ev->health); - crc = calcFloatChecksum(crc, &ev->frags); - crc = _mm_crc32_u32(crc, ev->weapons); - crc = calcFloatChecksum(crc, &ev->takedamage); - - crc = _mm_crc32_u32(crc, ev->deadflag); - crc = calcVec3Checksum(crc, ev->view_ofs); - - crc = _mm_crc32_u32(crc, ev->button); - crc = _mm_crc32_u32(crc, ev->impulse); - - crc = calcEdictRefChecksum(crc, ev->chain); - crc = calcEdictRefChecksum(crc, ev->dmg_inflictor); - crc = calcEdictRefChecksum(crc, ev->enemy); - crc = calcEdictRefChecksum(crc, ev->aiment); - crc = calcEdictRefChecksum(crc, ev->owner); - crc = calcEdictRefChecksum(crc, ev->groundentity); - - crc = _mm_crc32_u32(crc, ev->spawnflags); - crc = _mm_crc32_u32(crc, ev->flags); - - crc = _mm_crc32_u32(crc, ev->colormap); - crc = _mm_crc32_u32(crc, ev->team); - - crc = calcFloatChecksum(crc, &ev->max_health); - crc = calcFloatChecksum(crc, &ev->teleport_time); - crc = calcFloatChecksum(crc, &ev->armortype); - crc = calcFloatChecksum(crc, &ev->armorvalue); - - crc = _mm_crc32_u32(crc, ev->waterlevel); - crc = _mm_crc32_u32(crc, ev->watertype); - - crc = calcEngStringChecksum(crc, ev->target); - crc = calcEngStringChecksum(crc, ev->targetname); - crc = calcEngStringChecksum(crc, ev->netname); - crc = calcEngStringChecksum(crc, ev->message); - - crc = calcFloatChecksum(crc, &ev->speed); - crc = calcFloatChecksum(crc, &ev->air_finished); - crc = calcFloatChecksum(crc, &ev->pain_finished); - crc = calcFloatChecksum(crc, &ev->radsuit_finished); - - crc = calcEdictRefChecksum(crc, ev->pContainingEntity); - - //int playerclass; - - crc = calcFloatChecksum(crc, &ev->maxspeed); - - crc = calcFloatChecksum(crc, &ev->fov); - crc = _mm_crc32_u32(crc, ev->weaponanim); - - crc = _mm_crc32_u32(crc, ev->pushmsec); - - crc = _mm_crc32_u32(crc, ev->bInDuck); - crc = _mm_crc32_u32(crc, ev->flTimeStepSound); - crc = _mm_crc32_u32(crc, ev->flSwimTime); - crc = _mm_crc32_u32(crc, ev->flDuckTime); - crc = _mm_crc32_u32(crc, ev->iStepLeft); - crc = calcFloatChecksum(crc, &ev->flFallVelocity); - - crc = _mm_crc32_u32(crc, ev->gamestate); - crc = _mm_crc32_u32(crc, ev->oldbuttons); - crc = _mm_crc32_u32(crc, ev->groupinfo); - - return crc; -} - -uint32 calcEdictChecksum(uint32 crc, const edict_t* ed) { - crc = _mm_crc32_u32(crc, ed->free); - if (ed->free) - return crc; - - crc = _mm_crc32_u32(crc, ed->serialnumber); - crc = _mm_crc32_u32(crc, ed->headnode); - crc = _mm_crc32_u32(crc, ed->num_leafs); - for (int i = 0; i < ed->num_leafs; i++) - crc = _mm_crc32_u16(crc, ed->leafnums[i]); - - crc = calcFloatChecksum(crc, &ed->freetime); - crc = calcEntvarsChecksum(crc, &ed->v); - return crc; -} - -void PrintFloat(const float* pVal, std::stringstream &ss) { - IosFlagSaver iosfs(ss); - uint32 sVal = *reinterpret_cast(pVal); - ss << "{ float: " << *pVal << "; raw: " << std::hex << sVal << " }"; -} - -void PrintVec3(const vec_t* vec, std::stringstream &ss) { - ss << "{ vec[0]: "; PrintFloat(&vec[0], ss); - ss << "; vec[1]: "; PrintFloat(&vec[1], ss); - ss << "; vec[2]: "; PrintFloat(&vec[2], ss); - ss << "} "; - -} - -void PrintClipnode(dclipnode_t* clipnode, std::stringstream &ss) { - ss << "{" - << " addr: " << (size_t)clipnode - << " planenum: " << clipnode->planenum - << " child[0]: " << clipnode->children[0] - << " child[1]: " << clipnode->children[1] - << " }"; -} - -void PrintHull(hull_t* hull, std::stringstream &ss) -{ - - ss << "{" - << " addr: " << (size_t)hull - << " clip_mins: "; PrintVec3(hull->clip_mins, ss); - ss << "; clip_maxs: "; PrintVec3(hull->clip_maxs, ss); - ss << "; firstclipnode: " << hull->firstclipnode - << "; lastclipnode: " << hull->lastclipnode - << " }"; -} - -void PrintTrace(trace_t* trace, std::stringstream &ss) -{ - ss << "{ " - << " allsolid: " << trace->allsolid - << "; startsolid: " << trace->startsolid - << "; inopen: " << trace->inopen - << "; inwater: " << trace->inwater - << "; hitgroup: " << trace->hitgroup - << "; ent: "; - if (trace->ent == NULL) - ss << "NULL"; - else - ss << (uint32)(trace->ent - g_psv.edicts); - - ss << "; fraction: "; PrintFloat(&trace->fraction, ss); - ss << "; endpos: "; PrintVec3(trace->endpos, ss); - ss << "; plane.normal: "; PrintVec3(trace->plane.normal, ss); - ss << "; plane.dist: "; PrintFloat(&trace->plane.dist, ss); - ss << " }"; -} - -enum PrintEdictFlags_e { - ED_PRINT_POSITION = (1 << 0), - ED_PRINT_VELOCITY = (1 << 1), - ED_PRINT_CRC = (1 << 2), -}; - -void PrintEdict(edict_t* ent, std::stringstream &ss, int flags) -{ - IosFlagSaver iosfs(ss); - if (ent == NULL) { - ss << "NULL"; - return; - } - - ss << "{" - << " id: " << (uint32)(ent - g_psv.edicts); - - if (flags & ED_PRINT_POSITION) { - ss << "; origin: "; PrintVec3(ent->v.origin, ss); - ss << "; angles: "; PrintVec3(ent->v.angles, ss); - } - - if (flags & ED_PRINT_VELOCITY) { - ss << "; avelocity: "; PrintVec3(ent->v.avelocity, ss); - ss << "; velocity: "; PrintVec3(ent->v.velocity, ss); - } - - if (flags & ED_PRINT_CRC) { - ss << "; crc: " << std::hex << calcEdictChecksum(0, ent); - } - - ss << " } "; -} - -std::ofstream g_RehldsDebugLog; - -#ifndef SV_PushRotate_debug_region - -SV_PushRotate_proto SV_PushRotate_orig; -int g_SVPushRotateCallQueue = 0; - -int __cdecl SV_PushRotate_hooked(edict_t *pusher, float movetime) -{ - static int callCounter = 0; - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] SV_PushRotate_hooked( " - << "ent: "; PrintEdict(pusher, ss, 0); - ss << "; movetime: "; PrintFloat(&movetime, ss); - ss << " )"; - - uint32 entCheckSums[REHLDS_DEBUG_MAX_EDICTS]; - for (int i = 0; i < g_psv.num_edicts; i++) - entCheckSums[i] = calcEdictChecksum(0, &g_psv.edicts[i]); - - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - g_SVPushRotateCallQueue++; - int res = SV_PushRotate_orig(pusher, movetime); - g_SVPushRotateCallQueue--; - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] SV_PushRotate_hooked( "; - ess << " ent: "; PrintEdict(pusher, ess, ED_PRINT_CRC); - ess << " chanedEdicts: [ "; - - for (int i = 0; i < g_psv.num_edicts; i++) { - uint32 newCrc = calcEdictChecksum(0, &g_psv.edicts[i]); - if (newCrc != entCheckSums[i]) { - ess << " { " << i << ": " << entCheckSums[i] << " -> " << newCrc; - if (65097 == currentCallID) { - ess << "; ent: "; PrintEdict(&g_psv.edicts[i], ess, ED_PRINT_POSITION | ED_PRINT_VELOCITY); - } - ess << " } "; - } - } - - ess << " ) => " << res; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); - - return res; -} -#endif - - -#ifndef SV_RecursiveHullCheck_debug_region - -SV_RecursiveHullCheck_proto SV_RecursiveHullCheck_orig; - -qboolean __cdecl SV_RecursiveHullCheck_hooked(hull_t *hull, int num, float p1f, float p2f, vec_t *p1, vec_t *p2, trace_t *trace) -{ - static int callCounter = 0; - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] SV_RecursiveHullCheck_hooked( " - << "hull: "; PrintHull(hull, ss); - ss << "; num: " << num << "; p1f: "; PrintFloat(&p1f, ss); - ss << "; p2f: "; PrintFloat(&p2f, ss); - ss << "; p1: "; PrintVec3(p1, ss); - ss << "; p2: "; PrintVec3(p2, ss); - ss << "; trace: "; PrintTrace(trace, ss); - ss << ")"; - - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - qboolean res = SV_RecursiveHullCheck_orig(hull, num, p1f, p2f, p1, p2, trace); - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] SV_RecursiveHullCheck_hooked( " - << "trace: "; PrintTrace(trace, ess); - ess << " ) => " << res; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); - - return res; -} - -#endif - -#ifndef SV_SingleClipMoveToEntity_debug_region - -SV_SingleClipMoveToEntity_proto SV_SingleClipMoveToEntity_orig; - -void __cdecl SV_SingleClipMoveToEntity_hooked(edict_t *ent, const vec_t *start, const vec_t *mins, const vec_t *maxs, const vec_t *end, trace_t *trace) -{ - static int callCounter = 0; - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] SV_SingleClipMoveToEntity_hooked( " - << "ent: "; - - if (ent == NULL) - ss << "NULL"; - else - ss << (uint32)(ent - g_psv.edicts); - - ss << "; start: "; PrintVec3(start, ss); - ss << "; mins: "; PrintVec3(mins, ss); - ss << "; maxs: "; PrintVec3(maxs, ss); - ss << "; end: "; PrintVec3(end, ss); - ss << ")"; - - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - SV_SingleClipMoveToEntity_orig(ent, start, mins, maxs, end, trace); - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] SV_SingleClipMoveToEntity_hooked( " - << "trace: "; PrintTrace(trace, ess); - ess << " )"; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); -} - -#endif - -#ifndef SV_PushEntity_debug_region -SV_PushEntity_proto SV_PushEntity_orig; - -trace_t __cdecl SV_PushEntity_hooked(edict_t *ent, vec_t *push) -{ - static int callCounter = 0; - - if (g_SVPushRotateCallQueue <= 0 || true) { - return SV_PushEntity_orig(ent, push); - } - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] SV_PushEntity_hooked( " - << "ent: "; PrintEdict(ent, ss, 0); - ss << "; push: "; PrintVec3(push, ss); - ss << ")"; - - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - trace_t res = SV_PushEntity_orig(ent, push); - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] SV_PushEntity_hooked( "; - ess << " ) "; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); - - return res; -} -#endif - -#ifndef SV_LinkEdict_debug_region - -SV_LinkEdict_proto SV_LinkEdict_orig; - -void __cdecl SV_LinkEdict_hooked(edict_t *ent, qboolean touch_triggers) -{ - static int callCounter = 0; - - if (g_SVPushRotateCallQueue <= 0) { - SV_LinkEdict_orig(ent, touch_triggers); - return; - } - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] SV_LinkEdict_hooked( " - << "ent: "; PrintEdict(ent, ss, ED_PRINT_CRC); - ss << "; touch_triggers: " << touch_triggers - << " )"; - - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - SV_LinkEdict_orig(ent, touch_triggers); - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] SV_LinkEdict_hooked( "; - ess << " ) "; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); -} - -#endif - -#ifndef ran1_debug_region - -ran1_proto ran1_orig; -int32 __cdecl ran1_hooked() -{ - static int callCounter = 0; - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] ran1() "; - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - int res = ran1_orig(); - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] ran1() => " << res; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); - - return res; -} - -#endif - -#ifndef SV_Physics_Step_debug_region - -SV_Physics_Step_proto SV_Physics_Step_orig; - -void __cdecl SV_Physics_Step_hooked(edict_t *ent) -{ - static int callCounter = 0; - - std::stringstream ss; - int currentCallID = ++callCounter; - ss << " >>> [" << currentCallID << "] SV_Physics_Step_hooked( " - << "ent: "; PrintEdict(ent, ss, ED_PRINT_CRC | ED_PRINT_VELOCITY | ED_PRINT_POSITION); - ss << ")"; - - g_RehldsDebugLog << ss.str() << "\n"; - g_RehldsDebugLog.flush(); - - SV_Physics_Step_orig(ent); - - std::stringstream ess; - ess << " <<< [" << currentCallID << "] SV_Physics_Step_hooked( " - << "ent: "; PrintEdict(ent, ess, ED_PRINT_CRC | ED_PRINT_VELOCITY | ED_PRINT_POSITION); - ess << " ) "; - - g_RehldsDebugLog << ess.str() << "\n"; - g_RehldsDebugLog.flush(); -} - -#endif - -void Rehlds_Debug_logAlloc(size_t sz, void* ptr) -{ - IosFlagSaver iosfs(g_RehldsDebugLog); - g_RehldsDebugLog << "malloc(" << sz << ") => " << std::hex << (size_t)ptr << "\n"; - g_RehldsDebugLog.flush(); -} - -void Rehlds_Debug_logRealloc(size_t sz, void* oldPtr, void* newPtr) -{ - IosFlagSaver iosfs(g_RehldsDebugLog); - g_RehldsDebugLog << "realloc(" << std::hex << (size_t)oldPtr << ", " << sz << ") => " << (size_t)newPtr << "\n"; - g_RehldsDebugLog.flush(); -} - -void Rehlds_Debug_logFree(void* ptr) -{ - IosFlagSaver iosfs(g_RehldsDebugLog); - g_RehldsDebugLog << "free(" << std::hex << (size_t)ptr << ")\n"; - g_RehldsDebugLog.flush(); -} - -void Rehlds_Debug_LogDeltaFlags(delta_t* delta, int counter, bool verbose) { - unsigned int cksum = 0; - - for (int i = 0; i < delta->fieldCount; i++) { - cksum = _mm_crc32_u16(cksum, delta->pdd[i].flags); - } - - g_RehldsDebugLog << "DF(c=" << counter << " crc=" << cksum << ")\n"; - if (verbose) { - for (int i = 0; i < delta->fieldCount; i++) { - g_RehldsDebugLog << "DeltaFlagsVerbose(counter=" << counter << " id=" << delta->pdd[i].fieldName << " flags= " << delta->pdd[i].flags << ")\n"; - } - } - g_RehldsDebugLog.flush(); -} - -void Rehlds_Debug_LogSzAlloc(int counter, int cursize, int maxsize, int flags) { - g_RehldsDebugLog << "SZAlloc(c=" << counter << " sz=" << cursize << " maxsz= " << maxsize << " f=" << flags << ")\n"; - g_RehldsDebugLog.flush(); -} - - -void Rehlds_Debug_Init(Module* engine) -{ - //CFuncAddr* cfa; - - /* - CFuncAddr* recursiveHullCheckCalls = NULL; - FindAllCalls(&engine->codeSection, &recursiveHullCheckCalls, 0xBA160 + engine->base); - SV_RecursiveHullCheck_orig = (SV_RecursiveHullCheck_proto)((void*)(0xBA160 + engine->base)); - - cfa = recursiveHullCheckCalls; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&SV_RecursiveHullCheck_hooked); - cfa = cfa->Next; - } - - - CFuncAddr* singleClipMoveToEntityCalls = NULL; - FindAllCalls(&engine->codeSection, &singleClipMoveToEntityCalls, 0xBA550 + engine->base); - SV_SingleClipMoveToEntity_orig = (SV_SingleClipMoveToEntity_proto)((void*)(0xBA550 + engine->base)); - - cfa = singleClipMoveToEntityCalls; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&SV_SingleClipMoveToEntity_hooked); - cfa = cfa->Next; - } - - */ - - /* - CFuncAddr* pushEntityCalls = NULL; - FindAllCalls(&engine->codeSection, &pushEntityCalls, 0x95450 + engine->base); - SV_PushEntity_orig = (SV_PushEntity_proto)((void*)(0x95450 + engine->base)); - - cfa = pushEntityCalls; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&SV_PushEntity_hooked); - cfa = cfa->Next; - } - */ - - - /* - CFuncAddr* linkEdictCalls = NULL; - FindAllCalls(&engine->codeSection, &linkEdictCalls, 0xB9CF0 + engine->base); - SV_LinkEdict_orig = (SV_LinkEdict_proto)((void*)(0xB9CF0 + engine->base)); - - cfa = linkEdictCalls; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&SV_LinkEdict_hooked); - cfa = cfa->Next; - } - */ - - /* - CFuncAddr* pushRotateCalls = NULL; - FindAllCalls(&engine->codeSection, &pushRotateCalls, 0x958F0 + engine->base); - SV_PushRotate_orig = (SV_PushRotate_proto)((void*)(0x958F0 + engine->base)); - - cfa = pushRotateCalls; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&SV_PushRotate_hooked); - cfa = cfa->Next; - } - */ - - /* - CFuncAddr* ran1Calls = NULL; - FindAllCalls(&engine->codeSection, &ran1Calls, 0x60A10 + engine->base); - ran1_orig = (ran1_proto)((void*)(0x60A10 + engine->base)); - - cfa = ran1Calls; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&ran1_hooked); - cfa = cfa->Next; - } - */ - - /* - CFuncAddr* svPysicsStepCallc = NULL; - FindAllCalls(&engine->codeSection, &svPysicsStepCallc, 0x96E70 + engine->base); - SV_Physics_Step_orig = (SV_Physics_Step_proto)((void*)(0x96E70 + engine->base)); - - cfa = svPysicsStepCallc; - while (cfa != NULL) { - HookFunctionCall((void*)cfa->Addr, (void*)&SV_Physics_Step_hooked); - cfa = cfa->Next; - } - */ - - - //g_RehldsDebugLog.exceptions(std::ios::badbit | std::ios::failbit); - //g_RehldsDebugLog.open("d:\\rehlds_debug.log", std::ios::out | std::ios::binary); - - -} diff --git a/rehlds/hookers/rehlds_debug.h b/rehlds/hookers/rehlds_debug.h deleted file mode 100644 index 9964d3b..0000000 --- a/rehlds/hookers/rehlds_debug.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include "osconfig.h" -#include "maintypes.h" -#include "memory.h" -#include "model.h" -#include "iosutil.h" - -#ifdef _WIN32 - -typedef qboolean(__cdecl *SV_RecursiveHullCheck_proto)(hull_t *hull, int num, float p1f, float p2f, vec_t *p1, vec_t *p2, trace_t *trace); -extern SV_RecursiveHullCheck_proto SV_RecursiveHullCheck_orig; -extern qboolean __cdecl SV_RecursiveHullCheck_hooked(hull_t *hull, int num, float p1f, float p2f, vec_t *p1, vec_t *p2, trace_t *trace); - -typedef void(__cdecl *SV_SingleClipMoveToEntity_proto)(edict_t *ent, const vec_t *start, const vec_t *mins, const vec_t *maxs, const vec_t *end, trace_t *trace); -extern SV_SingleClipMoveToEntity_proto SV_SingleClipMoveToEntity_orig; -void __cdecl SV_SingleClipMoveToEntity_hooked(edict_t *ent, const vec_t *start, const vec_t *mins, const vec_t *maxs, const vec_t *end, trace_t *trace); - -typedef trace_t (__cdecl *SV_PushEntity_proto)(edict_t *ent, vec_t *push); -extern SV_PushEntity_proto SV_PushEntity_orig; -trace_t __cdecl SV_PushEntity_hooked(edict_t *ent, vec_t *push); - -typedef void (__cdecl *SV_LinkEdict_proto)(edict_t *ent, qboolean touch_triggers); -extern SV_LinkEdict_proto SV_LinkEdict_orig; -void __cdecl SV_LinkEdict_hooked(edict_t *ent, qboolean touch_triggers); - -typedef int(__cdecl *SV_PushRotate_proto)(edict_t *pusher, float movetime); -extern SV_PushRotate_proto SV_PushRotate_orig; -int __cdecl SV_PushRotate_hooked(edict_t *pusher, float movetime); - -typedef int32(__cdecl *ran1_proto)(); -extern ran1_proto ran1_orig; -int32 __cdecl ran1_hooked(); - -typedef void (__cdecl *SV_Physics_Step_proto)(edict_t *ent); -extern SV_Physics_Step_proto SV_Physics_Step_orig; -void __cdecl SV_Physics_Step_hooked(edict_t *ent); - - -extern void Rehlds_Debug_logAlloc(size_t sz, void* ptr); -extern void Rehlds_Debug_logRealloc(size_t sz, void* oldPtr, void* newPtr); -extern void Rehlds_Debug_logFree(void* ptr); - -extern void Rehlds_Debug_LogDeltaFlags(delta_t* delta, int counter, bool verbose); -extern void Rehlds_Debug_LogSzAlloc(int counter, int cursize, int maxsize, int flags); - -extern void Rehlds_Debug_Init(Module* engine); - -#endif diff --git a/rehlds/msvc/ReHLDS.vcxproj b/rehlds/msvc/ReHLDS.vcxproj index b587290..b9f9bc2 100644 --- a/rehlds/msvc/ReHLDS.vcxproj +++ b/rehlds/msvc/ReHLDS.vcxproj @@ -5,18 +5,6 @@ Debug Play Win32 - - Debug Record - Win32 - - - Debug Swds Play - Win32 - - - Debug Swds - Win32 - Debug Win32 @@ -25,14 +13,6 @@ Release Play Win32 - - Release Swds Play - Win32 - - - Release Swds - Win32 - Release Win32 @@ -109,68 +89,29 @@ - - true - true - true - true - true - true - - - true - true - true - true - - - true - true - true - true - true - true - true - - true - true true - true - true - true true - true - true + true true true - true - true - true - true - true - true - true - true - true true + true + true true + true + true true - true true - true - true - true true - true - true + true true true @@ -179,29 +120,20 @@ + Create - Create precompiled.h - precompiled.h Create - Create precompiled.h - precompiled.h - Create - precompiled.h - Create Create - Create - Create - precompiled.h + Create precompiled.h - precompiled.h - precompiled.h + precompiled.h Create Create precompiled.h @@ -217,106 +149,61 @@ true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true - true + true true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true true - true true - true - true - true true - true - true + true @@ -473,9 +360,7 @@ - - @@ -483,7 +368,6 @@ - @@ -567,19 +451,13 @@ true - true true - true - true true true true - true true - true - true true true @@ -605,14 +483,6 @@ v141_xp MultiByte - - DynamicLibrary - true - v120_xp - v140_xp - v141_xp - MultiByte - DynamicLibrary true @@ -621,22 +491,6 @@ v141_xp MultiByte - - DynamicLibrary - true - v120_xp - v140_xp - v141_xp - MultiByte - - - DynamicLibrary - true - v120_xp - v140_xp - v141_xp - MultiByte - Application true @@ -653,15 +507,6 @@ v141_xp MultiByte - - DynamicLibrary - false - v120_xp - v140_xp - v141_xp - true - MultiByte - DynamicLibrary false @@ -671,16 +516,7 @@ true MultiByte - - DynamicLibrary - false - v120_xp - v140_xp - v141_xp - true - MultiByte - - + DynamicLibrary false v120_xp @@ -692,112 +528,44 @@ - - - - + - - - - - - - - - - - - - + - filesystem_stdio - - swds - filesystem_stdio - - swds - - filesystem_stdio - filesystem_stdio filesystem_stdio - - filesystem_stdio - - filesystem_stdio - - swds - + swds - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(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) - Level3 - Disabled - true - REHLDS_API;REHLDS_OPT_PEDANTIC;REHLDS_SELF;HOOK_ENGINE;REHLDS_FIXES;REHLDS_CHECKS;HAVE_OPT_STRTOOLS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions) - Precise - /arch:IA32 %(AdditionalOptions) - MultiThreadedDebug - Use - precompiled.h - - - true - psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - build.always.run - build.always.run - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision @@ -835,42 +603,6 @@ - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(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) - Level3 - Disabled - true - REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions) - Precise - /arch:IA32 %(AdditionalOptions) - MultiThreadedDebug - Use - precompiled.h - - - true - psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - build.always.run - build.always.run - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision @@ -909,42 +641,6 @@ build.always.run - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(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) - Level3 - Disabled - true - REHLDS_SELF;HOOK_ENGINE;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions) - Precise - /arch:IA32 %(AdditionalOptions) - MultiThreadedDebug - Use - precompiled.h - - - true - psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - build.always.run - build.always.run - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") @@ -1016,86 +712,7 @@ build.always.run - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(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) - Level3 - MaxSpeed - true - true - true - REHLDS_API;REHLDS_OPT_PEDANTIC;REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;HAVE_OPT_STRTOOLS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - /arch:IA32 %(AdditionalOptions) - Use - precompiled.h - - - true - true - true - psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - build.always.run - build.always.run - - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(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) - Level3 - MaxSpeed - true - true - true - REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - /arch:IA32 %(AdditionalOptions) - Use - precompiled.h - - - true - true - true - psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - build.always.run - build.always.run - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision @@ -1139,7 +756,7 @@ build.always.run - + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision diff --git a/rehlds/msvc/ReHLDS.vcxproj.filters b/rehlds/msvc/ReHLDS.vcxproj.filters index fddae72..98ecc21 100644 --- a/rehlds/msvc/ReHLDS.vcxproj.filters +++ b/rehlds/msvc/ReHLDS.vcxproj.filters @@ -5,9 +5,6 @@ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - {7be88557-a49b-4c62-8df3-d7134a578201} - {eeaac718-712b-453f-9d34-4cefc9e0fe59} @@ -326,21 +323,6 @@ engine\common - - hookers - - - hookers - - - hookers - - - hookers - - - hookers - common @@ -356,6 +338,12 @@ engine + + rehlds + + + rehlds + @@ -1063,30 +1051,21 @@ public\rehlds - - hookers - rehlds - - hookers - - - hookers - engine\common - - hookers - public engine + + rehlds + diff --git a/rehlds/pm_shared/pm_defs.h b/rehlds/pm_shared/pm_defs.h index 7350c1a..1c47d8f 100644 --- a/rehlds/pm_shared/pm_defs.h +++ b/rehlds/pm_shared/pm_defs.h @@ -1,9 +1,9 @@ /*** * * Copyright (c) 1996-2002, Valve LLC. All rights reserved. -* -* This product contains software technology licensed from Id -* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. +* +* This product contains software technology licensed from Id +* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. * All Rights Reserved. * * Use, distribution, and modification of this source code and/or resulting @@ -62,7 +62,7 @@ typedef struct physent_s int solid; // Triggers and func_door type WATER brushes are SOLID_NOT int skin; // BSP Contents for such things like fun_door water brushes. int rendermode; // So we can ignore glass - + // Complex collision detection. float frame; int sequence; @@ -108,12 +108,12 @@ typedef struct playermove_s vec3_t velocity; // Current movement direction. vec3_t movedir; // For waterjumping, a forced forward velocity so we can fly over lip of ledge. vec3_t basevelocity; // Velocity of the conveyor we are standing, e.g. - + // For ducking/dead vec3_t view_ofs; // Our eye position. float flDuckTime; // Time we started duck qboolean bInDuck; // In process of ducking or ducked already? - + // For walking/falling int flTimeStepSound; // Next time we can play a step sound int iStepLeft; @@ -164,12 +164,12 @@ typedef struct playermove_s vec3_t vuser4; // world state // Number of entities to clip against. - int numphysent; + int numphysent; physent_t physents[MAX_PHYSENTS]; // Number of momvement entities (ladders) int nummoveent; // just a list of ladders - physent_t moveents[MAX_MOVEENTS]; + physent_t moveents[MAX_MOVEENTS]; // All things being rendered, for tracing against things you don't actually collide with int numvisent; @@ -185,28 +185,28 @@ typedef struct playermove_s char physinfo[ MAX_PHYSINFO_STRING ]; // Physics info string struct movevars_s *_movevars; - vec3_t _player_mins[ 4 ]; - vec3_t _player_maxs[ 4 ]; - + vec3_t player_mins[MAX_MAP_HULLS]; + vec3_t player_maxs[MAX_MAP_HULLS]; + // Common functions const char *(*PM_Info_ValueForKey) ( const char *s, const char *key ); void (*PM_Particle)( float *origin, int color, float life, int zpos, int zvel); int (*PM_TestPlayerPosition) (float *pos, pmtrace_t *ptrace ); - void (*Con_NPrintf)( int idx, char *fmt, ... ); - void (*Con_DPrintf)( char *fmt, ... ); - void (*Con_Printf)( char *fmt, ... ); + void (*Con_NPrintf)( int idx, const char *fmt, ... ); + void (*Con_DPrintf)( const char *fmt, ... ); + void (*Con_Printf)( const char *fmt, ... ); double (*Sys_FloatTime)( void ); void (*PM_StuckTouch)( int hitent, pmtrace_t *ptraceresult ); int (*PM_PointContents) (float *p, int *truecontents /*filled in if this is non-null*/ ); int (*PM_TruePointContents) (float *p); - int (*PM_HullPointContents) ( struct hull_s *hull, int num, float *p); + int (*PM_HullPointContents) ( struct hull_s *hull, int num, float *p); pmtrace_t (*PM_PlayerTrace) (float *start, float *end, int traceFlags, int ignore_pe ); struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehulll, int ignore_pe ); int32 (*RandomLong)( int32 lLow, int32 lHigh ); float (*RandomFloat)( float flLow, float flHigh ); int (*PM_GetModelType)( struct model_s *mod ); void (*PM_GetModelBounds)( struct model_s *mod, float *mins, float *maxs ); - void *(*PM_HullForBsp)( physent_t *pe, float *offset ); + struct hull_s *(*PM_HullForBsp)( physent_t *pe, float *offset ); float (*PM_TraceModel)( physent_t *pEnt, float *start, float *end, trace_t *trace ); int (*COM_FileSize)(const char *filename); byte *(*COM_LoadFile) (const char *path, int usehunk, int *pLength); @@ -215,11 +215,11 @@ typedef struct playermove_s // Functions // Run functions for this frame? - qboolean runfuncs; + qboolean runfuncs; void (*PM_PlaySound) ( int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch ); const char *(*PM_TraceTexture) ( int ground, float *vstart, float *vend ); void (*PM_PlaybackEventFull) ( int flags, int clientindex, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ); - + pmtrace_t (*PM_PlayerTraceEx) (float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ) ); int (*PM_TestPlayerPositionEx) (float *pos, pmtrace_t *ptrace, int (*pfnIgnore)( physent_t *pe ) ); struct pmtrace_s *(*PM_TraceLineEx)( float *start, float *end, int flags, int usehulll, int (*pfnIgnore)( physent_t *pe ) ); diff --git a/rehlds/public/iregistry.h b/rehlds/public/iregistry.h index e17b5b7..a793fa2 100644 --- a/rehlds/public/iregistry.h +++ b/rehlds/public/iregistry.h @@ -30,11 +30,6 @@ public: virtual void WriteString(const char *key, const char *value) = 0; }; - -#ifdef HOOK_ENGINE -#define registry (*pregistry) -#endif // HOOK_ENGINE - extern IRegistry *registry; #endif // UTIL_REGISTRY_H diff --git a/rehlds/public/registry.cpp b/rehlds/public/registry.cpp index 5b1f4d2..e843c3a 100644 --- a/rehlds/public/registry.cpp +++ b/rehlds/public/registry.cpp @@ -34,18 +34,9 @@ private: HKEY m_hKey; }; -// Expose to launcher -#ifndef HOOK_ENGINE - static CRegistry g_Registry; IRegistry *registry = (IRegistry *)&g_Registry; -#else - -IRegistry *registry; - -#endif - //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- diff --git a/rehlds/rehlds/flight_recorder.cpp b/rehlds/rehlds/flight_recorder.cpp index 50dc8ba..9a51a07 100644 --- a/rehlds/rehlds/flight_recorder.cpp +++ b/rehlds/rehlds/flight_recorder.cpp @@ -39,13 +39,6 @@ uint16 g_FRMsg_Log; cvar_t rehlds_flrec_frame = { "rehlds_flrec_frame", "1", 0, 1.0f, NULL }; cvar_t rehlds_flrec_pvdata = { "rehlds_flrec_privdata", "1", 0, 1.0f, NULL }; -void FR_CheckInit() { -#if defined(HOOK_ENGINE) - if (!g_FlightRecorder) { - FR_Init(); - } -#endif -} void FR_Dump_f() { const char* fname = "rehlds_flightrec.bin"; @@ -70,7 +63,6 @@ void FR_Rehlds_Init() { } void FR_StartFrame(long frameCounter) { - FR_CheckInit(); g_FlightRecorder->StartMessage(g_FRMsg_Frame, true); g_FlightRecorder->WriteInt64(frameCounter); g_FlightRecorder->WriteDouble(realtime); @@ -78,14 +70,12 @@ void FR_StartFrame(long frameCounter) { } void FR_EndFrame(long frameCounter) { - FR_CheckInit(); g_FlightRecorder->StartMessage(g_FRMsg_Frame, false); g_FlightRecorder->WriteInt64(frameCounter); g_FlightRecorder->EndMessage(g_FRMsg_Frame, false); } void FR_AllocEntPrivateData(void* res, int size) { - FR_CheckInit(); g_FlightRecorder->StartMessage(g_FRMsg_AllocEntPrivateData, true); g_FlightRecorder->WriteUInt32((size_t)res); g_FlightRecorder->WriteInt32(size); @@ -93,14 +83,12 @@ void FR_AllocEntPrivateData(void* res, int size) { } void FR_FreeEntPrivateData(void* data) { - FR_CheckInit(); g_FlightRecorder->StartMessage(g_FRMsg_FreeEntPrivateData, true); g_FlightRecorder->WriteUInt32((size_t)data); g_FlightRecorder->EndMessage(g_FRMsg_FreeEntPrivateData, true); } void FR_Log(const char* prefix, const char* msg) { - FR_CheckInit(); if (g_FlightRecorder == NULL) { return; //During server initialization some messages could be written in console/log before flightrecorder is initialized } diff --git a/rehlds/hookers/engine/main_swds.cpp b/rehlds/rehlds/main.cpp similarity index 98% rename from rehlds/hookers/engine/main_swds.cpp rename to rehlds/rehlds/main.cpp index 8eb96fe..92f6aba 100644 --- a/rehlds/hookers/engine/main_swds.cpp +++ b/rehlds/rehlds/main.cpp @@ -43,8 +43,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) printf("%s: launcher is not hlds.exe, tests playing/recording disabled!\n", __func__); else TestSuite_Init(NULL, &hlds_exe, NULL); - - Rehlds_Debug_Init(NULL); #endif } @@ -52,6 +50,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { } + return TRUE; } diff --git a/rehlds/rehlds/precompiled.h b/rehlds/rehlds/precompiled.h index 182cdee..5127133 100644 --- a/rehlds/rehlds/precompiled.h +++ b/rehlds/rehlds/precompiled.h @@ -18,9 +18,6 @@ #include "memory.h" #include "strtools.h" -// Hook stuff -#include "hookers/engine/hooklist.h" - // Valve libs stuff #include "tier0/platform.h" #include "tier0/dbg.h" @@ -28,7 +25,6 @@ #include "engine.h" #include "platform.h" #include "RehldsRuntimeConfig.h" -#include "rehlds_debug.h" #include "interface.h" #include "iregistry.h" @@ -36,8 +32,6 @@ #include "utlbuffer.h" #include "utlrbtree.h" -#include "iosutil.h" - // Testsuite #include "testsuite.h" #include "funccalls.h" diff --git a/rehlds/rehlds/rehlds_api_impl.cpp b/rehlds/rehlds/rehlds_api_impl.cpp index a4235d1..79ff00d 100644 --- a/rehlds/rehlds/rehlds_api_impl.cpp +++ b/rehlds/rehlds/rehlds_api_impl.cpp @@ -25,6 +25,7 @@ * version. * */ + #include "precompiled.h" struct plugin_api_t diff --git a/rehlds/rehlds/rehlds_api_impl.h b/rehlds/rehlds/rehlds_api_impl.h index c3bf4f5..17f7d78 100644 --- a/rehlds/rehlds/rehlds_api_impl.h +++ b/rehlds/rehlds/rehlds_api_impl.h @@ -25,8 +25,11 @@ * version. * */ + #pragma once +#include + #include "archtypes.h" #include "rehlds_api.h" #include "rehlds_interfaces_impl.h"