2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-14 15:48:04 +03:00

Removed HOOK_ENGINE

This commit is contained in:
s1lent 2017-12-12 18:26:02 +07:00
parent 7d041ea357
commit fda9ee3fe2
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
87 changed files with 145 additions and 5487 deletions

View File

@ -59,7 +59,7 @@ Bugfixed version of rehlds contains an additional cvars:
## Commands
Bugfixed version of rehlds contains an additional commands:
<ul>
<li>rescount // Prints the total precached of resources count in server console
<li>rescount // Prints the total count of precached resources in the server console
<li>reslist &lt;sound | model | decal | generic | event&gt; // Separately prints the details of the precached resources for sounds, models, decals, generic and events in server console. Useful for managing resources and dealing with the goldsource precache limits.
</ul>
@ -112,7 +112,7 @@ On Linux (GCC):
* For faster building without unit tests use this:exclamation:
<pre>./gradlew --max-workers=1 -PuseGcc clean buildFixes</pre>
Also there is a task `buildEngine`, it builds only a part of the engine.<br />
Also there is a task `buildEngine`, it builds only engine, without other parts of the project.<br />
Compiled binaries will be placed in the rehlds/build/binaries/ directory
## How can I help the project?

View File

@ -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

View File

@ -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'
}
}

View File

@ -28,10 +28,6 @@
#pragma once
#ifdef HOOK_ENGINE
#define gSystemWrapper (*pgSystemWrapper)
#endif // HOOK_ENGINE
#include "ObjectList.h"
#include "TokenLine.h"
#include "BaseSystemModule.h"

View File

@ -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))

View File

@ -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) { }

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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];

View File

@ -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);

View File

@ -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];

View File

@ -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;

View File

@ -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)

View File

@ -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<char *> g_fallbackLocalizationFiles;
extern char s_pBaseDir[512];
extern bool bLowViolenceBuild;

View File

@ -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);

View File

@ -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;
}

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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
}

View File

@ -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);

View File

@ -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);

View File

@ -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) ? \
( \

View File

@ -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();

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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
}

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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, ...);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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]);
}

View File

@ -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;

View File

@ -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, ...)

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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];

View File

@ -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)

View File

@ -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;

View File

@ -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<InitFunc *> 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);

View File

@ -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) { }

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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)

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
#pragma once
#include "hookers/memory.h"
#include "hookers/helper.h"
#include "hookers/hooker.h"

View File

@ -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<IBaseFileSystem *>(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

View File

@ -8,7 +8,7 @@
#include <array>
#include <utility>
#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)

View File

@ -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) {

View File

@ -1,21 +0,0 @@
#pragma once
#include <ios>
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;
};

View File

@ -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<const uint32*>(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<const uint32*>(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);
}

View File

@ -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

View File

@ -5,18 +5,6 @@
<Configuration>Debug Play</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Record|Win32">
<Configuration>Debug Record</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Swds Play|Win32">
<Configuration>Debug Swds Play</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Swds|Win32">
<Configuration>Debug Swds</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
@ -25,14 +13,6 @@
<Configuration>Release Play</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Swds Play|Win32">
<Configuration>Release Swds Play</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Swds|Win32">
<Configuration>Release Swds</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@ -109,68 +89,29 @@
<ClCompile Include="..\engine\wad.cpp" />
<ClCompile Include="..\engine\world.cpp" />
<ClCompile Include="..\engine\zone.cpp" />
<ClCompile Include="..\hookers\engine\hooklist.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\hookers\engine\main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\hookers\engine\main_swds.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\hookers\memory.cpp" />
<ClCompile Include="..\hookers\rehlds_debug.cpp" />
<ClCompile Include="..\public\interface.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\public\registry.cpp" />
<ClCompile Include="..\public\rehlds\crc32c.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\public\rehlds\sys_shared.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</ClCompile>
@ -179,29 +120,20 @@
<ClCompile Include="..\public\utlbuffer.cpp" />
<ClCompile Include="..\rehlds\FlightRecorderImpl.cpp" />
<ClCompile Include="..\rehlds\flight_recorder.cpp" />
<ClCompile Include="..\rehlds\main.cpp" />
<ClCompile Include="..\rehlds\rehlds_api_impl.cpp" />
<ClCompile Include="..\rehlds\rehlds_interfaces_impl.cpp" />
<ClCompile Include="..\rehlds\hookchains_impl.cpp" />
<ClCompile Include="..\rehlds\platform.cpp" />
<ClCompile Include="..\rehlds\precompiled.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">precompiled.h</PrecompiledHeaderFile>
@ -217,106 +149,61 @@
<ClCompile Include="..\testsuite\testsuite.cpp" />
<ClCompile Include="..\unittests\common_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\crc32c_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\delta_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\info_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\mathlib_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\rehlds_tests_shared.cpp" />
<ClCompile Include="..\unittests\security_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\struct_offsets_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\TestRunner.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\tmessage_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\unittests\unicode_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -473,9 +360,7 @@
<ClInclude Include="..\engine\wad.h" />
<ClInclude Include="..\engine\world.h" />
<ClInclude Include="..\engine\zone.h" />
<ClInclude Include="..\hookers\engine\hooklist.h" />
<ClInclude Include="..\hookers\memory.h" />
<ClInclude Include="..\hookers\rehlds_debug.h" />
<ClInclude Include="..\public\basetypes.h" />
<ClInclude Include="..\public\commonmacros.h" />
<ClInclude Include="..\public\engine_hlds_api.h" />
@ -483,7 +368,6 @@
<ClInclude Include="..\public\FileSystem.h" />
<ClInclude Include="..\public\idedicatedexports.h" />
<ClInclude Include="..\public\interface.h" />
<ClInclude Include="..\public\iosutil.h" />
<ClInclude Include="..\public\iregistry.h" />
<ClInclude Include="..\public\rehlds\archtypes.h" />
<ClInclude Include="..\public\rehlds\bspfile.h" />
@ -567,19 +451,13 @@
<ItemGroup>
<None Include="..\linux\appversion.sh">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</None>
<None Include="..\linux\Makefile">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">true</ExcludedFromBuild>
</None>
@ -605,14 +483,6 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
@ -621,22 +491,6 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
@ -653,15 +507,6 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -671,16 +516,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
@ -692,112 +528,44 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">
<TargetName>swds</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">
<TargetName>swds</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test Fixes|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">
<TargetName>filesystem_stdio</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">
<TargetName>swds</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>swds</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>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)</PreprocessorDefinitions>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion />
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>
</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)")</Command>
<Message>Automatic deployment script</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>echo Empty Action</Command>
<Message>Force build to run Pre-Build event</Message>
<Outputs>build.always.run</Outputs>
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
@ -835,42 +603,6 @@
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion />
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)")</Command>
<Message>Automatic deployment script</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>echo Empty Action</Command>
<Message>Force build to run Pre-Build event</Message>
<Outputs>build.always.run</Outputs>
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Swds Play|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
@ -909,42 +641,6 @@
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Record|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>REHLDS_SELF;HOOK_ENGINE;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion />
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)")</Command>
<Message>Automatic deployment script</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>echo Empty Action</Command>
<Message>Force build to run Pre-Build event</Message>
<Outputs>build.always.run</Outputs>
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
@ -1016,86 +712,7 @@
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>REHLDS_API;REHLDS_OPT_PEDANTIC;REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;HAVE_OPT_STRTOOLS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion />
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)")</Command>
<Message>Automatic deployment script</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>echo Empty Action</Command>
<Message>Force build to run Pre-Build event</Message>
<Outputs>build.always.run</Outputs>
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\metamod\include\;$(ProjectDir)\..\public\rehlds\;$(ProjectDir)\..\common;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\rehlds\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion>
</MinimumRequiredVersion>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)")</Command>
<Message>Automatic deployment script</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>echo Empty Action</Command>
<Message>Force build to run Pre-Build event</Message>
<Outputs>build.always.run</Outputs>
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds Play|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>
@ -1139,7 +756,7 @@
<Inputs>build.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Swds|Win32'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
<Message>Setup version from Git revision</Message>

View File

@ -5,9 +5,6 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="hookers">
<UniqueIdentifier>{7be88557-a49b-4c62-8df3-d7134a578201}</UniqueIdentifier>
</Filter>
<Filter Include="engine">
<UniqueIdentifier>{eeaac718-712b-453f-9d34-4cefc9e0fe59}</UniqueIdentifier>
</Filter>
@ -326,21 +323,6 @@
<ClCompile Include="..\engine\md5.cpp">
<Filter>engine\common</Filter>
</ClCompile>
<ClCompile Include="..\hookers\engine\hooklist.cpp">
<Filter>hookers</Filter>
</ClCompile>
<ClCompile Include="..\hookers\engine\main.cpp">
<Filter>hookers</Filter>
</ClCompile>
<ClCompile Include="..\hookers\engine\main_swds.cpp">
<Filter>hookers</Filter>
</ClCompile>
<ClCompile Include="..\hookers\memory.cpp">
<Filter>hookers</Filter>
</ClCompile>
<ClCompile Include="..\hookers\rehlds_debug.cpp">
<Filter>hookers</Filter>
</ClCompile>
<ClCompile Include="..\common\BaseSystemModule.cpp">
<Filter>common</Filter>
</ClCompile>
@ -356,6 +338,12 @@
<ClCompile Include="..\engine\mathlib_sse.cpp">
<Filter>engine</Filter>
</ClCompile>
<ClCompile Include="..\rehlds\main.cpp">
<Filter>rehlds</Filter>
</ClCompile>
<ClCompile Include="..\hookers\memory.cpp">
<Filter>rehlds</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\version\version.h">
@ -1063,30 +1051,21 @@
<ClInclude Include="..\public\rehlds\studio.h">
<Filter>public\rehlds</Filter>
</ClInclude>
<ClInclude Include="..\hookers\engine\hooklist.h">
<Filter>hookers</Filter>
</ClInclude>
<ClInclude Include="..\rehlds\engine.h">
<Filter>rehlds</Filter>
</ClInclude>
<ClInclude Include="..\hookers\memory.h">
<Filter>hookers</Filter>
</ClInclude>
<ClInclude Include="..\hookers\rehlds_debug.h">
<Filter>hookers</Filter>
</ClInclude>
<ClInclude Include="..\engine\SystemWrapper.h">
<Filter>engine\common</Filter>
</ClInclude>
<ClInclude Include="..\public\iosutil.h">
<Filter>hookers</Filter>
</ClInclude>
<ClInclude Include="..\public\strtools.h">
<Filter>public</Filter>
</ClInclude>
<ClInclude Include="..\engine\mathlib_sse.h">
<Filter>engine</Filter>
</ClInclude>
<ClInclude Include="..\hookers\memory.h">
<Filter>rehlds</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\linux\appversion.sh">

View File

@ -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 ) );

View File

@ -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

View File

@ -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:
//-----------------------------------------------------------------------------

View File

@ -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
}

View File

@ -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;
}

View File

@ -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"

View File

@ -25,6 +25,7 @@
* version.
*
*/
#include "precompiled.h"
struct plugin_api_t

View File

@ -25,8 +25,11 @@
* version.
*
*/
#pragma once
#include <vector>
#include "archtypes.h"
#include "rehlds_api.h"
#include "rehlds_interfaces_impl.h"