Final: fully reversed functions CZ

This commit is contained in:
s1lentq 2016-01-25 23:02:57 +06:00
parent e80480a400
commit a8cc9cc76f
76 changed files with 5199 additions and 1895 deletions

View File

@ -12,7 +12,6 @@ At the moment, the work of reverse engineering continues
</ul> </ul>
## How can use it? ## How can use it?
At the moment there is a workable CS 1.6
Regamedll_CS is fully compatible with official mod CS 1.6 by Valve. All you have to do is to download binaries and replace original mo.dll/cs.so Regamedll_CS is fully compatible with official mod CS 1.6 by Valve. All you have to do is to download binaries and replace original mo.dll/cs.so
Compiled binaries are available here: http://nexus.rehlds.org/nexus/content/repositories/regamedll-snapshots/regamedll/regamedll/0.2-SNAPSHOT/ Compiled binaries are available here: http://nexus.rehlds.org/nexus/content/repositories/regamedll-snapshots/regamedll/regamedll/0.2-SNAPSHOT/
@ -28,7 +27,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
## Current status ## Current status
<ul> <ul>
<li> Counter-Strike 1.6 - 100%</li> <li> Counter-Strike 1.6 - 100%</li>
<li> Counter-Strike: Condition Zero - 90%</li> <li> Counter-Strike: Condition Zero - 100%</li>
</ul> </ul>
## Build instructions ## Build instructions

View File

@ -13,6 +13,10 @@
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release MP|Win32">
<Configuration>Release MP</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -36,6 +40,12 @@
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
@ -58,6 +68,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|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 MP Play|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -96,6 +109,21 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\include\</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderFile>bzlib_private.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
@ -143,6 +171,7 @@
<ClCompile Include="..\src\precompiled.c"> <ClCompile Include="..\src\precompiled.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>

View File

@ -13,6 +13,10 @@
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release MP|Win32">
<Configuration>Release MP</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -52,6 +56,12 @@
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
@ -80,6 +90,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|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 MP Play|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -120,6 +133,22 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)..\include\</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>

View File

@ -27,6 +27,7 @@ Global
Debug MP|Win32 = Debug MP|Win32 Debug MP|Win32 = Debug MP|Win32
Debug Play|Win32 = Debug Play|Win32 Debug Play|Win32 = Debug Play|Win32
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
Release MP|Win32 = Release MP|Win32
Release Play|Win32 = Release Play|Win32 Release Play|Win32 = Release Play|Win32
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
Tests|Win32 = Tests|Win32 Tests|Win32 = Tests|Win32
@ -40,6 +41,8 @@ Global
{70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Play|Win32.Build.0 = Debug Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Play|Win32.Build.0 = Debug Play|Win32
{70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug|Win32.ActiveCfg = Debug|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}.Debug|Win32.Build.0 = Debug|Win32
{70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release MP|Win32.ActiveCfg = Release MP|Win32
{70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release MP|Win32.Build.0 = Release MP|Win32
{70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Play|Win32.ActiveCfg = Release Play|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 Play|Win32.Build.0 = Release Play|Win32
{70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release|Win32.ActiveCfg = Release|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release|Win32.ActiveCfg = Release|Win32
@ -54,6 +57,8 @@ Global
{CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Play|Win32.Build.0 = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Play|Win32.Build.0 = Debug|Win32
{CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug|Win32.ActiveCfg = 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}.Debug|Win32.Build.0 = Debug|Win32
{CEB94F7C-E459-4673-AABB-36E2074396C0}.Release MP|Win32.ActiveCfg = Release MP|Win32
{CEB94F7C-E459-4673-AABB-36E2074396C0}.Release MP|Win32.Build.0 = Release MP|Win32
{CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Play|Win32.ActiveCfg = Release|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 Play|Win32.Build.0 = Release|Win32
{CEB94F7C-E459-4673-AABB-36E2074396C0}.Release|Win32.ActiveCfg = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release|Win32.ActiveCfg = Release|Win32
@ -68,6 +73,8 @@ Global
{792DF067-9904-4579-99B9-46C17277ADE3}.Debug Play|Win32.Build.0 = Debug|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Debug Play|Win32.Build.0 = Debug|Win32
{792DF067-9904-4579-99B9-46C17277ADE3}.Debug|Win32.ActiveCfg = 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}.Debug|Win32.Build.0 = Debug|Win32
{792DF067-9904-4579-99B9-46C17277ADE3}.Release MP|Win32.ActiveCfg = Release MP|Win32
{792DF067-9904-4579-99B9-46C17277ADE3}.Release MP|Win32.Build.0 = Release MP|Win32
{792DF067-9904-4579-99B9-46C17277ADE3}.Release Play|Win32.ActiveCfg = Release|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 Play|Win32.Build.0 = Release|Win32
{792DF067-9904-4579-99B9-46C17277ADE3}.Release|Win32.ActiveCfg = Release|Win32 {792DF067-9904-4579-99B9-46C17277ADE3}.Release|Win32.ActiveCfg = Release|Win32

View File

@ -185,7 +185,7 @@ void setupToolchain(NativeBinarySpec b)
if (!unitTestExecutable) if (!unitTestExecutable)
{ {
cfg.singleDefines 'CSTRIKE' //cfg.singleDefines 'CSTRIKE'
if (!mpLib) if (!mpLib)
{ {

View File

@ -239,7 +239,7 @@ void CBaseAnimating::SetSequenceBox(void)
Vector rmax(-9999, -9999, -9999); Vector rmax(-9999, -9999, -9999);
Vector base, transformed; Vector base, transformed;
for (int i = 0; i <= 1; i++) for (int i = 0; i <= 1; ++i)
{ {
base.x = bounds[i].x; base.x = bounds[i].x;
for (int j = 0; j <= 1; j++) for (int j = 0; j <= 1; j++)

View File

@ -72,7 +72,7 @@ int LookupActivity(void *pmodel, entvars_t *pev, int activity)
pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex); pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex);
for (i = 0; i < pstudiohdr->numseq; i++) for (i = 0; i < pstudiohdr->numseq; ++i)
{ {
if (pseqdesc[i].activity == activity) if (pseqdesc[i].activity == activity)
{ {
@ -87,7 +87,7 @@ int LookupActivity(void *pmodel, entvars_t *pev, int activity)
{ {
int which = RANDOM_LONG(0, weightTotal - 1); int which = RANDOM_LONG(0, weightTotal - 1);
for (i = 0; i < pstudiohdr->numseq; i++) for (i = 0; i < pstudiohdr->numseq; ++i)
{ {
if (pseqdesc[i].activity == activity) if (pseqdesc[i].activity == activity)
{ {
@ -104,7 +104,7 @@ int LookupActivity(void *pmodel, entvars_t *pev, int activity)
{ {
select = RANDOM_LONG(0, activitySequenceCount - 1); select = RANDOM_LONG(0, activitySequenceCount - 1);
for (i = 0; i < pstudiohdr->numseq; i++) for (i = 0; i < pstudiohdr->numseq; ++i)
{ {
if (pseqdesc[i].activity == activity) if (pseqdesc[i].activity == activity)
{ {
@ -136,7 +136,7 @@ int LookupActivityHeaviest(void *pmodel, entvars_t *pev, int activity)
int weight = 0; int weight = 0;
int seq = ACT_INVALID; int seq = ACT_INVALID;
for (int i = 0; i < pstudiohdr->numseq; i++) for (int i = 0; i < pstudiohdr->numseq; ++i)
{ {
if (pseqdesc[i].activity == activity) if (pseqdesc[i].activity == activity)
{ {
@ -181,7 +181,7 @@ int LookupSequence(void *pmodel, const char *label)
// Look up by sequence name. // Look up by sequence name.
mstudioseqdesc_t *pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex); mstudioseqdesc_t *pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex);
for (int i = 0; i < pstudiohdr->numseq; i++) for (int i = 0; i < pstudiohdr->numseq; ++i)
{ {
if (!Q_stricmp(pseqdesc[i].label, label)) if (!Q_stricmp(pseqdesc[i].label, label))
return i; return i;
@ -218,7 +218,7 @@ NOXREF void SequencePrecache(void *pmodel, const char *pSequenceName)
mstudioseqdesc_t *pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + index; mstudioseqdesc_t *pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + index;
mstudioevent_t *pevent = (mstudioevent_t *)((byte *)pstudiohdr + pseqdesc->eventindex); mstudioevent_t *pevent = (mstudioevent_t *)((byte *)pstudiohdr + pseqdesc->eventindex);
for (int i = 0; i < pseqdesc->numevents; i++) for (int i = 0; i < pseqdesc->numevents; ++i)
{ {
// Don't send client-side events to the server AI // Don't send client-side events to the server AI
if (pevent[i].event >= EVENT_CLIENT) if (pevent[i].event >= EVENT_CLIENT)
@ -486,7 +486,7 @@ int FindTransition(void *pmodel, int iEndingAnim, int iGoalAnim, int *piDir)
} }
// look for someone going // look for someone going
for (int i = 0; i < pstudiohdr->numseq; i++) for (int i = 0; i < pstudiohdr->numseq; ++i)
{ {
if (pseqdesc[i].entrynode == iEndNode && pseqdesc[i].exitnode == iInternNode) if (pseqdesc[i].entrynode == iEndNode && pseqdesc[i].exitnode == iInternNode)
{ {
@ -645,7 +645,7 @@ void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt)
float_precision a = 0; float_precision a = 0;
float_precision b = 0; float_precision b = 0;
for (i = 0; i < 4; i++) for (i = 0; i < 4; ++i)
{ {
a += (p[i] - q[i]) * (p[i] - q[i]); a += (p[i] - q[i]) * (p[i] - q[i]);
b += (p[i] + q[i]) * (p[i] + q[i]); b += (p[i] + q[i]) * (p[i] + q[i]);
@ -653,7 +653,7 @@ void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt)
if (a > b) if (a > b)
{ {
for (i = 0; i < 4; i++) for (i = 0; i < 4; ++i)
q[i] = -q[i]; q[i] = -q[i];
} }
@ -677,7 +677,7 @@ void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt)
sclp = 1.0 - t; sclp = 1.0 - t;
} }
for (i = 0; i < 4; i++) for (i = 0; i < 4; ++i)
qt[i] = sclp * p[i] + sclq * q[i]; qt[i] = sclp * p[i] + sclq * q[i];
} }
else else
@ -690,7 +690,7 @@ void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt)
sclp = sin((1.0 - t) * 0.5 * M_PI); sclp = sin((1.0 - t) * 0.5 * M_PI);
sclq = sin(t * 0.5 * M_PI); sclq = sin(t * 0.5 * M_PI);
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
qt[i] = sclp * p[i] + sclq * qt[i]; qt[i] = sclp * p[i] + sclq * qt[i];
} }
} }
@ -968,7 +968,7 @@ void StudioSlerpBones(vec4_t *q1, float pos1[][3], vec4_t *q2, float pos2[][3],
s1 = 1.0 - s; s1 = 1.0 - s;
for (i = 0; i < g_pstudiohdr->numbones; i++) for (i = 0; i < g_pstudiohdr->numbones; ++i)
{ {
QuaternionSlerp(q1[i], q2[i], s, q3); QuaternionSlerp(q1[i], q2[i], s, q3);
@ -1060,7 +1060,7 @@ void SV_StudioSetupBones(model_t *pModel, float frame, int sequence, const vec_t
{ {
chainlength = g_pstudiohdr->numbones; chainlength = g_pstudiohdr->numbones;
for (i = 0; i < chainlength; i++) for (i = 0; i < chainlength; ++i)
chain[(chainlength - i) - 1] = i; chain[(chainlength - i) - 1] = i;
} }
else else
@ -1203,7 +1203,7 @@ void SV_StudioSetupBones(model_t *pModel, float frame, int sequence, const vec_t
panim = StudioGetAnim(pModel, pseqdesc); panim = StudioGetAnim(pModel, pseqdesc);
StudioCalcRotations(pbones, chain, chainlength, adj, pos2, q2, pseqdesc, panim, 0, 0); StudioCalcRotations(pbones, chain, chainlength, adj, pos2, q2, pseqdesc, panim, 0, 0);
for (i = 0; i < g_pstudiohdr->numbones; i++) for (i = 0; i < g_pstudiohdr->numbones; ++i)
{ {
if (!Q_strcmp(pbones[i].name, "Bip01 Spine")) if (!Q_strcmp(pbones[i].name, "Bip01 Spine"))
{ {

View File

@ -675,7 +675,7 @@ CBasePlayer *CCSBot::GetImportantEnemy(bool checkVisibility) const
CBasePlayer *nearEnemy = NULL; CBasePlayer *nearEnemy = NULL;
float nearDist = 999999999.9f; float nearDist = 999999999.9f;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *entity = UTIL_PlayerByIndex(i); CBaseEntity *entity = UTIL_PlayerByIndex(i);

View File

@ -39,6 +39,9 @@
#define CSBOT_VERSION_MAJOR 1 #define CSBOT_VERSION_MAJOR 1
#define CSBOT_VERSION_MINOR 50 #define CSBOT_VERSION_MINOR 50
#define PRIMARY_WEAPON_BUY_COUNT 13
#define SECONDARY_WEAPON_BUY_COUNT 3
#define FLAG_PROGRESS_DRAW 0x0 // draw status bar progress #define FLAG_PROGRESS_DRAW 0x0 // draw status bar progress
#define FLAG_PROGRESS_START 0x1 // init status bar progress #define FLAG_PROGRESS_START 0x1 // init status bar progress
#define FLAG_PROGRESS_HIDE 0x2 // hide status bar progress #define FLAG_PROGRESS_HIDE 0x2 // hide status bar progress
@ -55,11 +58,23 @@
#define _navAreaCount (*pnavAreaCount) #define _navAreaCount (*pnavAreaCount)
#define _currentIndex (*pcurrentIndex) #define _currentIndex (*pcurrentIndex)
#define primaryWeaponBuyInfoCT (*pprimaryWeaponBuyInfoCT)
#define secondaryWeaponBuyInfoCT (*psecondaryWeaponBuyInfoCT)
#define primaryWeaponBuyInfoT (*pprimaryWeaponBuyInfoT)
#define secondaryWeaponBuyInfoT (*psecondaryWeaponBuyInfoT)
#endif // HOOK_GAMEDLL #endif // HOOK_GAMEDLL
extern int _navAreaCount; extern int _navAreaCount;
extern int _currentIndex; extern int _currentIndex;
extern struct BuyInfo primaryWeaponBuyInfoCT[ PRIMARY_WEAPON_BUY_COUNT ];
extern struct BuyInfo secondaryWeaponBuyInfoCT[ SECONDARY_WEAPON_BUY_COUNT ];
extern struct BuyInfo primaryWeaponBuyInfoT[ PRIMARY_WEAPON_BUY_COUNT ];
extern struct BuyInfo secondaryWeaponBuyInfoT[ SECONDARY_WEAPON_BUY_COUNT ];
class CCSBot; class CCSBot;
class BotChatterInterface; class BotChatterInterface;
@ -78,8 +93,8 @@ public:
class IdleState: public BotState class IdleState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
virtual const char *GetName(void) const { return "Idle"; } virtual const char *GetName(void) const { return "Idle"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -95,9 +110,9 @@ public:
class HuntState: public BotState class HuntState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "Hunt"; } virtual const char *GetName(void) const { return "Hunt"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -118,9 +133,9 @@ private:
class AttackState: public BotState class AttackState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "Attack"; } virtual const char *GetName(void) const { return "Attack"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -166,9 +181,9 @@ protected:
class InvestigateNoiseState: public BotState class InvestigateNoiseState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "InvestigateNoise"; } virtual const char *GetName(void) const { return "InvestigateNoise"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -180,7 +195,7 @@ public:
#endif // HOOK_GAMEDLL #endif // HOOK_GAMEDLL
private: private:
NOBODY void AttendCurrentNoise(CCSBot *me); void AttendCurrentNoise(CCSBot *me);
Vector m_checkNoisePosition; Vector m_checkNoisePosition;
};/* size: 16, cachelines: 1, members: 2 */ };/* size: 16, cachelines: 1, members: 2 */
@ -189,9 +204,9 @@ private:
class BuyState: public BotState class BuyState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "Buy"; } virtual const char *GetName(void) const { return "Buy"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -219,9 +234,9 @@ private:
class MoveToState: public BotState class MoveToState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "MoveTo"; } virtual const char *GetName(void) const { return "MoveTo"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -283,9 +298,9 @@ public:
class DefuseBombState: public BotState class DefuseBombState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "DefuseBomb"; } virtual const char *GetName(void) const { return "DefuseBomb"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -302,9 +317,9 @@ public:
class HideState: public BotState class HideState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "Hide"; } virtual const char *GetName(void) const { return "Hide"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -348,9 +363,9 @@ private:
class EscapeFromBombState: public BotState class EscapeFromBombState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "EscapeFromBomb"; } virtual const char *GetName(void) const { return "EscapeFromBomb"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -367,9 +382,9 @@ public:
class FollowState: public BotState class FollowState: public BotState
{ {
public: public:
NOBODY virtual void OnEnter(CCSBot *me); virtual void OnEnter(CCSBot *me);
NOBODY virtual void OnUpdate(CCSBot *me); virtual void OnUpdate(CCSBot *me);
NOBODY virtual void OnExit(CCSBot *me); virtual void OnExit(CCSBot *me);
virtual const char *GetName(void) const { return "Follow"; } virtual const char *GetName(void) const { return "Follow"; }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
@ -383,7 +398,7 @@ public:
void SetLeader(CBaseEntity *leader) { m_leader = leader; } void SetLeader(CBaseEntity *leader) { m_leader = leader; }
private: private:
NOBODY void ComputeLeaderMotionState(float leaderSpeed); void ComputeLeaderMotionState(float leaderSpeed);
EHANDLE m_leader; EHANDLE m_leader;
Vector m_lastLeaderPos; Vector m_lastLeaderPos;
@ -456,12 +471,12 @@ public:
virtual void SpawnBot(void); // (EXTEND) spawn the bot into the game virtual void SpawnBot(void); // (EXTEND) spawn the bot into the game
virtual void Upkeep(void); // lightweight maintenance, invoked frequently virtual void Upkeep(void); // lightweight maintenance, invoked frequently
NOBODY virtual void Update(void); // heavyweight algorithms, invoked less often virtual void Update(void); // heavyweight algorithms, invoked less often
virtual void Walk(void); virtual void Walk(void);
virtual bool Jump(bool mustJump = false); // returns true if jump was started virtual bool Jump(bool mustJump = false); // returns true if jump was started
NOBODY virtual void OnEvent(GameEventType event, CBaseEntity *entity = NULL, CBaseEntity *other = NULL); // invoked when event occurs in the game (some events have NULL entity) virtual void OnEvent(GameEventType event, CBaseEntity *entity = NULL, CBaseEntity *other = NULL); // invoked when event occurs in the game (some events have NULL entity)
#define CHECK_FOV true #define CHECK_FOV true
virtual bool IsVisible(const Vector *pos, bool testFOV = false) const; // return true if we can see the point virtual bool IsVisible(const Vector *pos, bool testFOV = false) const; // return true if we can see the point
@ -642,7 +657,7 @@ public:
// listening for noises // listening for noises
bool IsNoiseHeard(void) const; // return true if we have heard a noise bool IsNoiseHeard(void) const; // return true if we have heard a noise
bool ShouldInvestigateNoise(float *retNoiseDist); bool ShouldInvestigateNoise(float *retNoiseDist = NULL);
void InvestigateNoise(void); // investigate recent enemy noise void InvestigateNoise(void); // investigate recent enemy noise
const Vector *GetNoisePosition(void) const; // return position of last heard noise, or NULL if none heard const Vector *GetNoisePosition(void) const; // return position of last heard noise, or NULL if none heard
CNavArea *GetNoiseArea(void) const; // return area where noise was heard CNavArea *GetNoiseArea(void) const; // return area where noise was heard
@ -1117,6 +1132,8 @@ private:
GameEventType m_lastRadioCommand; // last radio command we recieved GameEventType m_lastRadioCommand; // last radio command we recieved
void RespondToRadioCommands(void); void RespondToRadioCommands(void);
bool IsRadioCommand(GameEventType event) const; // returns true if the radio message is an order to do something bool IsRadioCommand(GameEventType event) const; // returns true if the radio message is an order to do something
#define NO_FORCE false
void EndVoiceFeedback(bool force = true); void EndVoiceFeedback(bool force = true);
float m_lastRadioRecievedTimestamp; // time we recieved a radio message float m_lastRadioRecievedTimestamp; // time we recieved a radio message
float m_lastRadioSentTimestamp; // time when we send a radio message float m_lastRadioSentTimestamp; // time when we send a radio message
@ -1275,8 +1292,7 @@ inline const CSGameState *CCSBot::GetGameState(void) const
/* <5c4ce8> ../cstrike/dlls/bot/cs_bot.h:397 */ /* <5c4ce8> ../cstrike/dlls/bot/cs_bot.h:397 */
inline bool CCSBot::IsAtBombsite(void) inline bool CCSBot::IsAtBombsite(void)
{ {
UNTESTED return (m_signals.GetState() & SIGNAL_BOMB) == SIGNAL_BOMB;
return GetGameState()->IsAtPlantedBombsite();
} }
/* <5a07c3> ../cstrike/dlls/bot/cs_bot.h:453 */ /* <5a07c3> ../cstrike/dlls/bot/cs_bot.h:453 */
@ -1344,8 +1360,7 @@ inline BotChatterInterface *CCSBot::GetChatter(void)
/* <111238> ../cstrike/dlls/bot/cs_bot.h:508 */ /* <111238> ../cstrike/dlls/bot/cs_bot.h:508 */
inline bool CCSBot::IsUsingVoice(void) const inline bool CCSBot::IsUsingVoice(void) const
{ {
UNTESTED return (m_voiceFeedbackEndTimestamp != 0.0f);
return (m_voiceFeedbackEndTimestamp != 0.0f); //return (m_voiceFeedbackEndTimestamp > gpGlobals->time);
} }
/* <519493> ../cstrike/dlls/bot/cs_bot.h:513 */ /* <519493> ../cstrike/dlls/bot/cs_bot.h:513 */
@ -1927,32 +1942,27 @@ public:
FollowTargetCollector(CBasePlayer *player) FollowTargetCollector(CBasePlayer *player)
{ {
m_player = player; m_player = player;
m_forward.x = player->pev->velocity.x;
Vector playerVel = player->pev->velocity; m_forward.y = player->pev->velocity.y;
m_forward.x = playerVel.x;
m_forward.y = playerVel.y;
float speed = m_forward.NormalizeInPlace(); float speed = m_forward.NormalizeInPlace();
Vector playerOrigin = player->pev->origin;
const float walkSpeed = 100.0f; const float walkSpeed = 100.0f;
if (speed < walkSpeed) if (speed < walkSpeed)
{ {
m_cutoff.x = playerOrigin.x; m_cutoff.x = player->pev->origin.x;
m_cutoff.y = playerOrigin.y; m_cutoff.y = player->pev->origin.y;
m_forward.x = 0.0f; m_forward.x = 0.0f;
m_forward.y = 0.0f; m_forward.y = 0.0f;
} }
else else
{ {
const float k = 1.5f; // 2.0f; const float k = 1.5f;
float trimSpeed = (speed < 200.0f) ? speed : 200.0f; float_precision trimSpeed = (speed < 200.0f) ? speed : 200.0f;
m_cutoff.x = playerOrigin.x + k * trimSpeed * m_forward.x; m_cutoff.x = player->pev->origin.x + k * trimSpeed * m_forward.x;
m_cutoff.y = playerOrigin.y + k * trimSpeed * m_forward.y; m_cutoff.y = player->pev->origin.y + k * trimSpeed * m_forward.y;
} }
m_targetAreaCount = 0; m_targetAreaCount = 0;
@ -2008,11 +2018,20 @@ typedef void (CCSBot::*HIDE_VECTOR)(const Vector *, float, bool);
typedef const CSGameState *(CCSBot::*GETGAMESTATE_CONST)(void) const; typedef const CSGameState *(CCSBot::*GETGAMESTATE_CONST)(void) const;
typedef CSGameState *(CCSBot::*GETGAMESTATE_NOTCONST)(void); typedef CSGameState *(CCSBot::*GETGAMESTATE_NOTCONST)(void);
bool NavAreaBuildPath__PathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, PathCost &costFunc, CNavArea **closestArea = NULL); // NavAreaBuildPath<PathCost> hook
// refs inline bool NavAreaBuildPath__PathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, PathCost &costFunc, CNavArea **closestArea)
{
return NavAreaBuildPath(startArea, goalArea, goalPos, costFunc, closestArea);
}
// NavAreaTravelDistance<PathCost> hook
inline float_precision NavAreaTravelDistance__PathCost__wrapper(CNavArea *startArea, CNavArea *endArea, PathCost &costFunc)
{
return NavAreaTravelDistance(startArea, endArea, costFunc);
}
// refs
extern void (*pCCSBot__UpdateLookAngles)(void); extern void (*pCCSBot__UpdateLookAngles)(void);
extern void (*pCCSBot__Update)(void);
#endif // HOOK_GAMEDLL #endif // HOOK_GAMEDLL

View File

@ -19,8 +19,6 @@ CBaseEntity *g_pSelectedZombieSpawn;
CountdownTimer IMPL_CLASS(BotChatterInterface, m_encourageTimer); CountdownTimer IMPL_CLASS(BotChatterInterface, m_encourageTimer);
IntervalTimer IMPL_CLASS(BotChatterInterface, m_radioSilenceInterval)[ 2 ]; IntervalTimer IMPL_CLASS(BotChatterInterface, m_radioSilenceInterval)[ 2 ];
void (*pBotPhrase__Randomize)(void);
#endif // HOOK_GAMEDLL #endif // HOOK_GAMEDLL
/* <303469> ../cstrike/dlls/bot/cs_bot_chatter.cpp:32 */ /* <303469> ../cstrike/dlls/bot/cs_bot_chatter.cpp:32 */
@ -388,20 +386,10 @@ char *BotPhrase::GetSpeakable(int bankIndex, float *duration) const
// Randomly shuffle the speakable order // Randomly shuffle the speakable order
/* <30395a> ../cstrike/dlls/bot/cs_bot_chatter.cpp:395 */ /* <30395a> ../cstrike/dlls/bot/cs_bot_chatter.cpp:395 */
#ifdef HOOK_GAMEDLL #ifndef HOOK_GAMEDLL
void __declspec(naked) BotPhrase::Randomize(void)
{
// you can not hook this function, because it uses the rand() function
// which does not allow us to carry out tests because different results at the output.
__asm
{
jmp pBotPhrase__Randomize
}
}
#else
void BotPhrase::Randomize(void) void BotPhrase::Randomize(void)
{ {
for (uint32 i = 0; i < m_voiceBank.size(); i++) for (uint32 i = 0; i < m_voiceBank.size(); ++i)
{ {
std::random_shuffle(m_voiceBank[i]->begin(), m_voiceBank[i]->end()); std::random_shuffle(m_voiceBank[i]->begin(), m_voiceBank[i]->end());
} }
@ -1617,7 +1605,6 @@ void BotChatterInterface::Update(void)
if (say->IsRedundant(friendSay)) if (say->IsRedundant(friendSay))
{ {
// thie statement is redundant - destroy it // thie statement is redundant - destroy it
//m_me->PrintIfWatched("Teammate said what I was going to say - shutting up.\n");
m_me->PrintIfWatched("Teammate said what I was going to say - shutting up.\n"); m_me->PrintIfWatched("Teammate said what I was going to say - shutting up.\n");
RemoveStatement(say); RemoveStatement(say);
} }
@ -2415,6 +2402,14 @@ void BotChatterInterface::FriendlyFire(void)
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
void (*pBotPhrase__Randomize)(void);
void __declspec(naked) BotPhrase::Randomize(void)
{
// you can not hook this function, because it uses the rand() function
// which does not allow us to carry out tests because different results at the output.
__asm { jmp pBotPhrase__Randomize }
}
void BotAllHostagesGoneMeme::Interpret(CCSBot *sender, CCSBot *receiver) const void BotAllHostagesGoneMeme::Interpret(CCSBot *sender, CCSBot *receiver) const
{ {
Interpret_(sender, receiver); Interpret_(sender, receiver);

View File

@ -381,7 +381,7 @@ private:
/* <2fea95> ../cstrike/dlls/bot/cs_bot_chatter.h:298 */ /* <2fea95> ../cstrike/dlls/bot/cs_bot_chatter.h:298 */
inline int BotPhraseManager::FindPlaceIndex(Place where) const inline int BotPhraseManager::FindPlaceIndex(Place where) const
{ {
for (int i = 0; i < m_placeCount; i++) for (int i = 0; i < m_placeCount; ++i)
{ {
if (m_placeStatementHistory[i].placeID == where) if (m_placeStatementHistory[i].placeID == where)
return i; return i;
@ -596,8 +596,9 @@ public:
NOXREF void GuardingLooseBomb(CBaseEntity *bomb); NOXREF void GuardingLooseBomb(CBaseEntity *bomb);
void RequestBombLocation(void); void RequestBombLocation(void);
void GuardingHostages(Place place, bool isPlan); #define IS_PLAN true
void GuardingHostageEscapeZone(bool isPlan); void GuardingHostages(Place place, bool isPlan = false);
void GuardingHostageEscapeZone(bool isPlan = false);
void HostagesBeingTaken(void); void HostagesBeingTaken(void);
void HostagesTaken(void); void HostagesTaken(void);
void TalkingToHostages(void); void TalkingToHostages(void);

View File

@ -1,110 +1,386 @@
#include "precompiled.h" #include "precompiled.h"
/* <31d087> ../cstrike/dlls/bot/cs_bot_event.cpp:22 */ /* <31d087> ../cstrike/dlls/bot/cs_bot_event.cpp:22 */
NOBODY void CCSBot::__MAKE_VHOOK(OnEvent)(GameEventType event, CBaseEntity *entity, CBaseEntity *other) void CCSBot::__MAKE_VHOOK(OnEvent)(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
{ {
// { GetGameState()->OnEvent(event, entity, other);
// class CCSBotManager *ctrl; // 63 GetChatter()->OnEvent(event, entity, other);
// class CBasePlayer *player; // 65
// float range; // 363 // Morale adjustments happen even for dead players
// enum PriorityType priority; // 364 switch (event)
// bool isHostile; // 365 {
// const Vector *newNoisePosition; // 419 case EVENT_TERRORISTS_WIN:
// float newNoiseDist; // 420 if (m_iTeam == CT)
// { {
// class CBasePlayer *killer; // 81 DecreaseMorale();
// { }
// float const knifeAmbushChance; // 91 else
// Hurry(CCSBot *const this, {
// float duration); // 88 IncreaseMorale();
// } }
// } break;
// Say(BotChatterInterface *const this, case EVENT_CTS_WIN:
// const char *phraseName, if (m_iTeam == CT)
// float lifetime, {
// float delay); // 221 IncreaseMorale();
// { }
// float const bombBeepHearRangeSq; // 242 else
// operator-(const Vector *const this, {
// const Vector &v); // 243 DecreaseMorale();
// LengthSquared(const Vector *const this); // 243 }
// { break;
// const class Zone *zone; // 248 }
// }
// } if (!IsAlive())
// { return;
// float const bombPickupHearRangeSq; // 229
// operator-(const Vector *const this, CBasePlayer *player = static_cast<CBasePlayer *>(entity);
// const Vector &v); // 230
// LengthSquared(const Vector *const this); // 230 // If we just saw a nearby friend die, and we haven't yet acquired an enemy
// } // automatically acquire our dead friend's killer
// { if (!IsAttacking() && (GetDisposition() == ENGAGE_AND_INVESTIGATE || GetDisposition() == OPPORTUNITY_FIRE))
// class CBasePlayer *victim; // 111 {
// class CBasePlayer *killer; // 113 if (event == EVENT_PLAYER_DIED)
// GetNearbyEnemyCount(const class CCSBot *const this); // 175 {
// { if (player->m_iTeam == m_iTeam)
// float delay; // 185 {
// } CBasePlayer *killer = static_cast<CBasePlayer *>(other);
// GetTimeSinceLastSawEnemy(const class CCSBot *const this); // 155
// SetTask(CCSBot *const this, // check that attacker is an enemy (for friendly fire, etc)
// enum TaskType task, if (killer && killer->IsPlayer())
// class CBaseEntity *entity); // 164 {
// GetEnemy(CCSBot *const this); // 164 // check if we saw our friend die - dont check FOV - assume we're aware of our surroundings in combat
// Say(BotChatterInterface *const this, // snipers stay put
// const char *phraseName, if (!IsSniper() && IsVisible(&player->pev->origin))
// float lifetime, {
// float delay); // 118 // people are dying - we should hurry
// entindex(CBaseEntity *const this); // 124 Hurry(RANDOM_FLOAT(10.0f, 15.0f));
// }
// GetEnemy(CCSBot *const this); // 292 // if we're hiding with only our knife, be a little more cautious
// ForceRun(CCSBot *const this, const float knifeAmbushChance = 50.0f;
// float duration); // 294 if (!IsHiding() || !IsUsingKnife() || RANDOM_FLOAT(0, 100) < knifeAmbushChance)
// { {
// float const hearCallRange; // 329 PrintIfWatched("Attacking our friend's killer!\n");
// Vector vecCenter; // 334 Attack(killer);
// operator-(const Vector *const this, return;
// const Vector &v); // 330 }
// IsLengthGreaterThan(const Vector *const this, }
// float length); // 330 }
// { }
// enum RouteType route; // 343 }
// SetTask(CCSBot *const this, }
// enum TaskType task,
// class CBaseEntity *entity); // 338 switch (event)
// SetGoalEntity(CCSBot *const this, {
// class CBaseEntity *entity); // 340 case EVENT_PLAYER_DIED:
// } {
// } CBasePlayer *victim = player;
// operator-(const Vector *const this, CBasePlayer *killer = (other && other->IsPlayer()) ? static_cast<CBasePlayer *>(other) : NULL;
// const Vector &v); // 376
// IsLengthGreaterThan(const Vector *const this, // if the human player died in the single player game, tell the team
// float length); // 376 if (g_pGameRules->IsCareer() && !victim->IsBot() && victim->m_iTeam == m_iTeam)
// { {
// float const headOffChance; // 390 GetChatter()->Say("CommanderDown", 20.0f);
// SetTask(CCSBot *const this, }
// enum TaskType task,
// class CBaseEntity *entity); // 396 // keep track of the last player we killed
// } if (killer == this)
// operator-(const Vector *const this, {
// const Vector &v); // 420 m_lastVictimID = victim->entindex();
// Length(const Vector *const this); // 420 }
// {
// float const veryCloseRange; // 434 // react to teammate death
// class CNavArea *noiseArea; // 461 if (victim->m_iTeam == m_iTeam)
// float const maxErrorRadius; // 481 {
// float const maxHearingRange; // 482 // chastise friendly fire from humans
// float errorRadius; // 483 if (killer != NULL && !killer->IsBot() && killer->m_iTeam == m_iTeam && killer != this)
// { {
// float const shortTermMemoryTime; // 445 GetChatter()->KilledFriend();
// { }
// float oldNoiseDist; // 452
// operator-(const Vector *const this, if (IsHunting())
// const Vector &v); // 452 {
// Length(const Vector *const this); // 452 PrintIfWatched("Rethinking hunt due to teammate death\n");
// } Idle();
// } return;
// } }
// }
if (IsAttacking())
{
if (GetTimeSinceLastSawEnemy() > 0.4f)
{
PrintIfWatched("Rethinking my attack due to teammate death\n");
// allow us to sneak past windows, doors, etc
IgnoreEnemies(1.0f);
// move to last known position of enemy - this could cause us to flank if
// the danger has changed due to our teammate's recent death
SetTask(MOVE_TO_LAST_KNOWN_ENEMY_POSITION, GetEnemy());
MoveTo(&GetLastKnownEnemyPosition());
return;
}
}
}
// an enemy was killed
else
{
if (killer != NULL && killer->m_iTeam == m_iTeam)
{
// only chatter about enemy kills if we see them occur, and they were the last one we see
if (GetNearbyEnemyCount() <= 1)
{
// report if number of enemies left is few and we killed the last one we saw locally
GetChatter()->EnemiesRemaining();
if (IsVisible(&victim->pev->origin, CHECK_FOV))
{
// congratulate teammates on their kills
if (killer != NULL && killer != this)
{
float delay = RANDOM_FLOAT(2.0f, 3.0f);
if (killer->IsBot())
{
if (RANDOM_FLOAT(0.0f, 100.0f) < 40.0f)
GetChatter()->Say("NiceShot", 3.0f, delay);
}
else
{
// humans get the honorific
if (g_pGameRules->IsCareer())
GetChatter()->Say("NiceShotCommander", 3.0f, delay);
else
GetChatter()->Say("NiceShotSir", 3.0f, delay);
}
}
}
}
}
}
return;
}
case EVENT_TERRORISTS_WIN:
if (m_iTeam == TERRORIST)
GetChatter()->CelebrateWin();
return;
case EVENT_CTS_WIN:
if (m_iTeam == CT)
GetChatter()->CelebrateWin();
return;
case EVENT_BOMB_DEFUSED:
if (m_iTeam == CT && TheCSBots()->GetBombTimeLeft() < 2.0)
GetChatter()->Say("BarelyDefused");
return;
case EVENT_BOMB_PICKED_UP:
{
if (m_iTeam == CT && player != NULL)
{
// check if we're close enough to hear it
const float bombPickupHearRangeSq = 1000.0f * 1000.0f;
if ((pev->origin - player->pev->origin).LengthSquared() < bombPickupHearRangeSq)
{
GetChatter()->TheyPickedUpTheBomb();
}
}
return;
}
case EVENT_BOMB_BEEP:
{
// if we don't know where the bomb is, but heard it beep, we've discovered it
if (GetGameState()->IsPlantedBombLocationKnown() == false)
{
// check if we're close enough to hear it
const float bombBeepHearRangeSq = 1000.0f * 1000.0f;
if ((pev->origin - entity->pev->origin).LengthSquared() < bombBeepHearRangeSq)
{
// radio the news to our team
if (m_iTeam == CT && GetGameState()->GetPlantedBombsite() == CSGameState::UNKNOWN)
{
const CCSBotManager::Zone *zone = TheCSBots()->GetZone(&entity->pev->origin);
if (zone != NULL)
GetChatter()->FoundPlantedBomb(zone->m_index);
}
// remember where the bomb is
GetGameState()->UpdatePlantedBomb(&entity->pev->origin);
}
}
return;
}
case EVENT_BOMB_PLANTED:
{
// if we're a CT, forget what we're doing and go after the bomb
if (m_iTeam == CT)
{
Idle();
}
// if we are following someone, stop following
if (IsFollowing())
{
StopFollowing();
Idle();
}
OnEvent(EVENT_BOMB_BEEP, other);
return;
}
case EVENT_BOMB_DEFUSE_ABORTED:
PrintIfWatched("BOMB DEFUSE ABORTED\n");
return;
case EVENT_WEAPON_FIRED:
case EVENT_WEAPON_FIRED_ON_EMPTY:
case EVENT_WEAPON_RELOADED:
{
if (m_enemy == entity && IsUsingKnife())
ForceRun(5.0f);
break;
}
default:
break;
}
// Process radio events from our team
if (player != NULL && player->m_iTeam == m_iTeam && event > EVENT_START_RADIO_1 && event < EVENT_END_RADIO)
{
// TODO: Distinguish between radio commands and responses
if (event != EVENT_RADIO_AFFIRMATIVE && event != EVENT_RADIO_NEGATIVE && event != EVENT_RADIO_REPORTING_IN)
{
m_lastRadioCommand = event;
m_lastRadioRecievedTimestamp = gpGlobals->time;
m_radioSubject = player;
m_radioPosition = player->pev->origin;
}
}
// player_follows needs a player
if (player == NULL)
return;
if (!IsRogue() && event == EVENT_HOSTAGE_CALLED_FOR_HELP && m_iTeam == CT && IsHunting())
{
if ((entity->pev->origin - pev->origin).IsLengthGreaterThan(1000.0f))
return;
if (IsVisible(&entity->Center()))
{
m_task = COLLECT_HOSTAGES;
m_taskEntity = NULL;
Run();
m_goalEntity = entity;
MoveTo(&entity->pev->origin, (RouteType)(m_hostageEscortCount == 0));
PrintIfWatched("I'm fetching a hostage that called out to me\n");
return;
}
}
// don't pay attention to noise that friends make
if (!IsEnemy(player))
return;
float range;
PriorityType priority;
bool isHostile;
if (IsGameEventAudible(event, entity, other, &range, &priority, &isHostile) == false)
return;
if (event == EVENT_HOSTAGE_USED)
{
if (m_iTeam == CT)
return;
if ((entity->pev->origin - pev->origin).IsLengthGreaterThan(range))
return;
GetChatter()->HostagesBeingTaken();
if (!GetGameState()->GetNearestVisibleFreeHostage() && m_task != GUARD_HOSTAGE_RESCUE_ZONE && GuardRandomZone())
{
m_task = GUARD_HOSTAGE_RESCUE_ZONE;
m_taskEntity = NULL;
SetDisposition(OPPORTUNITY_FIRE);
PrintIfWatched("Trying to beat them to an escape zone!\n");
}
}
// check if noise is close enough for us to hear
const Vector *newNoisePosition = &player->pev->origin;
float newNoiseDist = (pev->origin - *newNoisePosition).Length();
if (newNoiseDist < range)
{
// we heard the sound
if ((IsLocalPlayerWatchingMe() && cv_bot_debug.value == 3.0f) || cv_bot_debug.value == 4.0f)
{
PrintIfWatched("Heard noise (%s from %s, pri %s, time %3.1f)\n",
(event == EVENT_WEAPON_FIRED) ? "Weapon fire " : "",
STRING(player->pev->netname),
(priority == PRIORITY_HIGH) ? "HIGH" : ((priority == PRIORITY_MEDIUM) ? "MEDIUM" : "LOW"),
gpGlobals->time);
}
if (event == EVENT_PLAYER_FOOTSTEP && IsUsingSniperRifle() && newNoiseDist < 300.0)
EquipPistol();
// should we pay attention to it
// if noise timestamp is zero, there is no prior noise
if (m_noiseTimestamp > 0.0f)
{
// only overwrite recent sound if we are louder (closer), or more important - if old noise was long ago, its faded
const float shortTermMemoryTime = 3.0f;
if (gpGlobals->time - m_noiseTimestamp < shortTermMemoryTime)
{
// prior noise is more important - ignore new one
if (priority < m_noisePriority)
return;
float oldNoiseDist = (pev->origin - m_noisePosition).Length();
if (newNoiseDist >= oldNoiseDist)
return;
}
}
// find the area in which the noise occured
// TODO: Better handle when noise occurs off the nav mesh
// TODO: Make sure noise area is not through a wall or ceiling from source of noise
// TODO: Change GetNavTravelTime to better deal with NULL destination areas
CNavArea *noiseArea = TheNavAreaGrid.GetNavArea(newNoisePosition);
if (noiseArea == NULL)
noiseArea = TheNavAreaGrid.GetNearestNavArea(newNoisePosition);
if (noiseArea == NULL)
{
PrintIfWatched(" *** Noise occurred off the nav mesh - ignoring!\n");
return;
}
m_noiseArea = noiseArea;
// remember noise priority
m_noisePriority = priority;
// randomize noise position in the area a bit - hearing isn't very accurate
// the closer the noise is, the more accurate our placement
// TODO: Make sure not to pick a position on the opposite side of ourselves.
const float maxErrorRadius = 400.0f;
const float maxHearingRange = 2000.0f;
float errorRadius = maxErrorRadius * newNoiseDist / maxHearingRange;
m_noisePosition.x = newNoisePosition->x + RANDOM_FLOAT(-errorRadius, errorRadius);
m_noisePosition.y = newNoisePosition->y + RANDOM_FLOAT(-errorRadius, errorRadius);
// make sure noise position remains in the same area
m_noiseArea->GetClosestPointOnArea(&m_noisePosition, &m_noisePosition);
m_isNoiseTravelRangeChecked = false;
// note when we heard the noise
m_noiseTimestamp = gpGlobals->time;
}
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -2,8 +2,8 @@
const float updateTimesliceDuration = 0.5f; const float updateTimesliceDuration = 0.5f;
int _navAreaCount; int _navAreaCount = 0;
int _currentIndex; int _currentIndex = 0;
/* <343cbe> ../cstrike/dlls/bot/cs_bot_learn.cpp:95 */ /* <343cbe> ../cstrike/dlls/bot/cs_bot_learn.cpp:95 */
inline CNavNode *LadderEndSearch(CBaseEntity *entity, const Vector *pos, NavDirType mountDir) inline CNavNode *LadderEndSearch(CBaseEntity *entity, const Vector *pos, NavDirType mountDir)
@ -163,7 +163,6 @@ void CCSBot::StartLearnProcess(void)
{ {
CONSOLE_ECHO("ERROR: Start position invalid\n\n"); CONSOLE_ECHO("ERROR: Start position invalid\n\n");
m_processMode = PROCESS_NORMAL; m_processMode = PROCESS_NORMAL;
return; return;
} }
@ -180,180 +179,179 @@ void CCSBot::StartLearnProcess(void)
/* <343d37> ../cstrike/dlls/bot/cs_bot_learn.cpp:217 */ /* <343d37> ../cstrike/dlls/bot/cs_bot_learn.cpp:217 */
bool CCSBot::LearnStep(void) bool CCSBot::LearnStep(void)
{ {
UNTESTED // take a step
// take a step while (true)
while (true) {
{ if (m_currentNode == NULL)
if (m_currentNode == NULL) {
{ // search is exhausted - continue search from ends of ladders
// search is exhausted - continue search from ends of ladders NavLadderList::iterator iter;
NavLadderList::iterator iter; for (iter = TheNavLadderList.begin(); iter != TheNavLadderList.end(); ++iter)
for (iter = TheNavLadderList.begin(); iter != TheNavLadderList.end(); ++iter) {
{ CNavLadder *ladder = (*iter);
CNavLadder *ladder = (*iter);
// check ladder bottom
// check ladder bottom if ((m_currentNode = LadderEndSearch(ladder->m_entity, &ladder->m_bottom, ladder->m_dir)) != 0)
if ((m_currentNode = LadderEndSearch(ladder->m_entity, &ladder->m_bottom, ladder->m_dir)) != 0) break;
break;
// check ladder top
// check ladder top if ((m_currentNode = LadderEndSearch(ladder->m_entity, &ladder->m_top, ladder->m_dir)) != 0)
if ((m_currentNode = LadderEndSearch(ladder->m_entity, &ladder->m_top, ladder->m_dir)) != 0) break;
break; }
}
if (m_currentNode == NULL)
if (m_currentNode == NULL) {
{ // all seeds exhausted, sampling complete
// all seeds exhausted, sampling complete GenerateNavigationAreaMesh();
GenerateNavigationAreaMesh(); return false;
return false; }
} }
}
// Take a step from this node
// Take a step from this node for (int dir = NORTH; dir < NUM_DIRECTIONS; dir++)
for (int dir = NORTH; dir < NUM_DIRECTIONS; dir++) {
{ if (!m_currentNode->HasVisited((NavDirType)dir))
if (!m_currentNode->HasVisited((NavDirType)dir)) {
{ float feetOffset = pev->origin.z - GetFeetZ();
float feetOffset = pev->origin.z - GetFeetZ();
// start at current node position
// start at current node position Vector pos = *m_currentNode->GetPosition();
Vector pos = *m_currentNode->GetPosition();
// snap to grid
// snap to grid int cx = SnapToGrid(pos.x);
int cx = SnapToGrid(pos.x); int cy = SnapToGrid(pos.y);
int cy = SnapToGrid(pos.y);
// attempt to move to adjacent node
// attempt to move to adjacent node switch (dir)
switch (dir) {
{ case NORTH: cy -= GenerationStepSize; break;
case NORTH: cy -= GenerationStepSize; break; case SOUTH: cy += GenerationStepSize; break;
case SOUTH: cy += GenerationStepSize; break; case EAST: cx += GenerationStepSize; break;
case EAST: cx += GenerationStepSize; break; case WEST: cx -= GenerationStepSize; break;
case WEST: cx -= GenerationStepSize; break; }
}
pos.x = cx;
pos.x = cx; pos.y = cy;
pos.y = cy;
m_generationDir = (NavDirType)dir;
m_generationDir = (NavDirType)dir;
// mark direction as visited
// mark direction as visited m_currentNode->MarkAsVisited(m_generationDir);
m_currentNode->MarkAsVisited(m_generationDir);
// test if we can move to new position
// test if we can move to new position TraceResult result;
TraceResult result; Vector from, to;
Vector from, to;
// modify position to account for change in ground level during step
// modify position to account for change in ground level during step to.x = pos.x;
to.x = pos.x; to.y = pos.y;
to.y = pos.y; Vector toNormal;
Vector toNormal; if (GetGroundHeight(&pos, &to.z, &toNormal) == false)
if (GetGroundHeight(&pos, &to.z, &toNormal) == false) {
{ return true;
return true; }
}
from = *m_currentNode->GetPosition();
from = *m_currentNode->GetPosition();
Vector fromOrigin = from + Vector(0, 0, feetOffset);
Vector fromOrigin = from + Vector(0, 0, feetOffset); Vector toOrigin = to + Vector(0, 0, feetOffset);
Vector toOrigin = to + Vector(0, 0, feetOffset);
UTIL_SetOrigin(pev, toOrigin);
UTIL_SetOrigin(pev, toOrigin); UTIL_TraceLine(fromOrigin, toOrigin, ignore_monsters, dont_ignore_glass, ENT(pev), &result);
UTIL_TraceLine(fromOrigin, toOrigin, ignore_monsters, dont_ignore_glass, ENT(pev), &result);
bool walkable;
bool walkable;
if (result.flFraction == 1.0f && !result.fStartSolid)
if (result.flFraction == 1.0f && !result.fStartSolid) {
{ // the trace didnt hit anything - clear
// the trace didnt hit anything - clear float toGround = to.z;
float toGround = to.z; float fromGround = from.z;
float fromGround = from.z;
float epsilon = 0.1f;
float epsilon = 0.1f;
// check if ledge is too high to reach or will cause us to fall to our death
// check if ledge is too high to reach or will cause us to fall to our death if (toGround - fromGround > JumpCrouchHeight + epsilon || fromGround - toGround > DeathDrop)
if (toGround - fromGround > JumpCrouchHeight + epsilon || fromGround - toGround > DeathDrop) {
{ walkable = false;
walkable = false; }
} else
else {
{ // check surface normals along this step to see if we would cross any impassable slopes
// check surface normals along this step to see if we would cross any impassable slopes Vector delta = to - from;
Vector delta = to - from; const float inc = 2.0f;
const float inc = 2.0f; float along = inc;
float along = inc; bool done = false;
bool done = false; float ground;
float ground; Vector normal;
Vector normal;
walkable = true;
walkable = true;
while (!done)
while (!done) {
{ Vector p;
Vector p;
// need to guarantee that we test the exact edges
// need to guarantee that we test the exact edges if (along >= GenerationStepSize)
if (along >= GenerationStepSize) {
{ p = to;
p = to; done = true;
done = true; }
} else
else {
{ p = from + delta * (along / GenerationStepSize);
p = from + delta * (along / GenerationStepSize); }
}
if (GetGroundHeight(&p, &ground, &normal) == false)
if (GetGroundHeight(&p, &ground, &normal) == false) {
{ walkable = false;
walkable = false; break;
break; }
}
// check for maximum allowed slope
// check for maximum allowed slope if (normal.z < 0.7f)
if (normal.z < 0.7f) {
{ walkable = false;
walkable = false; break;
break; }
}
along += inc;
along += inc; }
} }
} }
} // TraceLine hit something...
// TraceLine hit something... else
else {
{ if (IsEntityWalkable(VARS(result.pHit), WALK_THRU_EVERYTHING))
if (IsEntityWalkable(VARS(result.pHit), WALK_THRU_EVERYTHING)) {
{ walkable = true;
walkable = true; }
} else
else {
{ walkable = false;
walkable = false; }
} }
} #ifdef REGAMEDLL_FIXES
#ifdef REGAMEDLL_FIXES // if we're incrementally generating, don't overlap existing nav areas
// if we're incrementally generating, don't overlap existing nav areas CNavArea *overlap = TheNavAreaGrid.GetNavArea(&to, HumanHeight);
CNavArea *overlap = TheNavAreaGrid.GetNavArea(&to, HumanHeight); if (overlap != NULL)
if (overlap != NULL) {
{ walkable = false;
walkable = false; }
} #endif // REGAMEDLL_FIXES
#endif // REGAMEDLL_FIXES if (walkable)
if (walkable) {
{ // we can move here
// we can move here // create a new navigation node, and update current node pointer
// create a new navigation node, and update current node pointer CNavNode *newNode = AddNode(&to, &toNormal, m_generationDir, m_currentNode);
CNavNode *newNode = AddNode(&to, &toNormal, m_generationDir, m_currentNode); }
}
return true;
return true; }
} }
}
// all directions have been searched from this node - pop back to its parent and continue
// all directions have been searched from this node - pop back to its parent and continue m_currentNode = m_currentNode->GetParent();
m_currentNode = m_currentNode->GetParent();
} }
} }
@ -361,12 +359,12 @@ bool CCSBot::LearnStep(void)
void CCSBot::UpdateLearnProcess(void) void CCSBot::UpdateLearnProcess(void)
{ {
float startTime = g_engfuncs.pfnTime(); float startTime = g_engfuncs.pfnTime();
while (g_engfuncs.pfnTime() - startTime >= updateTimesliceDuration) while (g_engfuncs.pfnTime() - startTime < updateTimesliceDuration)
{ {
if (LearnStep() == false) if (LearnStep() == false)
{ {
StartAnalyzeAlphaProcess(); StartAnalyzeAlphaProcess();
break; return;
} }
} }
} }
@ -390,12 +388,11 @@ void CCSBot::StartAnalyzeAlphaProcess(void)
/* <34396c> ../cstrike/dlls/bot/cs_bot_learn.cpp:427 */ /* <34396c> ../cstrike/dlls/bot/cs_bot_learn.cpp:427 */
bool CCSBot::AnalyzeAlphaStep(void) bool CCSBot::AnalyzeAlphaStep(void)
{ {
++_currentIndex;
if (m_analyzeIter == TheNavAreaList.end()) if (m_analyzeIter == TheNavAreaList.end())
return false; return false;
CNavArea *area = (*m_analyzeIter); CNavArea *area = (*m_analyzeIter);
++_currentIndex;
area->ComputeHidingSpots(); area->ComputeHidingSpots();
area->ComputeApproachAreas(); area->ComputeApproachAreas();
++m_analyzeIter; ++m_analyzeIter;
@ -407,20 +404,19 @@ bool CCSBot::AnalyzeAlphaStep(void)
void CCSBot::UpdateAnalyzeAlphaProcess(void) void CCSBot::UpdateAnalyzeAlphaProcess(void)
{ {
float startTime = g_engfuncs.pfnTime(); float startTime = g_engfuncs.pfnTime();
float progress = _currentIndex / _navAreaCount * 50.0f; while (g_engfuncs.pfnTime() - startTime < updateTimesliceDuration)
while (AnalyzeAlphaStep())
{ {
if (g_engfuncs.pfnTime() - startTime >= updateTimesliceDuration) if (AnalyzeAlphaStep() == false)
{ {
drawProgressMeter(progress, "#CZero_AnalyzingHidingSpots"); drawProgressMeter(50, "#CZero_AnalyzingHidingSpots");
CleanupApproachAreaAnalysisPrep();
StartAnalyzeBetaProcess();
return; return;
} }
} }
drawProgressMeter(50, "#CZero_AnalyzingHidingSpots"); float progress = _currentIndex / _navAreaCount * 50.0f;
CleanupApproachAreaAnalysisPrep(); drawProgressMeter(progress, "#CZero_AnalyzingHidingSpots");
StartAnalyzeBetaProcess();
} }
/* <344aed> ../cstrike/dlls/bot/cs_bot_learn.cpp:467 */ /* <344aed> ../cstrike/dlls/bot/cs_bot_learn.cpp:467 */
@ -436,12 +432,11 @@ void CCSBot::StartAnalyzeBetaProcess(void)
/* <3437c8> ../cstrike/dlls/bot/cs_bot_learn.cpp:479 */ /* <3437c8> ../cstrike/dlls/bot/cs_bot_learn.cpp:479 */
bool CCSBot::AnalyzeBetaStep(void) bool CCSBot::AnalyzeBetaStep(void)
{ {
++_currentIndex;
if (m_analyzeIter == TheNavAreaList.end()) if (m_analyzeIter == TheNavAreaList.end())
return false; return false;
CNavArea *area = (*m_analyzeIter); CNavArea *area = (*m_analyzeIter);
++_currentIndex;
area->ComputeSpotEncounters(); area->ComputeSpotEncounters();
area->ComputeSniperSpots(); area->ComputeSniperSpots();
++m_analyzeIter; ++m_analyzeIter;
@ -453,19 +448,18 @@ bool CCSBot::AnalyzeBetaStep(void)
void CCSBot::UpdateAnalyzeBetaProcess(void) void CCSBot::UpdateAnalyzeBetaProcess(void)
{ {
float startTime = g_engfuncs.pfnTime(); float startTime = g_engfuncs.pfnTime();
float progress = (_currentIndex / _navAreaCount + 1.0f) * 50.0f; while (g_engfuncs.pfnTime() - startTime < updateTimesliceDuration)
while (AnalyzeBetaStep())
{ {
if (g_engfuncs.pfnTime() - startTime >= updateTimesliceDuration) if (AnalyzeBetaStep() == false)
{ {
drawProgressMeter(progress, "#CZero_AnalyzingApproachPoints"); drawProgressMeter(100, "#CZero_AnalyzingApproachPoints");
StartSaveProcess();
return; return;
} }
} }
drawProgressMeter(100, "#CZero_AnalyzingApproachPoints"); float progress = ((_currentIndex / _navAreaCount) + 1.0f) * 50.0f;
StartSaveProcess(); drawProgressMeter(progress, "#CZero_AnalyzingApproachPoints");
} }
/* <344d1f> ../cstrike/dlls/bot/cs_bot_learn.cpp:517 */ /* <344d1f> ../cstrike/dlls/bot/cs_bot_learn.cpp:517 */
@ -482,7 +476,8 @@ void CCSBot::UpdateSaveProcess(void)
char cmd[128]; char cmd[128];
GET_GAME_DIR(filename); GET_GAME_DIR(filename);
filename[Q_strlen(filename)] = '\\';
Q_strcat(filename, "\\");
Q_strcat(filename, TheBots->GetNavMapFilename()); Q_strcat(filename, TheBots->GetNavMapFilename());
HintMessageToAllPlayers("Saving..."); HintMessageToAllPlayers("Saving...");

View File

@ -1203,17 +1203,10 @@ void CCSBotManager::ValidateMapData(void)
} }
} }
void (*pCCSBotManager__AddBot)(void);
/* <36c2b2> ../cstrike/dlls/bot/cs_bot_manager.cpp:1278 */ /* <36c2b2> ../cstrike/dlls/bot/cs_bot_manager.cpp:1278 */
NOBODY bool __declspec(naked) CCSBotManager::AddBot(const BotProfile *profile, BotProfileTeamType team) #ifndef HOOK_GAMEDLL
bool CCSBotManager::AddBot(const BotProfile *profile, BotProfileTeamType team)
{ {
#if 1
__asm
{
jmp pCCSBotManager__AddBot
}
#else
if (!UTIL_IsGame("czero")) if (!UTIL_IsGame("czero"))
return false; return false;
@ -1287,8 +1280,8 @@ NOBODY bool __declspec(naked) CCSBotManager::AddBot(const BotProfile *profile, B
CONSOLE_ECHO("Could not add bot to the game.\n"); CONSOLE_ECHO("Could not add bot to the game.\n");
return false; return false;
#endif
} }
#endif // HOOK_GAMEDLL
// Return the zone that contains the given position // Return the zone that contains the given position
@ -1583,6 +1576,13 @@ void CCSBotManager::ResetRadioMessageTimestamps(void)
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
void (*pCCSBotManager__AddBot)(void);
bool __declspec(naked) CCSBotManager::AddBot(const BotProfile *profile, BotProfileTeamType team)
{
__asm { jmp pCCSBotManager__AddBot }
}
void CCSBotManager::ClientDisconnect(CBasePlayer *pPlayer) void CCSBotManager::ClientDisconnect(CBasePlayer *pPlayer)
{ {
ClientDisconnect_(pPlayer); ClientDisconnect_(pPlayer);

View File

@ -36,13 +36,6 @@
#define TheBots (*pTheBots) #define TheBots (*pTheBots)
//#define m_flNextCVarCheck (*pm_flNextCVarCheck)
//#define m_isMapDataLoaded (*pm_isMapDataLoaded)
//#define m_editCmd (*pm_editCmd)
//#define m_isLearningMap (*pm_isLearningMap)
//#define m_isAnalysisRequested (*pm_isAnalysisRequested)
#endif // HOOK_GAMEDLL #endif // HOOK_GAMEDLL
extern CBotManager *TheBots; extern CBotManager *TheBots;
@ -122,8 +115,8 @@ public:
// "zones" // "zones"
// depending on the game mode, these are bomb zones, rescue zones, etc. // depending on the game mode, these are bomb zones, rescue zones, etc.
enum { MAX_ZONES = 4 }; // max # of zones in a map enum { MAX_ZONES = 4 }; // max # of zones in a map
enum { MAX_ZONE_NAV_AREAS = 16 }; // max # of nav areas in a zone enum { MAX_ZONE_NAV_AREAS = 16 }; // max # of nav areas in a zone
struct Zone struct Zone
{ {
CBaseEntity *m_entity; // the map entity CBaseEntity *m_entity; // the map entity
@ -133,8 +126,7 @@ public:
bool m_isLegacy; // if true, use pev->origin and 256 unit radius as zone bool m_isLegacy; // if true, use pev->origin and 256 unit radius as zone
int m_index; int m_index;
Extent m_extent; Extent m_extent;
};
};/* size: 116, cachelines: 2, members: 7 */
const Zone *GetZone(int i) const { return &m_zone[i]; } const Zone *GetZone(int i) const { return &m_zone[i]; }
const Zone *GetZone(const Vector *pos) const; // return the zone that contains the given position const Zone *GetZone(const Vector *pos) const; // return the zone that contains the given position
@ -160,13 +152,10 @@ public:
if (m_zone[i].m_areaCount == 0) if (m_zone[i].m_areaCount == 0)
continue; continue;
if (m_zone[i].m_isBlocked)
continue;
// just use the first overlapping nav area as a reasonable approximation // just use the first overlapping nav area as a reasonable approximation
float dist = NavAreaTravelDistance(startArea, m_zone[i].m_area[0], costFunc); float_precision dist = NavAreaTravelDistance(startArea, m_zone[i].m_area[0], costFunc);
if (dist >= 0.0f && dist < closeDist) if (/*dist >= 0.0f && */dist < closeDist)
{ {
closeZone = &m_zone[i]; closeZone = &m_zone[i];
closeDist = dist; closeDist = dist;

View File

@ -74,6 +74,7 @@ void CCSBot::RespondToRadioCommands(void)
return; return;
} }
CCSBotManager *ctrl = TheCSBots();
CBasePlayer *player = m_radioSubject; CBasePlayer *player = m_radioSubject;
if (player == NULL) if (player == NULL)
return; return;
@ -141,7 +142,7 @@ void CCSBot::RespondToRadioCommands(void)
} }
case EVENT_RADIO_GET_OUT_OF_THERE: case EVENT_RADIO_GET_OUT_OF_THERE:
{ {
if (TheCSBots()->IsBombPlanted()) if (ctrl->IsBombPlanted())
{ {
EscapeFromBomb(); EscapeFromBomb();
player->InhibitAutoFollow(inhibitAutoFollowDuration); player->InhibitAutoFollow(inhibitAutoFollowDuration);
@ -153,11 +154,11 @@ void CCSBot::RespondToRadioCommands(void)
{ {
// if this is a defusal scenario, and the bomb is planted, // if this is a defusal scenario, and the bomb is planted,
// and a human player cleared a bombsite, check it off our list too // and a human player cleared a bombsite, check it off our list too
if (TheCSBots()->GetScenario() == CCSBotManager::SCENARIO_DEFUSE_BOMB) if (ctrl->GetScenario() == CCSBotManager::SCENARIO_DEFUSE_BOMB)
{ {
if (m_iTeam == CT && TheCSBots()->IsBombPlanted()) if (m_iTeam == CT && ctrl->IsBombPlanted())
{ {
const CCSBotManager::Zone *zone = TheCSBots()->GetClosestZone(player); const CCSBotManager::Zone *zone = ctrl->GetClosestZone(player);
if (zone != NULL) if (zone != NULL)
{ {

View File

@ -150,198 +150,609 @@ void CCSBot::__MAKE_VHOOK(Upkeep)(void)
UpdateLookAngles(); UpdateLookAngles();
} }
void (*pCCSBot__Update)(void); // Heavyweight processing, invoked less often
/* <3c6e1e> ../cstrike/dlls/bot/cs_bot_update.cpp:208 */ /* <3c6e1e> ../cstrike/dlls/bot/cs_bot_update.cpp:208 */
NOBODY void __declspec(naked) CCSBot::__MAKE_VHOOK(Update)(void) void CCSBot::__MAKE_VHOOK(Update)(void)
{ {
__asm CCSBotManager *ctrl = TheCSBots();
if (ctrl->IsAnalysisRequested() && m_processMode == PROCESS_NORMAL)
{ {
jmp pCCSBot__Update ctrl->AckAnalysisRequest();
StartAnalyzeAlphaProcess();
} }
// {
// class CCSBotManager *ctrl; // 210 switch (m_processMode)
// float const rememberNoiseDuration; // 401 {
// float const recomputeApproachPointTolerance; // 419 case PROCESS_LEARN: UpdateLearnProcess(); return;
// class CBasePlayer *threat; // 459 case PROCESS_ANALYZE_ALPHA: UpdateAnalyzeAlphaProcess(); return;
// float const seenRecentTime; // 572 case PROCESS_ANALYZE_BETA: UpdateAnalyzeBetaProcess(); return;
// float const safeRearmTime; // 676 case PROCESS_SAVE: UpdateSaveProcess(); return;
// float const avoidTime; // 691 }
// float const earliestAutoFollowTime; // 807
// float const minAutoFollowTeamwork; // 808 // update our radio chatter
// { // need to allow bots to finish their chatter even if they are dead
// Vector vecAiming; // 342 GetChatter()->Update();
// Vector vecSrc; // 344
// operator+(const Vector *const this, if (m_voiceFeedbackEndTimestamp != 0.0f
// const Vector &v); // 341 && (m_voiceFeedbackEndTimestamp <= gpGlobals->time || gpGlobals->time < m_voiceFeedbackStartTimestamp))
// operator+(const Vector *const this, {
// const Vector &v); // 349 EndVoiceFeedback(NO_FORCE);
// operator*(float fl, }
// const Vector &v); // 349
// operator+(const Vector *const this, // check if we are dead
// const Vector &v); // 351 if (!IsAlive())
// operator*(float fl, {
// const Vector &v); // 351 // remember that we died
// Vector(Vector *const this, m_diedLastRound = true;
// const Vector &v); // 351 BotDeathThink();
// Vector(Vector *const this, return;
// const Vector &v); // 349 }
// }
// { // show line of fire
// Vector dir; // 366 if ((cv_bot_traceview.value == 100.0f && IsLocalPlayerWatchingMe()) || cv_bot_traceview.value == 101.0f)
// float length; // 367 {
// const class SpotOrder *order; // 369 UTIL_MakeVectors(pev->punchangle + pev->v_angle);
// Vector along; // 370
// Vector(Vector *const this, if (!IsFriendInLineOfFire())
// const Vector &v); // 364 {
// Vector(Vector *const this, Vector vecAiming = gpGlobals->v_forward;
// const Vector &v); // 364 Vector vecSrc = GetGunPosition();
// operator-(const Vector *const this,
// const Vector &v); // 366 if (m_iTeam == TERRORIST)
// NormalizeInPlace(Vector *const this); // 367 UTIL_DrawBeamPoints(vecSrc, vecSrc + 2000.0f * vecAiming, 1, 255, 0, 0);
// { else
// const_iterator iter; // 371 UTIL_DrawBeamPoints(vecSrc, vecSrc + 2000.0f * vecAiming, 1, 0, 50, 255);
// end(list<SpotOrder, std::allocator<SpotOrder>> *const this); // 371 }
// operator*(float fl, }
// const Vector &v); // 375
// operator+(const Vector *const this, // Debug beam rendering
// const Vector &v); // 375 if (cv_bot_traceview.value == 2.0f && IsLocalPlayerWatchingMe() || cv_bot_traceview.value == 3.0f)
// Vector(Vector *const this, DrawApproachPoints();
// const Vector &v); // 377
// Vector(Vector *const this, if (cv_bot_traceview.value == 4.0f && IsLocalPlayerWatchingMe() || cv_bot_traceview.value == 5.0f)
// const Vector &v); // 377 {
// operator++(_List_const_iterator<SpotOrder> *const this); // 371 // ...
// } }
// }
// { if (cv_bot_traceview.value == 1.0f && IsLocalPlayerWatchingMe())
// Vector from; // 385 {
// float const size; // 387 // ...
// Vector arrow; // 389 }
// GetEyePosition(const class CCSBot *const this); // 385
// operator+(const Vector *const this, if (cv_bot_stop.value != 0.0f)
// const Vector &v); // 391 return;
// Vector(Vector *const this,
// const Vector &v); // 391 // check if we are stuck
// } StuckCheck();
// ForgetNoise(CCSBot *const this); // 403
// SetClearedTimestamp(CNavArea *const this, // if our current 'noise' was heard a long time ago, forget it
// int teamID); // 415 const float rememberNoiseDuration = 20.0f;
// operator-(const Vector *const this, if (m_noiseTimestamp > 0.0f && gpGlobals->time - m_noiseTimestamp > rememberNoiseDuration)
// const Vector &v); // 420 {
// IsLengthGreaterThan(const Vector *const this, ForgetNoise();
// float length); // 420 }
// AckAnalysisRequest(CCSBotManager *const this); // 215
// { // where are we
// float const selfDefenseRange; // 465 if (!m_currentArea || !m_currentArea->Contains(&pev->origin))
// { {
// float const knifeAttackRange; // 490 m_currentArea = TheNavAreaGrid.GetNavArea(&pev->origin);
// operator-(const Vector *const this, }
// const Vector &v); // 491
// IsLengthLessThan(const Vector *const this, // track the last known area we were in
// float length); // 491 if (m_currentArea != NULL && m_currentArea != m_lastKnownArea)
// } {
// GetEnemy(CCSBot *const this); // 485 m_lastKnownArea = m_currentArea;
// operator-(const Vector *const this, // assume that we "clear" an area of enemies when we enter it
// const Vector &v); // 483 m_currentArea->SetClearedTimestamp(m_iTeam - 1);
// IsLengthLessThan(const Vector *const this, }
// float length); // 483
// { // update approach points
// float const recentAttackDuration; // 512 const float recomputeApproachPointTolerance = 50.0f;
// GetTimeSinceAttacked(const class CCSBot *const this); // 513 if ((m_approachPointViewPosition - pev->origin).IsLengthGreaterThan(recomputeApproachPointTolerance))
// } {
// SetLastSeenEnemyTimestamp(CCSBotManager *const this); // 522 ComputeApproachPoints();
// } m_approachPointViewPosition = pev->origin;
// IsAwareOfEnemyDeath(const class CCSBot *const this); // 530 }
// GetTimeSinceLastSawEnemy(const class CCSBot *const this); // 573
// { if (cv_bot_show_nav.value > 0.0f && m_lastKnownArea != NULL)
// Vector target; // 591 {
// } m_lastKnownArea->DrawConnectedAreas();
// { }
// bool doToss; // 601
// IsElapsed(const class CountdownTimer *const this); // 605 // if we're blind, retreat!
// } if (IsBlind())
// IsActiveWeaponReloading(const class CBot *const this); // 677 {
// { if (!IsAtHidingSpot())
// float const duration; // 704 {
// float crouchDelayTime; // 705 switch (m_blindMoveDir)
// float standUpTime; // 706 {
// float elapsed; // 708 case FORWARD: MoveForward(); break;
// } case RIGHT: StrafeRight(); break;
// { case BACKWARD: MoveBackward(); break;
// unsigned char status; // 784 case LEFT: StrafeLeft(); break;
// HostageWasTaken(CSGameState *const this); // 793 default: Crouch(); break;
// } }
// { }
// float gonnaBlowTime; // 755 if (m_blindFire)
// } {
// GetElapsedRoundTime(const class CCSBotManager *const this); // 809 PrimaryAttack();
// { }
// class CBasePlayer *leader; // 820
// GetClosestVisibleHumanFriend(const class CCSBot *const this); // 820 return;
// IsAutoFollowAllowed(const class CBasePlayer *const this); // 821 }
// {
// float const maxFollowCount; // 824 // Enemy acquisition and attack initiation
// { // take a snapshot and update our reaction time queue
// float const autoFollowRange; // 827 UpdateReactionQueue();
// operator-(const Vector *const this,
// const Vector &v); // 828 // "threat" may be the same as our current enemy
// IsLengthLessThan(const Vector *const this, CBasePlayer *threat = GetRecognizedEnemy();
// float length); // 828 if (threat != NULL)
// { {
// class CNavArea *leaderArea; // 830 // adjust our personal "safe" time
// { AdjustSafeTime();
// class PathCost pc; // 833
// float travelRange; // 834 // Decide if we should attack
// PathCost(PathCost *const this, bool doAttack = false;
// class CCSBot *bot, if (!IsUsingGrenade())
// enum RouteType route); // 833 {
// NavAreaTravelDistance<PathCost>(CNavArea *startArea, switch (GetDisposition())
// class CNavArea *endArea, {
// class PathCost &costFunc); // 834 case IGNORE_ENEMIES:
// } {
// } // never attack
// } doAttack = false;
// } break;
// } }
// { case SELF_DEFENSE:
// class CBaseEntity *leader; // 865 {
// float const highTeamwork; // 872 // attack if fired on
// { doAttack = IsPlayerLookingAtMe(threat);
// float minFollowDuration; // 875
// GetFollowDuration(const class CCSBot *const this); // 876 // attack if enemy very close
// } if (!doAttack)
// } {
// { const float selfDefenseRange = 750.0f;
// float const campChance; // 890 doAttack = (pev->origin - threat->pev->origin).IsLengthLessThan(selfDefenseRange);
// } }
// IsReloading(CBasePlayer *const this); // 920 break;
// IsElapsed(const class CountdownTimer *const this); // 927 }
// { case ENGAGE_AND_INVESTIGATE:
// float const waitForHostageRange; // 929 case OPPORTUNITY_FIRE:
// Start(CountdownTimer *const this, {
// float duration); // 936 // normal combat range
// IsElapsed(const class CountdownTimer *const this); // 941 doAttack = true;
// Start(CountdownTimer *const this, break;
// float duration); // 945 }
// } }
// GetLooseBomb(CCSBotManager *const this); // 743 }
// GetBomber(CCSBot *const this); // 740 else
// GetTimeSinceLastSawEnemy(const class CCSBot *const this); // 678 ThrowGrenade(&pev->origin);
// }
// if we aren't attacking but we are being attacked, retaliate
if (!doAttack && !IsAttacking() && GetDisposition() != IGNORE_ENEMIES)
{
const float recentAttackDuration = 1.0f;
if (GetTimeSinceAttacked() < recentAttackDuration)
{
// we may not be attacking our attacker, but at least we're not just taking it
// (since m_attacker isn't reaction-time delayed, we can't directly use it)
doAttack = true;
PrintIfWatched("Ouch! Retaliating!\n");
}
}
if (doAttack)
{
if (GetEnemy() == NULL || !IsAttacking() || threat != GetEnemy())
{
if (IsUsingKnife() && IsHiding())
{
// if hiding with a knife, wait until threat is close
const float knifeAttackRange = 250.0f;
if ((pev->origin - threat->pev->origin).IsLengthLessThan(knifeAttackRange))
{
Attack(threat);
}
}
else
{
Attack(threat);
}
}
}
else
{
// dont attack, but keep track of nearby enemies
SetEnemy(threat);
m_isEnemyVisible = true;
}
ctrl->SetLastSeenEnemyTimestamp();
}
// Validate existing enemy, if any
if (m_enemy != NULL)
{
if (IsAwareOfEnemyDeath())
{
// we have noticed that our enemy has died
m_enemy = NULL;
m_isEnemyVisible = false;
}
else
{
// check LOS to current enemy (chest & head), in case he's dead (GetNearestEnemy() only returns live players)
// note we're not checking FOV - once we've acquired an enemy (which does check FOV), assume we know roughly where he is
if (IsVisible(m_enemy, false, &m_visibleEnemyParts))
{
m_isEnemyVisible = true;
m_lastSawEnemyTimestamp = gpGlobals->time;
m_lastEnemyPosition = m_enemy->pev->origin;
}
else
{
m_isEnemyVisible = false;
}
// check if enemy died
if (m_enemy->IsAlive())
{
m_enemyDeathTimestamp = 0.0f;
m_isLastEnemyDead = false;
}
else if (m_enemyDeathTimestamp == 0.0f)
{
// note time of death (to allow bots to overshoot for a time)
m_enemyDeathTimestamp = gpGlobals->time;
m_isLastEnemyDead = true;
}
}
}
else
{
m_isEnemyVisible = false;
}
// if we have seen an enemy recently, keep an eye on him if we can
const float seenRecentTime = 3.0f;
if (m_enemy != NULL && GetTimeSinceLastSawEnemy() < seenRecentTime)
{
AimAtEnemy();
}
else
{
StopAiming();
}
// Hack to fire while retreating
// TODO: Encapsulate aiming and firing on enemies separately from current task
if (GetDisposition() == IGNORE_ENEMIES)
{
FireWeaponAtEnemy();
}
if (IsEndOfSafeTime() && IsUsingGrenade() && (IsWellPastSafe() || !IsUsingHEGrenade()) && !m_isWaitingToTossGrenade)
{
Vector target;
if (FindGrenadeTossPathTarget(&target))
{
ThrowGrenade(&target);
}
}
if (IsUsingGrenade())
{
bool doToss = (m_isWaitingToTossGrenade && (m_tossGrenadeTimer.IsElapsed() || m_lookAtSpotState == LOOK_AT_SPOT));
if (doToss)
{
ClearPrimaryAttack();
m_isWaitingToTossGrenade = false;
}
else
{
PrimaryAttack();
}
}
else
{
m_isWaitingToTossGrenade = false;
}
if (IsHunting() && IsWellPastSafe() && IsUsingGrenade())
{
EquipBestWeapon(MUST_EQUIP);
}
// check if our weapon is totally out of ammo
// or if we no longer feel "safe", equip our weapon
if (!IsSafe() && !IsUsingGrenade() && IsActiveWeaponOutOfAmmo())
{
EquipBestWeapon();
}
// TODO: This doesn't work if we are restricted to just knives and sniper rifles because we cant use the rifle at close range
if (!IsSafe() && !IsUsingGrenade() && IsUsingKnife() && !IsEscapingFromBomb())
{
EquipBestWeapon();
}
// if we haven't seen an enemy in awhile, and we switched to our pistol during combat,
// switch back to our primary weapon (if it still has ammo left)
const float safeRearmTime = 5.0f;
if (!IsActiveWeaponReloading() && IsUsingPistol() && !IsPrimaryWeaponEmpty() && GetTimeSinceLastSawEnemy() > safeRearmTime)
{
EquipBestWeapon();
}
// reload our weapon if we must
ReloadCheck();
// equip silencer
SilencerCheck();
// listen to the radio
RespondToRadioCommands();
// make way
const float avoidTime = 0.33f;
if (gpGlobals->time - m_avoidTimestamp < avoidTime && m_avoid != NULL)
{
StrafeAwayFromPosition(&m_avoid->pev->origin);
}
else
{
m_avoid = NULL;
}
if (m_isJumpCrouching)
{
const float duration = 0.75f;
const float crouchDelayTime = 0.05f;
const float standUpTime = 0.6f;
float elapsed = gpGlobals->time - m_jumpCrouchTimestamp;
if (elapsed > crouchDelayTime && elapsed < standUpTime)
Crouch();
if (elapsed >= standUpTime)
StandUp();
if (elapsed > duration)
m_isJumpCrouching = false;
}
// if we're using a sniper rifle and are no longer attacking, stop looking thru scope
if (!IsAtHidingSpot() && !IsAttacking() && IsUsingSniperRifle() && IsUsingScope())
{
SecondaryAttack();
}
// check encounter spots
UpdatePeripheralVision();
// Update gamestate
if (m_bomber != NULL)
GetChatter()->SpottedBomber(GetBomber());
if (CanSeeLooseBomb())
GetChatter()->SpottedLooseBomb(ctrl->GetLooseBomb());
// Scenario interrupts
switch (ctrl->GetScenario())
{
case CCSBotManager::SCENARIO_DEFUSE_BOMB:
{
// flee if the bomb is ready to blow and we aren't defusing it or attacking and we know where the bomb is
// (aggressive players wait until its almost too late)
float gonnaBlowTime = 8.0f - (2.0f * GetProfile()->GetAggression());
// if we have a defuse kit, can wait longer
if (m_bHasDefuser)
gonnaBlowTime *= 0.66f;
if (!IsEscapingFromBomb() // we aren't already escaping the bomb
&& ctrl->IsBombPlanted() // is the bomb planted
&& GetGameState()->IsPlantedBombLocationKnown() // we know where the bomb is
&& ctrl->GetBombTimeLeft() < gonnaBlowTime // is the bomb about to explode
&& !IsDefusingBomb() // we aren't defusing the bomb
&& !IsAttacking()) // we aren't in the midst of a firefight
{
EscapeFromBomb();
break;
}
break;
}
case CCSBotManager::SCENARIO_RESCUE_HOSTAGES:
{
if (m_iTeam == CT)
{
UpdateHostageEscortCount();
}
else
{
// Terrorists have imperfect information on status of hostages
CSGameState::ValidateStatusType status = GetGameState()->ValidateHostagePositions();
if (status & CSGameState::HOSTAGES_ALL_GONE)
{
GetChatter()->HostagesTaken();
Idle();
}
else if (status & CSGameState::HOSTAGE_GONE)
{
GetGameState()->HostageWasTaken();
Idle();
}
}
break;
}
}
// Follow nearby humans if our co-op is high and we have nothing else to do
// If we were just following someone, don't auto-follow again for a short while to
// give us a chance to do something else.
const float earliestAutoFollowTime = 5.0f;
const float minAutoFollowTeamwork = 0.4f;
if (ctrl->GetElapsedRoundTime() > earliestAutoFollowTime
&& GetProfile()->GetTeamwork() > minAutoFollowTeamwork
&& CanAutoFollow()
&& !IsBusy()
&& !IsFollowing()
&& !GetGameState()->IsAtPlantedBombsite())
{
// chance of following is proportional to teamwork attribute
if (GetProfile()->GetTeamwork() > RANDOM_FLOAT(0.0f, 1.0f))
{
CBasePlayer *leader = GetClosestVisibleHumanFriend();
if (leader != NULL && leader->IsAutoFollowAllowed())
{
// count how many bots are already following this player
const float maxFollowCount = 2;
if (GetBotFollowCount(leader) < maxFollowCount)
{
const float autoFollowRange = 300.0f;
if ((leader->pev->origin - pev->origin).IsLengthLessThan(autoFollowRange))
{
CNavArea *leaderArea = TheNavAreaGrid.GetNavArea(&leader->pev->origin);
if (leaderArea != NULL)
{
PathCost cost(this, FASTEST_ROUTE);
float travelRange = NavAreaTravelDistance(GetLastKnownArea(), leaderArea, cost);
if (/*travelRange >= 0.0f &&*/ travelRange < autoFollowRange)
{
// follow this human
Follow(leader);
PrintIfWatched("Auto-Following %s\n", STRING(leader->pev->netname));
if (g_pGameRules->IsCareer())
{
GetChatter()->Say("FollowingCommander", 10.0f);
}
else
{
GetChatter()->Say("FollowingSir", 10.0f);
}
}
}
}
}
}
}
else
{
// we decided not to follow, don't re-check for a duration
m_allowAutoFollowTime = gpGlobals->time + 15.0f + (1.0f - GetProfile()->GetTeamwork()) * 30.0f;
}
}
if (IsFollowing())
{
// if we are following someone, make sure they are still alive
CBaseEntity *leader = m_leader;
if (leader == NULL || !leader->IsAlive())
{
StopFollowing();
}
// decide whether to continue following them
const float highTeamwork = 0.85f;
if (GetProfile()->GetTeamwork() < highTeamwork)
{
float minFollowDuration = 15.0f;
if (GetFollowDuration() > minFollowDuration + 40.0f * GetProfile()->GetTeamwork())
{
// we are bored of following our leader
StopFollowing();
PrintIfWatched("Stopping following - bored\n");
}
}
}
else
{
if (GetMorale() < NEUTRAL && IsSafe() && GetSafeTimeRemaining() < 2.0f && IsHunting())
{
if (GetMorale() * -40.0 > RANDOM_FLOAT(0.0f, 100.0f))
{
if (ctrl->IsOnOffense(this) || !ctrl->IsDefenseRushing())
{
SetDisposition(OPPORTUNITY_FIRE);
Hide(m_lastKnownArea, RANDOM_FLOAT(3.0f, 15.0f));
GetChatter()->Say("WaitingHere");
}
}
}
}
// Execute state machine
if (m_isAttacking)
{
m_attackState.OnUpdate(this);
}
else
{
m_state->OnUpdate(this);
}
if (m_isWaitingToTossGrenade)
{
ResetStuckMonitor();
ClearMovement();
}
// don't move while reloading unless we see an enemy
if (IsReloading() && !m_isEnemyVisible)
{
ResetStuckMonitor();
ClearMovement();
}
// if we get too far ahead of the hostages we are escorting, wait for them
if (!IsAttacking() && m_inhibitWaitingForHostageTimer.IsElapsed())
{
const float waitForHostageRange = 500.0f;
if (GetTask() == RESCUE_HOSTAGES && GetRangeToFarthestEscortedHostage() > waitForHostageRange)
{
if (!m_isWaitingForHostage)
{
// just started waiting
m_isWaitingForHostage = true;
m_waitForHostageTimer.Start(10.0f);
}
else
{
// we've been waiting
if (m_waitForHostageTimer.IsElapsed())
{
// give up waiting for awhile
m_isWaitingForHostage = false;
m_inhibitWaitingForHostageTimer.Start(3.0f);
}
else
{
// keep waiting
ResetStuckMonitor();
ClearMovement();
}
}
}
}
// remember our prior safe time status
m_wasSafe = IsSafe();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
// NavAreaBuildPath<PathCost> hook
bool NavAreaBuildPath__PathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, PathCost &costFunc, CNavArea **closestArea)
{
return NavAreaBuildPath(startArea, goalArea, goalPos, costFunc, closestArea);
}
void CCSBot::Upkeep(void) void CCSBot::Upkeep(void)
{ {
Upkeep_(); Upkeep_();
} }
void CCSBot::Update(void) void CCSBot::Update(void)
{ {
Update_(); Update_();

View File

@ -1036,10 +1036,7 @@ void CCSBot::__MAKE_VHOOK(Blind)(float duration, float holdTime, float fadeTime,
void (*pCCSBot__UpdateLookAngles)(void); void (*pCCSBot__UpdateLookAngles)(void);
void __declspec(naked) CCSBot::UpdateLookAngles(void) void __declspec(naked) CCSBot::UpdateLookAngles(void)
{ {
__asm __asm { jmp pCCSBot__UpdateLookAngles }
{
jmp pCCSBot__UpdateLookAngles
}
} }
void CCSBot::Blind(float duration, float holdTime, float fadeTime, int alpha) void CCSBot::Blind(float duration, float holdTime, float fadeTime, int alpha)

View File

@ -1,35 +1,120 @@
#include "precompiled.h" #include "precompiled.h"
// Begin attacking
/* <519735> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:16 */ /* <519735> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:16 */
NOBODY void AttackState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void AttackState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// { CBasePlayer *enemy = me->GetEnemy();
// class CBasePlayer *enemy; // 18
// float skill; // 105 // store our posture when the attack began
// float dodgeChance; // 108 me->PushPostureContext();
// GetEnemy(CCSBot *const this); // 18 me->DestroyPath();
// PushPostureContext(CBot *const this); // 21
// DestroyPath(CCSBot *const this); // 23 // if we are using a knife, try to sneak up on the enemy
// Invalidate(CountdownTimer *const this); // 34 if (enemy != NULL && me->IsUsingKnife() && !me->IsPlayerFacingMe(enemy))
// { me->Walk();
// float const crouchFarRange; // 63 else
// float crouchChance; // 64 me->Run();
// operator-(const Vector *const this,
// const Vector &v); // 69 me->GetOffLadder();
// IsLengthGreaterThan(const Vector *const this, me->ResetStuckMonitor();
// float length); // 69
// { m_repathTimer.Invalidate();
// TraceResult result; // 77 m_haveSeenEnemy = me->IsEnemyVisible();
// Vector origin; // 79 m_nextDodgeStateTimestamp = 0.0f;
// Vector(Vector *const this, m_firstDodge = true;
// const Vector &v); // 79 m_isEnemyHidden = false;
// } m_reacquireTimestamp = 0.0f;
// }
// } m_pinnedDownTimestamp = gpGlobals->time + RANDOM_FLOAT(7.0f, 10.0f);
m_shieldToggleTimestamp = gpGlobals->time + RANDOM_FLOAT(2.0f, 10.0f);
m_shieldForceOpen = false;
// if we encountered someone while escaping, grab our weapon and fight!
if (me->IsEscapingFromBomb())
me->EquipBestWeapon();
if (me->IsUsingKnife())
{
// can't crouch and hold with a knife
m_crouchAndHold = false;
me->StandUp();
}
else
{
// decide whether to crouch where we are, or run and gun (if we havent already - see CCSBot::Attack())
if (!m_crouchAndHold)
{
if (enemy != NULL)
{
const float crouchFarRange = 750.0f;
float crouchChance;
// more likely to crouch if using sniper rifle or if enemy is far away
if (me->IsUsingSniperRifle())
crouchChance = 50.0f;
else if ((me->pev->origin - enemy->pev->origin).IsLengthGreaterThan(crouchFarRange))
crouchChance = 50.0f;
else
crouchChance = 20.0f * (1.0f - me->GetProfile()->GetAggression());
if (RANDOM_FLOAT(0.0f, 100.0f) < crouchChance)
{
// make sure we can still see if we crouch
TraceResult result;
Vector origin = me->pev->origin;
if (!me->IsCrouching())
{
// we are standing, adjust for lower crouch origin
origin.z -= 20.0f;
}
UTIL_TraceLine(origin, enemy->EyePosition(), ignore_monsters, ignore_glass, ENT(me->pev), &result);
if (result.flFraction == 1.0f)
{
m_crouchAndHold = true;
}
}
}
}
if (m_crouchAndHold)
{
me->Crouch();
me->PrintIfWatched("Crouch and hold attack!\n");
}
}
m_scopeTimestamp = 0;
m_didAmbushCheck = false;
float skill = me->GetProfile()->GetSkill();
// tendency to dodge is proportional to skill
float dodgeChance = 80.0f * skill;
if (me->IsUsingKnife())
{
dodgeChance *= 2.0f;
}
// high skill bots always dodge if outnumbered, or they see a sniper
if (skill > 0.5f && me->IsOutnumbered())
{
dodgeChance = 100.0f;
}
m_dodge = (RANDOM_FLOAT(0.0f, 100.0f) < dodgeChance) != 0;
// decide whether we might bail out of this fight
m_isCoward = (RANDOM_FLOAT(0.0f, 100.0f) > 100.0f * me->GetProfile()->GetAggression());
} }
/* <51a140> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:135 */ /* <51a140> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:135 */
NOBODY void AttackState::StopAttacking(CCSBot *me) void AttackState::StopAttacking(CCSBot *me)
{ {
if (me->m_task == CCSBot::SNIPING) if (me->m_task == CCSBot::SNIPING)
{ {
@ -42,120 +127,440 @@ NOBODY void AttackState::StopAttacking(CCSBot *me)
} }
} }
// Perform attack behavior
/* <51997e> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:152 */ /* <51997e> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:152 */
NOBODY void AttackState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void AttackState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { // can't be stuck while attacking
// class CBasePlayerWeapon *weapon; // 161 me->ResetStuckMonitor();
// class CBasePlayer *enemy; // 173 me->StopRapidFire();
// float notSeenEnemyTime; // 368
// float chaseTime; // 444 CBasePlayerWeapon *weapon = me->GetActiveWeapon();
// float const hurtRecentlyTime; // 474 if (weapon != NULL)
// StopRapidFire(CCSBot *const this); // 158 {
// GetEnemy(CCSBot *const this); // 173 if (weapon->m_iId == WEAPON_C4 ||
// IsElapsed(const class CountdownTimer *const this); // 189 weapon->m_iId == WEAPON_HEGRENADE ||
// { weapon->m_iId == WEAPON_FLASHBANG ||
// bool isPinnedDown; // 198 weapon->m_iId == WEAPON_SMOKEGRENADE)
// Start(CountdownTimer *const this, {
// float duration); // 210 me->EquipBestWeapon();
// } }
// { }
// bool repath; // 252
// ForceRun(CCSBot *const this, CBasePlayer *enemy = me->GetEnemy();
// float duration); // 240 if (enemy == NULL)
// Hurry(CCSBot *const this, {
// float duration); // 241 StopAttacking(me);
// { return;
// float const repathRange; // 255 }
// operator-(const Vector *const this,
// const Vector &v); // 256 // keep track of whether we have seen our enemy at least once yet
// IsLengthGreaterThan(const Vector *const this, if (!m_haveSeenEnemy)
// float length); // 256 m_haveSeenEnemy = me->IsEnemyVisible();
// }
// IsElapsed(const class CountdownTimer *const this); // 264 // Retreat check
// DestroyPath(CCSBot *const this); // 272 // Do not retreat if the enemy is too close
// Start(CountdownTimer *const this, if (m_retreatTimer.IsElapsed())
// float duration); // 267 {
// } // If we've been fighting this battle for awhile, we're "pinned down" and
// IsReloading(CBasePlayer *const this); // 286 // need to do something else.
// IsProtectedByShield(CBasePlayer *const this); // 289 // If we are outnumbered, retreat.
// { bool isPinnedDown = (gpGlobals->time > m_pinnedDownTimestamp);
// float const sniperMinRange; // 320
// operator-(const Vector *const this, if (isPinnedDown ||
// const Vector &v); // 321 (me->IsOutnumbered() && m_isCoward) ||
// IsLengthLessThan(const Vector *const this, (me->OutnumberedCount() >= 2 && me->GetProfile()->GetAggression() < 1.0f))
// float length); // 321 {
// } // tell our teammates our plight
// { if (isPinnedDown)
// float const shotgunMaxRange; // 327 me->GetChatter()->PinnedDown();
// operator-(const Vector *const this, else
// const Vector &v); // 328 me->GetChatter()->Scared();
// IsLengthGreaterThan(const Vector *const this,
// float length); // 328 m_retreatTimer.Start(RANDOM_FLOAT(3.0f, 15.0f));
// }
// { // try to retreat
// Vector toAimSpot3D; // 342 if (me->TryToRetreat())
// float targetRange; // 343 {
// float const waitScopeTime; // 349 // if we are a sniper, equip our pistol so we can fire while retreating
// operator-(const Vector *const this, if (me->IsUsingSniperRifle())
// const Vector &v); // 342 {
// Length(const Vector *const this); // 343 me->EquipPistol();
// GetZoomLevel(const class CCSBot *const this); // 346 }
// } }
// IsProtectedByShield(CBasePlayer *const this); // 295 else
// IsProtectedByShield(CBasePlayer *const this); // 302 {
// IsAwareOfEnemyDeath(const class CCSBot *const this); // 358 me->PrintIfWatched("I want to retreat, but no safe spots nearby!\n");
// { }
// float hideChance; // 397 }
// { }
// float ambushTime; // 401
// const Vector *spot; // 405 // Knife fighting
// } // We need to pathfind right to the enemy to cut him
// } if (me->IsUsingKnife())
// StopAttacking(AttackState *const this, {
// class CCSBot *me); // 424 // can't crouch and hold with a knife
// StopAttacking(AttackState *const this, m_crouchAndHold = false;
// class CCSBot *me); // 377 me->StandUp();
// GetNoisePosition(const class CCSBot *const this); // 378
// SetTask(CCSBot *const this, // if we are using a knife and our prey is looking towards us, run at him
// enum TaskType task, if (me->IsPlayerFacingMe(enemy))
// class CBaseEntity *entity); // 465 {
// entindex(CBaseEntity *const this); // 361 me->ForceRun(5.0f);
// { me->Hurry(10.0f);
// Vector toEnemy; // 508 }
// float range; // 509 else
// float const hysterisRange; // 511 {
// float minRange; // 513 me->Walk();
// float maxRange; // 514 }
// float const dodgeRange; // 526
// operator-(const Vector *const this, // slash our victim
// const Vector &v); // 508 me->FireWeaponAtEnemy();
// Length2D(const Vector *const this); // 509
// { // if our victim has moved, repath
// int next; // 534 bool repath = false;
// { if (me->HasPath())
// float const jumpChance; // 540 {
// IsNotMoving(const class CCSBot *const this); // 541 const float repathRange = 100.0f;
// } if ((me->GetPathEndpoint() - enemy->pev->origin).IsLengthGreaterThan(repathRange))
// } {
// } repath = true;
// GetTimeSinceAttacked(const class CCSBot *const this); // 476 }
// GetEnemy(CCSBot *const this); // 478 }
// StopAttacking(AttackState *const this, else
// class CCSBot *me); // 459 {
// GetNearbyEnemyCount(const class CCSBot *const this); // 361 repath = true;
// entindex(CBaseEntity *const this); // 362 }
// }
if (repath && m_repathTimer.IsElapsed())
{
me->ComputePath(TheNavAreaGrid.GetNearestNavArea(&enemy->pev->origin), &enemy->pev->origin, FASTEST_ROUTE);
const float repathInterval = 0.5f;
m_repathTimer.Start(repathInterval);
}
// move towards victim
if (me->UpdatePathMovement(NO_SPEED_CHANGE) != CCSBot::PROGRESSING)
{
me->DestroyPath();
}
return;
}
// Simple shield usage
if (me->HasShield())
{
if (me->IsEnemyVisible() && !m_shieldForceOpen)
{
if (!me->IsRecognizedEnemyReloading() && !me->IsReloading() && me->IsPlayerLookingAtMe(enemy))
{
// close up - enemy is pointing his gun at us
if (!me->IsProtectedByShield())
me->SecondaryAttack();
}
else
{
// enemy looking away or reloading his weapon - open up and shoot him
if (me->IsProtectedByShield())
me->SecondaryAttack();
}
}
else
{
// can't see enemy, open up
if (me->IsProtectedByShield())
me->SecondaryAttack();
}
if (gpGlobals->time > m_shieldToggleTimestamp)
{
m_shieldToggleTimestamp = gpGlobals->time + RANDOM_FLOAT(0.5, 2.0f);
// toggle shield force open
m_shieldForceOpen = !m_shieldForceOpen;
}
}
// check if our weapon range is bad and we should switch to pistol
if (me->IsUsingSniperRifle())
{
// if we have a sniper rifle and our enemy is too close, switch to pistol
// NOTE: Must be larger than NO_ZOOM range in AdjustZoom()
const float sniperMinRange = 310.0f;
if ((enemy->pev->origin - me->pev->origin).IsLengthLessThan(sniperMinRange))
me->EquipPistol();
}
else if (me->IsUsingShotgun())
{
// if we have a shotgun equipped and enemy is too far away, switch to pistol
const float shotgunMaxRange = 1000.0f;
if ((enemy->pev->origin - me->pev->origin).IsLengthGreaterThan(shotgunMaxRange))
me->EquipPistol();
}
// if we're sniping, look through the scope - need to do this here in case a reload resets our scope
if (me->IsUsingSniperRifle())
{
// for Scouts and AWPs, we need to wait for zoom to resume
if (me->m_bResumeZoom)
{
m_scopeTimestamp = gpGlobals->time;
return;
}
Vector toAimSpot3D = me->m_aimSpot - me->pev->origin;
float targetRange = toAimSpot3D.Length();
// dont adjust zoom level if we're already zoomed in - just fire
if (me->GetZoomLevel() == CCSBot::NO_ZOOM && me->AdjustZoom(targetRange))
m_scopeTimestamp = gpGlobals->time;
const float waitScopeTime = 0.2f + me->GetProfile()->GetReactionTime();
if (gpGlobals->time - m_scopeTimestamp < waitScopeTime)
{
// force us to wait until zoomed in before firing
return;
}
}
// see if we "notice" that our prey is dead
if (me->IsAwareOfEnemyDeath())
{
// let team know if we killed the last enemy
if (me->GetLastVictimID() == enemy->entindex() && me->GetNearbyEnemyCount() <= 1)
{
me->GetChatter()->KilledMyEnemy(enemy->entindex());
}
StopAttacking(me);
return;
}
float notSeenEnemyTime = gpGlobals->time - me->GetLastSawEnemyTimestamp();
// if we haven't seen our enemy for a moment, continue on if we dont want to fight, or decide to ambush if we do
if (!me->IsEnemyVisible())
{
// attend to nearby enemy gunfire
if (notSeenEnemyTime > 0.5f && me->CanHearNearbyEnemyGunfire())
{
// give up the attack, since we didn't want it in the first place
StopAttacking(me);
me->SetLookAt("Nearby enemy gunfire", me->GetNoisePosition(), PRIORITY_HIGH, 0.0f);
me->PrintIfWatched("Checking nearby threatening enemy gunfire!\n");
return;
}
// check if we have lost track of our enemy during combat
if (notSeenEnemyTime > 0.25f)
{
m_isEnemyHidden = true;
}
if (notSeenEnemyTime > 0.1f)
{
if (me->GetDisposition() == CCSBot::ENGAGE_AND_INVESTIGATE)
{
// decide whether we should hide and "ambush" our enemy
if (m_haveSeenEnemy && !m_didAmbushCheck)
{
const float hideChance = 33.3f;
if (RANDOM_FLOAT(0.0, 100.0f) < hideChance)
{
float ambushTime = RANDOM_FLOAT(3.0f, 15.0f);
// hide in ambush nearby
// TODO: look towards where we know enemy is
const Vector *spot = FindNearbyRetreatSpot(me, 200.0f);
if (spot != NULL)
{
me->IgnoreEnemies(1.0f);
me->Run();
me->StandUp();
me->Hide(spot, ambushTime, true);
return;
}
}
// don't check again
m_didAmbushCheck = true;
}
}
else
{
// give up the attack, since we didn't want it in the first place
StopAttacking(me);
return;
}
}
}
else
{
// we can see the enemy again - reset our ambush check
m_didAmbushCheck = false;
// if the enemy is coming out of hiding, we need time to react
if (m_isEnemyHidden)
{
m_reacquireTimestamp = gpGlobals->time + me->GetProfile()->GetReactionTime();
m_isEnemyHidden = false;
}
}
// if we haven't seen our enemy for a long time, chase after them
float chaseTime = 2.0f + 2.0f * (1.0f - me->GetProfile()->GetAggression());
// if we are sniping, be very patient
if (me->IsUsingSniperRifle())
chaseTime += 3.0f;
// if we are crouching, be a little patient
else if (me->IsCrouching())
chaseTime += 1.0f;
// if we can't see the enemy, and have either seen him but currently lost sight of him,
// or haven't yet seen him, chase after him (unless we are a sniper)
if (!me->IsEnemyVisible() && (notSeenEnemyTime > chaseTime || !m_haveSeenEnemy))
{
// snipers don't chase their prey - they wait for their prey to come to them
if (me->GetTask() == CCSBot::SNIPING)
{
StopAttacking(me);
return;
}
else
{
// move to last known position of enemy
me->SetTask(CCSBot::MOVE_TO_LAST_KNOWN_ENEMY_POSITION, enemy);
me->MoveTo(&me->GetLastKnownEnemyPosition());
return;
}
}
// if we can't see our enemy at the moment, and were shot by
// a different visible enemy, engage them instead
const float hurtRecentlyTime = 3.0f;
if (!me->IsEnemyVisible() &&
me->GetTimeSinceAttacked() < hurtRecentlyTime &&
me->GetAttacker() != NULL &&
me->GetAttacker() != me->GetEnemy())
{
// if we can see them, attack, otherwise panic
if (me->IsVisible(me->GetAttacker(), CHECK_FOV))
{
me->Attack(me->GetAttacker());
me->PrintIfWatched("Switching targets to retaliate against new attacker!\n");
}
return;
}
if (gpGlobals->time > m_reacquireTimestamp)
me->FireWeaponAtEnemy();
// do dodge behavior
// If sniping or crouching, stand still.
if (m_dodge && !me->IsUsingSniperRifle() && !m_crouchAndHold)
{
Vector toEnemy = enemy->pev->origin - me->pev->origin;
float range = toEnemy.Length2D();
const float hysterisRange = 125.0f; // (+/-) m_combatRange
float minRange = me->GetCombatRange() - hysterisRange;
float maxRange = me->GetCombatRange() + hysterisRange;
// move towards (or away from) enemy if we are using a knife, behind a corner, or we aren't very skilled
if (me->GetProfile()->GetSkill() < 0.66f || !me->IsEnemyVisible())
{
if (range > maxRange)
me->MoveForward();
else if (range < minRange)
me->MoveBackward();
}
// don't dodge if enemy is facing away
const float dodgeRange = 2000.0f;
if (range > dodgeRange || !me->IsPlayerFacingMe(enemy))
{
m_dodgeState = STEADY_ON;
m_nextDodgeStateTimestamp = 0.0f;
}
else if (gpGlobals->time >= m_nextDodgeStateTimestamp)
{
int next;
// select next dodge state that is different that our current one
do
{
// high-skill bots may jump when first engaging the enemy (if they are moving)
const float jumpChance = 33.3f;
if (m_firstDodge && me->GetProfile()->GetSkill() > 0.5f && RANDOM_FLOAT(0, 100) < jumpChance && !me->IsNotMoving())
next = RANDOM_LONG(0, NUM_ATTACK_STATES - 1);
else
next = RANDOM_LONG(0, NUM_ATTACK_STATES - 2);
}
while (!m_firstDodge && next == m_dodgeState);
m_dodgeState = (DodgeStateType)next;
m_nextDodgeStateTimestamp = gpGlobals->time + RANDOM_FLOAT(0.3f, 1.0f);
m_firstDodge = false;
}
switch (m_dodgeState)
{
case STEADY_ON:
{
break;
}
case SLIDE_LEFT:
{
me->StrafeLeft();
break;
}
case SLIDE_RIGHT:
{
me->StrafeRight();
break;
}
case JUMP:
{
if (me->m_isEnemyVisible)
{
me->Jump();
}
break;
}
}
}
} }
// Finish attack
/* <5198d4> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:578 */ /* <5198d4> ../cstrike/dlls/bot/states/cs_bot_attack.cpp:578 */
NOBODY void AttackState::__MAKE_VHOOK(OnExit)(CCSBot *me) void AttackState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
// ForgetNoise(CCSBot *const this); // 585 me->PrintIfWatched("AttackState:OnExit()\n");
// PopPostureContext(CBot *const this); // 589
// IsProtectedByShield(CBasePlayer *const this); // 592 m_crouchAndHold = false;
// StopRapidFire(CCSBot *const this); // 597
// ClearSurpriseDelay(CCSBot *const this); // 598 // clear any noises we heard during battle
me->ForgetNoise();
me->ResetStuckMonitor();
// resume our original posture
me->PopPostureContext();
// put shield away
if (me->IsProtectedByShield())
me->SecondaryAttack();
me->StopRapidFire();
me->ClearSurpriseDelay();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,91 +1,525 @@
#include "precompiled.h" #include "precompiled.h"
/* <5291fd> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:18 */ /* <5291fd> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:18 */
NOBODY bool HasDefaultPistol(CCSBot *me) bool HasDefaultPistol(CCSBot *me)
{ {
CBasePlayerWeapon *pistol = static_cast<CBasePlayerWeapon *>(me->m_rgpPlayerItems[ PISTOL_SLOT ]);
if (pistol == NULL)
return false;
if (me->m_iTeam == TERRORIST && pistol->m_iId == WEAPON_GLOCK18)
return true;
if (me->m_iTeam == CT && pistol->m_iId == WEAPON_USP)
return true;
return false;
} }
// Buy weapons, armor, etc.
/* <5299e4> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:37 */ /* <5299e4> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:37 */
NOBODY void BuyState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void BuyState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// { CCSBotManager *ctrl = TheCSBots();
// class CCSBotManager *ctrl; // 48
// { m_retries = 0;
// float const buyDefuseKitChance; // 60 m_prefRetries = 0;
// } m_prefIndex = 0;
// HasDefaultPistol(CCSBot *me); // 93
// AllowShotguns(const class CCSBotManager *const this); // 96 m_doneBuying = false;
// } m_isInitialDelay = true;
// this will force us to stop holding live grenade
me->EquipBestWeapon();
m_buyDefuseKit = false;
m_buyShield = false;
if (me->m_iTeam == CT)
{
if (ctrl->GetScenario() == CCSBotManager::SCENARIO_DEFUSE_BOMB)
{
// CT's sometimes buy defuse kits in the bomb scenario (except in career mode, where the player should defuse)
if (g_pGameRules->IsCareer() == false)
{
const float buyDefuseKitChance = 50.0f; // 100.0f * (me->GetProfile()->GetSkill() + 0.2f);
if (RANDOM_FLOAT(0.0f, 100.0f) < buyDefuseKitChance)
{
m_buyDefuseKit = true;
}
}
}
// determine if we want a tactical shield
if (!me->m_bHasPrimary && ctrl->AllowTacticalShield())
{
if (me->m_iAccount > 2500)
{
if (me->m_iAccount < 4000)
m_buyShield = (RANDOM_FLOAT(0, 100.0f) < 33.3f) ? true : false;
else
m_buyShield = (RANDOM_FLOAT(0, 100.0f) < 10.0f) ? true : false;
}
}
}
if (ctrl->AllowGrenades())
{
m_buyGrenade = (RANDOM_FLOAT(0.0f, 100.0f) < 33.3f) ? true : false;
}
else
{
m_buyGrenade = false;
}
m_buyPistol = false;
if (ctrl->AllowPistols())
{
CBasePlayerWeapon *pistol = static_cast<CBasePlayerWeapon *>(me->m_rgpPlayerItems[ PISTOL_SLOT ]);
// check if we have a pistol
if (pistol != NULL)
{
// if we have our default pistol, think about buying a different one
if (HasDefaultPistol(me))
{
// if everything other than pistols is disallowed, buy a pistol
if (ctrl->AllowShotguns() == false &&
ctrl->AllowSubMachineGuns() == false &&
ctrl->AllowRifles() == false &&
ctrl->AllowMachineGuns() == false &&
ctrl->AllowTacticalShield() == false &&
ctrl->AllowSnipers() == false)
{
m_buyPistol = (RANDOM_FLOAT(0, 100) < 75.0f);
}
else if (me->m_iAccount < 1000)
{
// if we're low on cash, buy a pistol
m_buyPistol = (RANDOM_FLOAT(0, 100) < 75.0f);
}
else
{
m_buyPistol = (RANDOM_FLOAT(0, 100) < 33.3f);
}
}
}
else
{
// we dont have a pistol - buy one
m_buyPistol = true;
}
}
} }
/* <52972b> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:212 */ enum WeaponType
NOBODY inline WeaponType GetWeaponType(const char *alias)
{ {
// { PISTOL,
// int i; // 214 SHOTGUN,
// } SUB_MACHINE_GUN,
RIFLE,
MACHINE_GUN,
SNIPER_RIFLE,
GRENADE,
NUM_WEAPON_TYPES,
};
struct BuyInfo
{
WeaponType type;
bool preferred; // more challenging bots prefer these weapons
char *buyAlias; // the buy alias for this equipment
};
// These tables MUST be kept in sync with the CT and T buy aliases
#ifndef HOOK_GAMEDLL
static BuyInfo primaryWeaponBuyInfoCT[ PRIMARY_WEAPON_BUY_COUNT ] =
{
{ SHOTGUN, false, "m3" }, // WEAPON_M3
{ SHOTGUN, false, "xm1014" }, // WEAPON_XM1014
{ SUB_MACHINE_GUN, false, "tmp" }, // WEAPON_TMP
{ SUB_MACHINE_GUN, false, "mp5" }, // WEAPON_MP5N
{ SUB_MACHINE_GUN, false, "ump45" }, // WEAPON_UMP45
{ SUB_MACHINE_GUN, false, "p90" }, // WEAPON_P90
{ RIFLE, true, "famas" }, // WEAPON_FAMAS
{ SNIPER_RIFLE, false, "scout" }, // WEAPON_SCOUT
{ RIFLE, true, "m4a1" }, // WEAPON_M4A1
{ RIFLE, false, "aug" }, // WEAPON_AUG
{ SNIPER_RIFLE, true, "sg550" }, // WEAPON_SG550
{ SNIPER_RIFLE, true, "awp" }, // WEAPON_AWP
{ MACHINE_GUN, false, "m249" } // WEAPON_M249
};
static BuyInfo secondaryWeaponBuyInfoCT[ SECONDARY_WEAPON_BUY_COUNT ] =
{
// { PISTOL, false, "glock" },
// { PISTOL, false, "usp" },
{ PISTOL, true, "p228" },
{ PISTOL, true, "deagle" },
{ PISTOL, true, "fn57" }
};
static BuyInfo primaryWeaponBuyInfoT[ PRIMARY_WEAPON_BUY_COUNT ] =
{
{ SHOTGUN, false, "m3" }, // WEAPON_M3
{ SHOTGUN, false, "xm1014" }, // WEAPON_XM1014
{ SUB_MACHINE_GUN, false, "mac10" }, // WEAPON_MAC10
{ SUB_MACHINE_GUN, false, "mp5" }, // WEAPON_MP5N
{ SUB_MACHINE_GUN, false, "ump45" }, // WEAPON_UMP45
{ SUB_MACHINE_GUN, false, "p90" }, // WEAPON_P90
{ RIFLE, true, "galil" }, // WEAPON_GALIL
{ RIFLE, true, "ak47" }, // WEAPON_AK47
{ SNIPER_RIFLE, false, "scout" }, // WEAPON_SCOUT
{ RIFLE, true, "sg552" }, // WEAPON_SG552
{ SNIPER_RIFLE, true, "awp" }, // WEAPON_AWP
{ SNIPER_RIFLE, true, "g3sg1" }, // WEAPON_G3SG1
{ MACHINE_GUN, false, "m249" } // WEAPON_M249
};
static BuyInfo secondaryWeaponBuyInfoT[ SECONDARY_WEAPON_BUY_COUNT ] =
{
// { PISTOL, false, "glock" },
// { PISTOL, false, "usp" },
{ PISTOL, true, "p228" },
{ PISTOL, true, "deagle" },
{ PISTOL, true, "elites" }
};
#else // HOOK_GAMEDLL
BuyInfo primaryWeaponBuyInfoCT[ PRIMARY_WEAPON_BUY_COUNT ];
BuyInfo secondaryWeaponBuyInfoCT[ SECONDARY_WEAPON_BUY_COUNT];
BuyInfo primaryWeaponBuyInfoT[ PRIMARY_WEAPON_BUY_COUNT ];
BuyInfo secondaryWeaponBuyInfoT[ SECONDARY_WEAPON_BUY_COUNT ];
#endif // HOOK_GAMEDLL
// Given a weapon alias, return the kind of weapon it is
/* <52972b> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:212 */
inline WeaponType GetWeaponType(const char *alias)
{
int i;
for (i = 0; i < PRIMARY_WEAPON_BUY_COUNT; ++i)
{
if (!Q_stricmp(alias, primaryWeaponBuyInfoCT[i].buyAlias))
return primaryWeaponBuyInfoCT[i].type;
if (!Q_stricmp(alias, primaryWeaponBuyInfoT[i].buyAlias))
return primaryWeaponBuyInfoT[i].type;
}
for (i = 0; i < SECONDARY_WEAPON_BUY_COUNT; ++i)
{
if (!Q_stricmp(alias, secondaryWeaponBuyInfoCT[i].buyAlias))
return secondaryWeaponBuyInfoCT[i].type;
if (!Q_stricmp(alias, secondaryWeaponBuyInfoT[i].buyAlias))
return secondaryWeaponBuyInfoT[i].type;
}
return NUM_WEAPON_TYPES;
} }
/* <529753> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:241 */ /* <529753> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:241 */
NOBODY void BuyState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void BuyState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { // wait for a Navigation Mesh
// bool inBuyZone; // 273 if (!TheNavAreaList.size())
// class CCSBotManager *ctrl; // 288 return;
// {
// float const waitToBuyTime; // 257 // apparently we cant buy things in the first few seconds, so wait a bit
// } if (m_isInitialDelay)
// { {
// bool isPreferredAllDisallowed; // 295 const float waitToBuyTime = 2.0f; // 0.25f;
// { if (gpGlobals->time - me->GetStateTimestamp() < waitToBuyTime)
// int const maxPrefRetries; // 301 return;
// int weaponPreference; // 310
// class CBasePlayerWeapon *weapon; // 313 m_isInitialDelay = false;
// const char *buyAlias; // 328 }
// {
// enum WeaponType type; // 338 // if we're done buying and still in the freeze period, wait
// GetWeaponType(const char *alias); // 338 if (m_doneBuying)
// } {
// GetWeaponPreference(const class BotProfile *const this, if (g_pGameRules->IsMultiplayer() && g_pGameRules->IsFreezePeriod())
// int i); // 310 return;
// }
// { me->Idle();
// class BuyInfo *masterPrimary; // 400 //return;
// class BuyInfo *stockPrimary; // 401 }
// int stockPrimaryCount; // 402
// float const sniperRifleChance; // 405 // is the bot spawned outside of a buy zone?
// bool wantSniper; // 406 if (!(me->m_signals.GetState() & SIGNAL_BUY))
// { {
// int i; // 408 m_doneBuying = true;
// AllowShotguns(const class CCSBotManager *const this); // 410 UTIL_DPrintf("%s bot spawned outside of a buy zone (%d, %d, %d)\n", (me->m_iTeam == CT) ? "CT" : "Terrorist", me->pev->origin.x, me->pev->origin.y, me->pev->origin.z);
// AllowSubMachineGuns(const class CCSBotManager *const this); // 411 return;
// AllowRifles(const class CCSBotManager *const this); // 412 }
// AllowSnipers(const class CCSBotManager *const this); // 413
// } CCSBotManager *ctrl = TheCSBots();
// {
// int which; // 423 // try to buy some weapons
// GetDifficultyLevel(void); // 426 const float buyInterval = 0.2f; // 0.02f
// { if (gpGlobals->time - me->GetStateTimestamp() > buyInterval)
// int prefCount; // 429 {
// { me->m_stateTimestamp = gpGlobals->time;
// int whichPref;// 436
// } bool isPreferredAllDisallowed = true;
// }
// } // try to buy our preferred weapons first
// } if (m_prefIndex < me->GetProfile()->GetWeaponPreferenceCount())
// { {
// int which; // 479 // need to retry because sometimes first buy fails??
// } const int maxPrefRetries = 2;
// { if (m_prefRetries >= maxPrefRetries)
// float rnd; // 500 {
// } // try to buy next preferred weapon
// } ++m_prefIndex;
// } m_prefRetries = 0;
return;
}
int weaponPreference = me->GetProfile()->GetWeaponPreference(m_prefIndex);
// don't buy it again if we still have one from last round
CBasePlayerWeapon *weapon = me->GetActiveWeapon();
if (weapon != NULL && weapon->m_iId == weaponPreference)
{
// done with buying preferred weapon
m_prefIndex = 9999;
return;
}
if (me->HasShield() && weaponPreference == WEAPON_SHIELDGUN)
{
// done with buying preferred weapon
m_prefIndex = 9999;
return;
}
const char *buyAlias = NULL;
if (weaponPreference == WEAPON_SHIELDGUN)
{
if (ctrl->AllowTacticalShield())
buyAlias = "shield";
}
else
{
buyAlias = WeaponIDToAlias(weaponPreference);
WeaponType type = GetWeaponType(buyAlias);
switch (type)
{
case PISTOL:
if (!ctrl->AllowPistols())
buyAlias = NULL;
break;
case SHOTGUN:
if (!ctrl->AllowShotguns())
buyAlias = NULL;
break;
case SUB_MACHINE_GUN:
if (!ctrl->AllowSubMachineGuns())
buyAlias = NULL;
break;
case RIFLE:
if (!ctrl->AllowRifles())
buyAlias = NULL;
break;
case MACHINE_GUN:
if (!ctrl->AllowMachineGuns())
buyAlias = NULL;
break;
case SNIPER_RIFLE:
if (!ctrl->AllowSnipers())
buyAlias = NULL;
break;
}
}
if (buyAlias)
{
me->ClientCommand(buyAlias);
me->PrintIfWatched("Tried to buy preferred weapon %s.\n", buyAlias);
isPreferredAllDisallowed = false;
}
++m_prefRetries;
// bail out so we dont waste money on other equipment
// unless everything we prefer has been disallowed, then buy at random
if (isPreferredAllDisallowed == false)
return;
}
// if we have no preferred primary weapon (or everything we want is disallowed), buy at random
if (!me->m_bHasPrimary && (isPreferredAllDisallowed || !me->GetProfile()->HasPrimaryPreference()))
{
if (m_buyShield)
{
// buy a shield
me->ClientCommand("shield");
me->PrintIfWatched("Tried to buy a shield.\n");
}
else
{
// build list of allowable weapons to buy
BuyInfo *masterPrimary = (me->m_iTeam == TERRORIST) ? primaryWeaponBuyInfoT : primaryWeaponBuyInfoCT;
BuyInfo *stockPrimary[ PRIMARY_WEAPON_BUY_COUNT ];
int stockPrimaryCount = 0;
// dont choose sniper rifles as often
const float sniperRifleChance = 50.0f;
bool wantSniper = (RANDOM_FLOAT(0, 100) < sniperRifleChance) ? true : false;
for (int i = 0; i < PRIMARY_WEAPON_BUY_COUNT; ++i)
{
if ((masterPrimary[i].type == SHOTGUN && ctrl->AllowShotguns()) ||
(masterPrimary[i].type == SUB_MACHINE_GUN && ctrl->AllowSubMachineGuns()) ||
(masterPrimary[i].type == RIFLE && ctrl->AllowRifles()) ||
(masterPrimary[i].type == SNIPER_RIFLE && ctrl->AllowSnipers() && wantSniper) ||
(masterPrimary[i].type == MACHINE_GUN && ctrl->AllowMachineGuns()))
{
stockPrimary[ stockPrimaryCount++ ] = &masterPrimary[i];
}
}
if (stockPrimaryCount)
{
// buy primary weapon if we don't have one
int which;
// on hard difficulty levels, bots try to buy preferred weapons on the first pass
if (m_retries == 0 && ctrl->GetDifficultyLevel() >= BOT_HARD)
{
// count up available preferred weapons
int prefCount = 0;
for (which = 0; which < stockPrimaryCount; ++which)
{
if (stockPrimary[which]->preferred)
++prefCount;
}
if (prefCount)
{
int whichPref = RANDOM_LONG(0, prefCount - 1);
for (which = 0; which < stockPrimaryCount; ++which)
{
if (stockPrimary[which]->preferred && whichPref-- == 0)
break;
}
}
else
{
// no preferred weapons available, just pick randomly
which = RANDOM_LONG(0, stockPrimaryCount - 1);
}
}
else
{
which = RANDOM_LONG(0, stockPrimaryCount - 1);
}
me->ClientCommand(stockPrimary[ which ]->buyAlias);
me->PrintIfWatched("Tried to buy %s.\n", stockPrimary[ which ]->buyAlias);
}
}
}
// If we now have a weapon, or have tried for too long, we're done
if (me->m_bHasPrimary || m_retries++ > 5)
{
// primary ammo
if (me->m_bHasPrimary)
{
me->ClientCommand("primammo");
}
// buy armor last, to make sure we bought a weapon first
me->ClientCommand("vesthelm");
me->ClientCommand("vest");
// pistols - if we have no preferred pistol, buy at random
if (ctrl->AllowPistols() && !me->GetProfile()->HasPistolPreference())
{
if (m_buyPistol)
{
int which = RANDOM_LONG(0, SECONDARY_WEAPON_BUY_COUNT - 1);
if (me->m_iTeam == TERRORIST)
me->ClientCommand(secondaryWeaponBuyInfoT[ which ].buyAlias);
else
me->ClientCommand(secondaryWeaponBuyInfoCT[ which ].buyAlias);
// only buy one pistol
m_buyPistol = false;
}
me->ClientCommand("secammo");
}
// buy a grenade if we wish, and we don't already have one
if (m_buyGrenade && !me->HasGrenade())
{
if (UTIL_IsTeamAllBots(me->m_iTeam))
{
// only allow Flashbangs if everyone on the team is a bot (dont want to blind our friendly humans)
float rnd = RANDOM_FLOAT(0, 100);
if (rnd < 10.0f)
{
// smoke grenade
me->ClientCommand("sgren");
}
else if (rnd < 35.0f)
{
// flashbang
me->ClientCommand("flash");
}
else
{
// he grenade
me->ClientCommand("hegren");
}
}
else
{
if (RANDOM_FLOAT(0, 100) < 10.0f)
{
// smoke grenade
me->ClientCommand("sgren");
}
else
{
// he grenade
me->ClientCommand("hegren");
}
}
}
if (m_buyDefuseKit)
{
me->ClientCommand("defuser");
}
m_doneBuying = true;
}
}
} }
/* <5296f1> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:529 */ /* <5296f1> ../cstrike/dlls/bot/states/cs_bot_buy.cpp:529 */
NOBODY void BuyState::__MAKE_VHOOK(OnExit)(CCSBot *me) void BuyState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
me->ResetStuckMonitor();
me->EquipBestWeapon();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,30 +1,70 @@
#include "precompiled.h" #include "precompiled.h"
// Begin defusing the bomb
/* <539f0e> ../cstrike/dlls/bot/states/cs_bot_defuse_bomb.cpp:16 */ /* <539f0e> ../cstrike/dlls/bot/states/cs_bot_defuse_bomb.cpp:16 */
NOBODY void DefuseBombState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void DefuseBombState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// Say(BotChatterInterface *const this, me->Crouch();
// const char *phraseName, me->SetDisposition(CCSBot::SELF_DEFENSE);
// float lifetime, me->GetChatter()->Say("DefusingBomb");
// float delay); // 20
} }
// Defuse the bomb
/* <539eac> ../cstrike/dlls/bot/states/cs_bot_defuse_bomb.cpp:27 */ /* <539eac> ../cstrike/dlls/bot/states/cs_bot_defuse_bomb.cpp:27 */
NOBODY void DefuseBombState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void DefuseBombState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { const Vector *bombPos = me->GetGameState()->GetBombPosition();
// const Vector *bombPos; // 29 CCSBotManager *ctrl = TheCSBots();
// class CCSBotManager *ctrl; // 44
// } if (bombPos == NULL)
{
me->PrintIfWatched("In Defuse state, but don't know where the bomb is!\n");
me->Idle();
return;
}
// look at the bomb
me->SetLookAt("Defuse bomb", bombPos, PRIORITY_HIGH);
// defuse...
me->UseEnvironment();
if (gpGlobals->time - me->GetStateTimestamp() > 1.0f)
{
// if we missed starting the defuse, give up
if (ctrl->GetBombDefuser() == NULL)
{
me->PrintIfWatched("Failed to start defuse, giving up\n");
me->Idle();
return;
}
else if (ctrl->GetBombDefuser() != me)
{
// if someone else got the defuse, give up
me->PrintIfWatched("Someone else started defusing, giving up\n");
me->Idle();
return;
}
}
// if bomb has been defused, give up
if (!ctrl->IsBombPlanted())
{
me->Idle();
return;
}
} }
/* <539e36> ../cstrike/dlls/bot/states/cs_bot_defuse_bomb.cpp:73 */ /* <539e36> ../cstrike/dlls/bot/states/cs_bot_defuse_bomb.cpp:73 */
NOBODY void DefuseBombState::__MAKE_VHOOK(OnExit)(CCSBot *me) void DefuseBombState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
// SetTask(CCSBot *const this, me->StandUp();
// enum TaskType task, me->ResetStuckMonitor();
// class CBaseEntity *entity); // 77 me->SetTask(CCSBot::SEEK_AND_DESTROY);
// ClearLookAt(CCSBot *const this); // 79 me->SetDisposition(CCSBot::ENGAGE_AND_INVESTIGATE);
me->ClearLookAt();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,28 +1,49 @@
#include "precompiled.h" #include "precompiled.h"
/* <5499ae> ../cstrike/dlls/bot/states/cs_bot_escape_from_bomb.cpp:16 */ /* <5499ae> ../cstrike/dlls/bot/states/cs_bot_escape_from_bomb.cpp:16 */
NOBODY void EscapeFromBombState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void EscapeFromBombState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// DestroyPath(CCSBot *const this); // 20 me->StandUp();
me->Run();
me->DestroyPath();
me->EquipKnife();
} }
// Escape from the bomb
/* <549be9> ../cstrike/dlls/bot/states/cs_bot_escape_from_bomb.cpp:28 */ /* <549be9> ../cstrike/dlls/bot/states/cs_bot_escape_from_bomb.cpp:28 */
NOBODY void EscapeFromBombState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void EscapeFromBombState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { const Vector *bombPos = me->GetGameState()->GetBombPosition();
// const Vector *bombPos; // 30
// { // if we don't know where the bomb is, we shouldn't be in this state
// class FarAwayFromPositionFunctor func; // 48 if (bombPos == NULL)
// class CNavArea *goalArea; // 49 {
// FarAwayFromPositionFunctor(FarAwayFromPositionFunctor *const this, me->Idle();
// const Vector *pos); // 48 return;
// } }
// }
// grab our knife to move quickly
me->EquipKnife();
// look around
me->UpdateLookAround();
if (me->UpdatePathMovement() != CCSBot::PROGRESSING)
{
// we have no path, or reached the end of one - create a new path far away from the bomb
FarAwayFromPositionFunctor func(bombPos);
CNavArea *goalArea = FindMinimumCostArea(me->GetLastKnownArea(), func);
// if this fails, we'll try again next time
me->ComputePath(goalArea, NULL, FASTEST_ROUTE);
}
} }
/* <549976> ../cstrike/dlls/bot/states/cs_bot_escape_from_bomb.cpp:60 */ /* <549976> ../cstrike/dlls/bot/states/cs_bot_escape_from_bomb.cpp:60 */
NOBODY void EscapeFromBombState::__MAKE_VHOOK(OnExit)(CCSBot *me) void EscapeFromBombState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
me->EquipBestWeapon();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,19 +1,54 @@
#include "precompiled.h" #include "precompiled.h"
// Move to the bomb on the floor and pick it up
/* <5587b3> ../cstrike/dlls/bot/states/cs_bot_fetch_bomb.cpp:17 */ /* <5587b3> ../cstrike/dlls/bot/states/cs_bot_fetch_bomb.cpp:17 */
NOBODY void FetchBombState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void FetchBombState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// DestroyPath(CCSBot *const this); // 19 me->DestroyPath();
} }
// Move to the bomb on the floor and pick it up
/* <5587fa> ../cstrike/dlls/bot/states/cs_bot_fetch_bomb.cpp:26 */ /* <5587fa> ../cstrike/dlls/bot/states/cs_bot_fetch_bomb.cpp:26 */
NOBODY void FetchBombState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void FetchBombState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { if (me->IsCarryingBomb())
// class CCSBotManager *ctrl; // 28 {
// class CBaseEntity *bomb; // 30 me->PrintIfWatched( "I picked up the bomb\n" );
// GetLooseBomb(CCSBotManager *const this); // 30 me->Idle();
// } return;
}
CBaseEntity *bomb = TheCSBots()->GetLooseBomb();
if (bomb != NULL)
{
if (!me->HasPath())
{
// build a path to the bomb
if (me->ComputePath(TheNavAreaGrid.GetNavArea(&bomb->pev->origin), &bomb->pev->origin, SAFEST_ROUTE) == false)
{
me->PrintIfWatched("Fetch bomb pathfind failed\n");
// go Hunt instead of Idle to prevent continuous re-pathing to inaccessible bomb
me->Hunt();
//return;
}
}
}
else
{
// someone picked up the bomb
me->PrintIfWatched("Bomb not loose\n");
me->Idle();
return;
}
// look around
me->UpdateLookAround();
if (me->UpdatePathMovement() != CCSBot::PROGRESSING)
me->Idle();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,105 +1,269 @@
#include "precompiled.h" #include "precompiled.h"
// Follow our leader
/* <56918b> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:16 */ /* <56918b> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:16 */
NOBODY void FollowState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void FollowState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// DestroyPath(CCSBot *const this); // 20 me->StandUp();
// Invalidate(CountdownTimer *const this); // 33 me->Run();
// Invalidate(IntervalTimer *const this); // 37 me->DestroyPath();
// Start(CountdownTimer *const this,
// float duration); // 41 m_isStopped = false;
m_stoppedTimestamp = 0.0f;
// to force immediate repath
m_lastLeaderPos.x = -99999999.9f;
m_lastLeaderPos.y = -99999999.9f;
m_lastLeaderPos.z = -99999999.9f;
m_lastSawLeaderTime = 0;
// set re-pathing frequency
m_repathInterval.Invalidate();
m_isSneaking = false;
m_walkTime.Invalidate();
m_isAtWalkSpeed = false;
m_leaderMotionState = INVALID;
m_idleTimer.Start(RANDOM_FLOAT(2.0f, 5.0f));
} }
// Determine the leader's motion state by tracking his speed
/* <569268> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:48 */ /* <569268> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:48 */
NOBODY void FollowState::ComputeLeaderMotionState(float leaderSpeed) void FollowState::ComputeLeaderMotionState(float leaderSpeed)
{ {
// { // walk = 130, run = 250
// float const runWalkThreshold; // 51 const float runWalkThreshold = 140.0f;
// float const walkStopThreshold; // 52 const float walkStopThreshold = 10.0f;
// enum LeaderMotionStateType prevState; // 53 LeaderMotionStateType prevState = m_leaderMotionState;
// { if (leaderSpeed > runWalkThreshold)
// float const minWalkTime; // 68 {
// GetElapsedTime(const class IntervalTimer *const this); // 69 m_leaderMotionState = RUNNING;
// Start(IntervalTimer *const this); // 64 m_isAtWalkSpeed = false;
// } }
// Start(IntervalTimer *const this); // 83 else if (leaderSpeed > walkStopThreshold)
// } {
// track when began to walk
if (!m_isAtWalkSpeed)
{
m_walkTime.Start();
m_isAtWalkSpeed = true;
}
const float minWalkTime = 0.25f;
if (m_walkTime.GetElapsedTime() > minWalkTime)
{
m_leaderMotionState = WALKING;
}
}
else
{
m_leaderMotionState = STOPPED;
m_isAtWalkSpeed = false;
}
// track time spent in this motion state
if (prevState != m_leaderMotionState)
{
m_leaderMotionStateTime.Start();
m_waitTime = RANDOM_FLOAT(1.0f, 3.0f);
}
} }
// Follow our leader
// TODO: Clean up this nasty mess
/* <569368> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:164 */ /* <569368> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:164 */
NOBODY void FollowState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void FollowState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { // if we lost our leader, give up
// float leaderSpeed; // 194 if (m_leader == NULL || !m_leader->IsAlive())
// bool isLeaderVisible; // 200 {
// float const farAwayRange; // 213 me->Idle();
// float const longTime; // 231 return;
// bool repath; // 241 }
// float const nearLeaderRange; // 244
// SetTask(CCSBot *const this, // if we are carrying the bomb and at a bombsite, plant
// enum TaskType task, if (me->IsCarryingBomb() && me->IsAtBombsite())
// class CBaseEntity *entity); // 177 {
// IsNotMoving(const class CCSBot *const this); // 190 // plant it
// Length(const class Vector2D *const this); // 194 me->SetTask(CCSBot::PLANT_BOMB);
// operator-(const Vector *const this, me->PlantBomb();
// const Vector &v); // 214
// IsLengthGreaterThan(const Vector *const this, // radio to the team
// float length); // 214 me->GetChatter()->PlantingTheBomb(me->GetPlace());
// GetElapsedTime(const class IntervalTimer *const this); // 245 return;
// operator-(const Vector *const this, }
// const Vector &v); // 251
// IsLengthLessThan(const Vector *const this, // look around
// float length); // 251 me->UpdateLookAround();
// {
// float const hideRange; // 253 // if we are moving, we are not idle
// } if (me->IsNotMoving() == false)
// IsElapsed(const class CountdownTimer *const this); // 263 m_idleTimer.Start(RANDOM_FLOAT(2.0f, 5.0f));
// DestroyPath(CCSBot *const this); // 280
// IsElapsed(const class CountdownTimer *const this); // 284 // compute the leader's speed
// { float leaderSpeed = Vector2D(m_leader->pev->velocity.x, m_leader->pev->velocity.y).Length();
// float const runSpeed; // 291
// float const collectRange; // 293 // determine our leader's movement state
// class FollowTargetCollector collector; // 294 ComputeLeaderMotionState(leaderSpeed);
// FollowTargetCollector(FollowTargetCollector *const this,
// class CBasePlayer *player); // 294 // track whether we can see the leader
// SearchSurroundingAreas<FollowTargetCollector>(CNavArea *startArea, bool isLeaderVisible;
// const Vector *startPos, if (me->IsVisible(&m_leader->pev->origin))
// class FollowTargetCollector &func, {
// float maxRange); // 295 m_lastSawLeaderTime = gpGlobals->time;
// { isLeaderVisible = true;
// int i; // 299 }
// } else
// { {
// class CNavArea *target; // 306 isLeaderVisible = false;
// Vector targetPos; // 307 }
// IsElapsed(const class CountdownTimer *const this); // 310
// { // determine whether we should sneak or not
// class CNavArea *area; // 321 const float farAwayRange = 750.0f;
// float closeRangeSq; // 322 if ((m_leader->pev->origin - me->pev->origin).IsLengthGreaterThan(farAwayRange))
// Vector close; // 323 {
// { // far away from leader - run to catch up
// int a; // 325 m_isSneaking = false;
// { }
// float rangeSq;// 331 else if (isLeaderVisible)
// operator-(const Vector *const this, {
// const Vector &v); // 331 // if we see leader walking and we are nearby, walk
// LengthSquared(const Vector *const this); // 331 if (m_leaderMotionState == WALKING)
// } m_isSneaking = true;
// }
// } // if we are sneaking and our leader starts running, stop sneaking
// Start(CountdownTimer *const this, if (m_isSneaking && m_leaderMotionState == RUNNING)
// float duration); // 345 m_isSneaking = false;
// Reset(CountdownTimer *const this); // 347 }
// }
// } // if we haven't seen the leader for a long time, run
// Start(CountdownTimer *const this, const float longTime = 20.0f;
// float duration); // 191 if (gpGlobals->time - m_lastSawLeaderTime > longTime)
// } m_isSneaking = false;
if (m_isSneaking)
me->Walk();
else
me->Run();
bool repath = false;
// if the leader has stopped, hide nearby
const float nearLeaderRange = 250.0f;
if (!me->HasPath() && m_leaderMotionState == STOPPED && m_leaderMotionStateTime.GetElapsedTime() > m_waitTime)
{
// throttle how often this check occurs
m_waitTime += RANDOM_FLOAT(1.0f, 3.0f);
// the leader has stopped - if we are close to him, take up a hiding spot
if ((m_leader->pev->origin - me->pev->origin).IsLengthLessThan(nearLeaderRange))
{
const float hideRange = 250.0f;
if (me->TryToHide(NULL, -1.0f, hideRange, false, USE_NEAREST))
{
me->ResetStuckMonitor();
return;
}
}
}
// if we have been idle for awhile, move
if (m_idleTimer.IsElapsed())
{
repath = true;
// always walk when we move such a short distance
m_isSneaking = true;
}
// if our leader has moved, repath (don't repath if leading is stopping)
if (leaderSpeed > 100.0f && m_leaderMotionState != STOPPED)
{
repath = true;
}
// move along our path
if (me->UpdatePathMovement(NO_SPEED_CHANGE) != CCSBot::PROGRESSING)
{
me->DestroyPath();
}
// recompute our path if necessary
if (repath && m_repathInterval.IsElapsed())
{
// recompute our path to keep us near our leader
m_lastLeaderPos = m_leader->pev->origin;
me->ResetStuckMonitor();
const float runSpeed = 200.0f;
const float collectRange = (leaderSpeed > runSpeed) ? 600.0f : 400.0f;
FollowTargetCollector collector(m_leader);
SearchSurroundingAreas(TheNavAreaGrid.GetNearestNavArea(&m_lastLeaderPos), &m_lastLeaderPos, collector, collectRange);
if (cv_bot_debug.value > 0.0f)
{
for (int i = 0; i < collector.m_targetAreaCount; ++i)
collector.m_targetArea[i]->Draw(255, 0, 0, 2);
}
// move to one of the collected areas
if (collector.m_targetAreaCount)
{
CNavArea *target = NULL;
Vector targetPos;
// if we are idle, pick a random area
if (m_idleTimer.IsElapsed())
{
target = collector.m_targetArea[ RANDOM_LONG(0, collector.m_targetAreaCount - 1) ];
targetPos = *target->GetCenter();
me->PrintIfWatched("%4.1f: Bored. Repathing to a new nearby area\n", gpGlobals->time);
}
else
{
me->PrintIfWatched("%4.1f: Repathing to stay with leader.\n", gpGlobals->time);
// find closest area to where we are
CNavArea *area;
float closeRangeSq = 9999999999.9f;
Vector close;
for (int a = 0; a < collector.m_targetAreaCount; ++a)
{
area = collector.m_targetArea[a];
area->GetClosestPointOnArea(&me->pev->origin, &close);
float_precision rangeSq = (me->pev->origin - close).LengthSquared();
if (rangeSq < closeRangeSq)
{
target = area;
targetPos = close;
closeRangeSq = rangeSq;
}
}
}
if (me->ComputePath(target, NULL, FASTEST_ROUTE) == NULL)
me->PrintIfWatched("Pathfind to leader failed.\n");
// throttle how often we repath
m_repathInterval.Start(0.5f);
m_idleTimer.Reset();
}
}
} }
/* <569231> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:353 */ /* <569231> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:353 */
NOBODY void FollowState::__MAKE_VHOOK(OnExit)(CCSBot *me) void FollowState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
;
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,122 +1,439 @@
#include "precompiled.h" #include "precompiled.h"
// Begin moving to a nearby hidey-hole.
// NOTE: Do not forget this state may include a very long "move-to" time to get to our hidey spot!
/* <57c261> ../cstrike/dlls/bot/states/cs_bot_hide.cpp:22 */ /* <57c261> ../cstrike/dlls/bot/states/cs_bot_hide.cpp:22 */
NOBODY void HideState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void HideState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// GetFollowLeader(CCSBot *const this); // 50 m_isAtSpot = false;
// if duration is "infinite", set it to a reasonably long time to prevent infinite camping
if (m_duration < 0.0f)
{
m_duration = RANDOM_FLOAT(30.0f, 60.0f);
}
// decide whether to "ambush" or not - never set to false so as not to override external setting
if (RANDOM_FLOAT(0.0f, 100.0f) < 50.0f)
{
m_isHoldingPosition = true;
}
// if we are holding position, decide for how long
if (m_isHoldingPosition)
{
m_holdPositionTime = RANDOM_FLOAT(3.0f, 10.0f);
}
else
{
m_holdPositionTime = 0.0f;
}
m_heardEnemy = false;
m_firstHeardEnemyTime = 0.0f;
m_retry = 0;
if (me->IsFollowing())
{
m_leaderAnchorPos = me->GetFollowLeader()->pev->origin;
}
} }
// Move to a nearby hidey-hole.
// NOTE: Do not forget this state may include a very long "move-to" time to get to our hidey spot!
/* <57c35e> ../cstrike/dlls/bot/states/cs_bot_hide.cpp:59 */ /* <57c35e> ../cstrike/dlls/bot/states/cs_bot_hide.cpp:59 */
NOBODY void HideState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void HideState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { CCSBotManager *ctrl = TheCSBots();
// class CCSBotManager *ctrl; // 61
// IsActiveWeaponReloading(const class CBot *const this); // 64 // wait until finished reloading to leave hide state
// { if (!me->IsActiveWeaponReloading())
// bool isSettledInSniper; // 241 {
// SetTask(CCSBot *const this, if (gpGlobals->time - me->GetStateTimestamp() > m_duration)
// enum TaskType task, {
// class CBaseEntity *entity); // 94 if (me->GetTask() == CCSBot::GUARD_LOOSE_BOMB)
// { {
// const class Zone *zone; // 78 // if we're guarding the loose bomb, continue to guard it but pick a new spot
// { me->Hide(ctrl->GetLooseBombArea());
// class CNavArea *area; // 81 return;
// } }
// } else if (me->GetTask() == CCSBot::GUARD_BOMB_ZONE)
// { {
// class CBasePlayer *leader; // 109 // if we're guarding a bombsite, continue to guard it but pick a new spot
// float runThreshold; // 111 const CCSBotManager::Zone *zone = ctrl->GetClosestZone(&me->pev->origin);
// float const followRange; // 120 if (zone != NULL)
// GetFollowLeader(CCSBot *const this); // 109 {
// IsLengthGreaterThan(const Vector *const this, CNavArea *area = ctrl->GetRandomAreaInZone(zone);
// float length); // 112 if (area != NULL)
// operator-(const Vector *const this, {
// const Vector &v); // 121 me->Hide(area);
// IsLengthGreaterThan(const Vector *const this, return;
// float length); // 121 }
// } }
// { }
// Vector toDefuser; // 184 else if (me->GetTask() == CCSBot::GUARD_HOSTAGE_RESCUE_ZONE)
// float const hearDefuseRange; // 186 {
// operator-(const Vector *const this, // if we're guarding a rescue zone, continue to guard this or another rescue zone
// const Vector &v); // 184 if (me->GuardRandomZone())
// IsLengthLessThan(const Vector *const this, {
// float length); // 187 me->SetTask(CCSBot::GUARD_HOSTAGE_RESCUE_ZONE);
// } me->PrintIfWatched("Continuing to guard hostage rescue zones\n");
// GetLooseBomb(CCSBotManager *const this); // 157 me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
// { me->GetChatter()->GuardingHostageEscapeZone(IS_PLAN);
// class CBaseEntity *hostage; // 222 return;
// { }
// class CNavArea *area; // 226 }
// SetTask(CCSBot *const this,
// enum TaskType task, me->Idle();
// class CBaseEntity *entity); // 229 return;
// } }
// }
// IsActiveWeaponReloading(const class CBot *const this); // 245 // if we are momentarily hiding while following someone, check to see if he has moved on
// } if (me->IsFollowing())
// { {
// float range; // 343 CBasePlayer *leader = me->GetFollowLeader();
// class CBasePlayer *camper; // 344
// float const closeRange; // 346 // BOTPORT: Determine walk/run velocity thresholds
// Vector toSpot; // 367 float runThreshold = 200.0f;
// float dist; // 371 if (leader->pev->velocity.IsLengthGreaterThan(runThreshold))
// float const crouchDist; // 373 {
// float const atDist; // 377 // leader is running, stay with him
// { me->Follow(leader);
// const Vector *pos; // 422 return;
// GetFeetZ(const class CCSBot *const this); // 431 }
// }
// { // if leader has moved, stay with him
// int const maxRetries; // 352 const float followRange = 250.0f;
// } if ((m_leaderAnchorPos - leader->pev->origin).IsLengthGreaterThan(followRange))
// GetFeetZ(const class CCSBot *const this); // 370 {
// Length(const Vector *const this); // 371 me->Follow(leader);
// { return;
// TraceResult result; // 397 }
// float outAngle; // 398 }
// float outAngleRange; // 399
// SetTask(CCSBot *const this, // if we see a nearby buddy in combat, join him
// enum TaskType task, // TODO: Perhaps tie in to TakeDamage(), so it works for human players, too
// class CBaseEntity *entity); // 394
// { // Scenario logic
// float angle; // 400 switch (ctrl->GetScenario())
// GetEyePosition(const class CCSBot *const this); // 402 {
// operator*(float fl, case CCSBotManager::SCENARIO_DEFUSE_BOMB:
// const Vector &v); // 402 {
// operator+(const Vector *const this, if (me->m_iTeam == CT)
// const Vector &v); // 402 {
// GetEyePosition(const class CCSBot *const this); // 402 // if we are just holding position (due to a radio order) and the bomb has just planted, go defuse it
// } if (me->GetTask() == CCSBot::HOLD_POSITION &&
// SetLookAheadAngle(CCSBot *const this, ctrl->IsBombPlanted() &&
// float angle); // 411 ctrl->GetBombPlantTimestamp() > me->GetStateTimestamp())
// } {
// } me->Idle();
// { return;
// float const hurtRecentlyTime; // 294 }
// GetNearbyEnemyCount(const class CCSBot *const this); // 310
// { // if we are guarding the defuser and he dies/gives up, stop hiding (to choose another defuser)
// float const someTime; // 312 if (me->GetTask() == CCSBot::GUARD_BOMB_DEFUSER && ctrl->GetBombDefuser() == NULL)
// float const littleTime; // 313 {
// } me->Idle();
// GetNearbyEnemyCount(const class CCSBot *const this); // 326 return;
// { }
// class CHostage *hostage; // 328
// } // if we are guarding the loose bomb and it is picked up, stop hiding
// GetTimeSinceAttacked(const class CCSBot *const this); // 295 if (me->GetTask() == CCSBot::GUARD_LOOSE_BOMB && ctrl->GetLooseBomb() == NULL)
// IsProtectedByShield(CBasePlayer *const this); // 290 {
// } me->GetChatter()->TheyPickedUpTheBomb();
// } me->Idle();
return;
}
// if we are guarding a bombsite and the bomb is dropped and we hear about it, stop guarding
if (me->GetTask() == CCSBot::GUARD_BOMB_ZONE && me->GetGameState()->IsLooseBombLocationKnown())
{
me->Idle();
return;
}
// if we are guarding (bombsite, initial encounter, etc) and the bomb is planted, go defuse it
if (me->IsDoingScenario() && me->GetTask() == CCSBot::GUARD_BOMB_ZONE && ctrl->IsBombPlanted())
{
me->Idle();
return;
}
}
// TERRORIST
else
{
// if we are near the ticking bomb and someone starts defusing it, attack!
if (ctrl->GetBombDefuser())
{
Vector toDefuser = ctrl->GetBombDefuser()->pev->origin;
const float hearDefuseRange = 2000.0f;
if ((toDefuser - me->pev->origin).IsLengthLessThan(hearDefuseRange))
{
// if we are nearby, attack, otherwise move to the bomb (which will cause us to attack when we see defuser)
if (me->CanSeePlantedBomb())
{
me->Attack(ctrl->GetBombDefuser());
}
else
{
me->MoveTo(&toDefuser, FASTEST_ROUTE);
me->InhibitLookAround(10.0f);
}
return;
}
}
}
break;
}
case CCSBotManager::SCENARIO_RESCUE_HOSTAGES:
{
// if we're guarding the hostages and they all die or are taken, do something else
if (me->GetTask() == CCSBot::GUARD_HOSTAGES)
{
if (me->GetGameState()->AreAllHostagesBeingRescued() || me->GetGameState()->AreAllHostagesGone())
{
me->Idle();
return;
}
}
else if (me->GetTask() == CCSBot::GUARD_HOSTAGE_RESCUE_ZONE)
{
// if we stumble across a hostage, guard it
CHostage *hostage = me->GetGameState()->GetNearestVisibleFreeHostage();
if (hostage != NULL)
{
// we see a free hostage, guard it
CNavArea *area = TheNavAreaGrid.GetNearestNavArea(&hostage->pev->origin);
if (area != NULL)
{
me->SetTask(CCSBot::GUARD_HOSTAGES);
me->Hide(area);
me->PrintIfWatched("I'm guarding hostages I found\n");
// don't chatter here - he'll tell us when he's in his hiding spot
return;
}
}
}
}
}
bool isSettledInSniper = (me->IsSniper() && m_isAtSpot) ? true : false;
// only investigate noises if we are initiating attacks, and we aren't a "settled in" sniper
// dont investigate noises if we are reloading
if (!me->IsActiveWeaponReloading() &&
!isSettledInSniper &&
me->GetDisposition() == CCSBot::ENGAGE_AND_INVESTIGATE)
{
// if we are holding position, and have heard the enemy nearby, investigate after our hold time is up
if (m_isHoldingPosition && m_heardEnemy && (gpGlobals->time - m_firstHeardEnemyTime > m_holdPositionTime))
{
// TODO: We might need to remember specific location of last enemy noise here
me->InvestigateNoise();
return;
}
// investigate nearby enemy noises
if (me->ShouldInvestigateNoise())
{
// if we are holding position, check if enough time has elapsed since we first heard the enemy
if (m_isAtSpot && m_isHoldingPosition)
{
if (!m_heardEnemy)
{
// first time we heard the enemy
m_heardEnemy = true;
m_firstHeardEnemyTime = gpGlobals->time;
me->PrintIfWatched("Heard enemy, holding position for %f2.1 seconds...\n", m_holdPositionTime);
}
}
else
{
// not holding position - investigate enemy noise
me->InvestigateNoise();
return;
}
}
}
}
// look around
me->UpdateLookAround();
// if we are at our hiding spot, crouch and wait
if (m_isAtSpot)
{
me->Crouch();
// if we have a shield, hide behind it
if (me->HasShield() && !me->IsProtectedByShield())
me->SecondaryAttack();
// while sitting at our hiding spot, if we are being attacked but can't see our attacker, move somewhere else
const float hurtRecentlyTime = 1.0f;
if (!me->IsEnemyVisible() && me->GetTimeSinceAttacked() < hurtRecentlyTime)
{
me->Idle();
return;
}
// encourage the human player
if (!me->IsDoingScenario())
{
if (me->m_iTeam == CT)
{
if (me->GetTask() == CCSBot::GUARD_BOMB_ZONE && me->IsAtHidingSpot() && ctrl->IsBombPlanted())
{
if (me->GetNearbyEnemyCount() == 0)
{
const float someTime = 30.0f;
const float littleTime = 11.0;
if (ctrl->GetBombTimeLeft() > someTime)
me->GetChatter()->Encourage("BombsiteSecure", RANDOM_FLOAT(10.0f, 15.0f));
else if (ctrl->GetBombTimeLeft() > littleTime)
me->GetChatter()->Encourage("WaitingForHumanToDefuseBomb", RANDOM_FLOAT(5.0f, 8.0f));
else
me->GetChatter()->Encourage("WaitingForHumanToDefuseBombPanic", RANDOM_FLOAT(3.0f, 4.0f));
}
}
if (me->GetTask() == CCSBot::GUARD_HOSTAGES && me->IsAtHidingSpot())
{
if (me->GetNearbyEnemyCount() == 0)
{
CHostage *hostage = me->GetGameState()->GetNearestVisibleFreeHostage();
if (hostage != NULL)
{
me->GetChatter()->Encourage("WaitingForHumanToRescueHostages", RANDOM_FLOAT(10.0f, 15.0f));
}
}
}
}
}
}
else
{
// if a Player is using this hiding spot, give up
float range;
CBasePlayer *camper = UTIL_GetClosestPlayer(&m_hidingSpot, &range);
const float closeRange = 75.0f;
if (camper != NULL && camper != me && range < closeRange && me->IsVisible(camper, CHECK_FOV))
{
// player is in our hiding spot
me->PrintIfWatched("Someone's in my hiding spot - picking another...\n");
const int maxRetries = 3;
if (m_retry++ >= maxRetries)
{
me->PrintIfWatched("Can't find a free hiding spot, giving up.\n");
me->Idle();
return;
}
// pick another hiding spot near where we were planning on hiding
me->Hide(TheNavAreaGrid.GetNavArea(&m_hidingSpot));
return;
}
Vector toSpot;
toSpot.x = m_hidingSpot.x - me->pev->origin.x;
toSpot.y = m_hidingSpot.y - me->pev->origin.y;
toSpot.z = m_hidingSpot.z - me->GetFeetZ(); // use feet location
float dist = toSpot.Length();
const float crouchDist = 200.0f;
if (dist < crouchDist)
me->Crouch();
const float atDist = 20.0f;
if (dist < atDist)
{
m_isAtSpot = true;
// make sure our approach points are valid, since we'll be watching them
me->ComputeApproachPoints();
// ready our weapon and prepare to attack
me->EquipBestWeapon(MUST_EQUIP);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
// if we are a sniper, update our task
if (me->GetTask() == CCSBot::MOVE_TO_SNIPER_SPOT)
{
me->SetTask(CCSBot::SNIPING);
}
// determine which way to look
TraceResult result;
float outAngle = 0.0f;
float outAngleRange = 0.0f;
for (float angle = 0.0f; angle < 360.0f; angle += 45.0f)
{
UTIL_TraceLine(me->GetEyePosition(), me->GetEyePosition() + 1000.0f * Vector(BotCOS(angle), BotSIN(angle), 0.0f), ignore_monsters, ignore_glass, ENT(me->pev), &result);
if (result.flFraction > outAngleRange)
{
outAngle = angle;
outAngleRange = result.flFraction;
}
}
me->SetLookAheadAngle(outAngle);
}
// move to hiding spot
if (me->UpdatePathMovement() != CCSBot::PROGRESSING && !m_isAtSpot)
{
// we couldn't get to our hiding spot - pick another
me->PrintIfWatched("Can't get to my hiding spot - finding another...\n");
// search from hiding spot, since we know it was valid
const Vector *pos = FindNearbyHidingSpot(me, &m_hidingSpot, m_searchFromArea, m_range, me->IsSniper());
if (pos == NULL)
{
// no available hiding spots
me->PrintIfWatched("No available hiding spots - hiding where I'm at.\n");
// hide where we are
m_hidingSpot.x = me->pev->origin.x;
m_hidingSpot.x = me->pev->origin.y;
m_hidingSpot.z = me->GetFeetZ();
}
else
{
m_hidingSpot = *pos;
}
// build a path to our new hiding spot
if (me->ComputePath(TheNavAreaGrid.GetNavArea(&m_hidingSpot), &m_hidingSpot, FASTEST_ROUTE) == false)
{
me->PrintIfWatched("Can't pathfind to hiding spot\n");
me->Idle();
return;
}
}
}
} }
/* <57c2c8> ../cstrike/dlls/bot/states/cs_bot_hide.cpp:450 */ /* <57c2c8> ../cstrike/dlls/bot/states/cs_bot_hide.cpp:450 */
NOBODY void HideState::__MAKE_VHOOK(OnExit)(CCSBot *me) void HideState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
// ClearLookAt(CCSBot *const this); // 456 m_isHoldingPosition = false;
// ClearApproachPoints(CCSBot *const this); // 457
// IsProtectedByShield(CBasePlayer *const this); // 460 me->StandUp();
// OnExit(HideState *const this, me->ResetStuckMonitor();
// class CCSBot *me); // 450 me->ClearLookAt();
me->ClearApproachPoints();
// if we have a shield, put it away
if (me->HasShield() && me->IsProtectedByShield())
me->SecondaryAttack();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,65 +1,204 @@
#include "precompiled.h" #include "precompiled.h"
// Begin the hunt
/* <58e6e0> ../cstrike/dlls/bot/states/cs_bot_hunt.cpp:18 */ /* <58e6e0> ../cstrike/dlls/bot/states/cs_bot_hunt.cpp:18 */
NOBODY void HuntState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void HuntState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// SetTask(CCSBot *const this, // lurking death
// enum TaskType task, if (me->IsUsingKnife() && me->IsWellPastSafe() && !me->IsHurrying())
// class CBaseEntity *entity); // 29 me->Walk();
// DestroyPath(CCSBot *const this); // 31 else
me->Run();
me->StandUp();
me->SetDisposition(CCSBot::ENGAGE_AND_INVESTIGATE);
me->SetTask(CCSBot::SEEK_AND_DESTROY);
me->DestroyPath();
} }
// Hunt down our enemies
/* <58e452> ../cstrike/dlls/bot/states/cs_bot_hunt.cpp:38 */ /* <58e452> ../cstrike/dlls/bot/states/cs_bot_hunt.cpp:38 */
NOBODY void HuntState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void HuntState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { // if we've been hunting for a long time, drop into Idle for a moment to
// class CCSBotManager *ctrl; // 40 // select something else to do
// float const huntingTooLongTime; // 44 const float huntingTooLongTime = 30.0f;
// { if (gpGlobals->time - me->GetStateTimestamp() > huntingTooLongTime)
// class CHostage *hostage; // 129 {
// { // stop being a rogue and do the scenario, since there must not be many enemies left to hunt
// class CNavArea *area; // 132 me->PrintIfWatched("Giving up hunting, and being a rogue\n");
// SetTask(CCSBot *const this, me->SetRogue(false);
// enum TaskType task, me->Idle();
// class CBaseEntity *entity); // 136 return;
// } }
// }
// SetTask(CCSBot *const this, CCSBotManager *ctrl = TheCSBots();
// enum TaskType task,
// class CBaseEntity *entity); // 118 // scenario logic
// { if (ctrl->GetScenario() == CCSBotManager::SCENARIO_DEFUSE_BOMB)
// float const safeTime; // 62 {
// } if (me->m_iTeam == TERRORIST)
// SetTask(CCSBot *const this, {
// enum TaskType task, // if we have the bomb and it's time to plant, or we happen to be in a bombsite and it seems safe, do it
// class CBaseEntity *entity); // 82 if (me->IsCarryingBomb())
// SetTask(CCSBot *const this, {
// enum TaskType task, const float safeTime = 3.0f;
// class CBaseEntity *entity); // 92 if (ctrl->IsTimeToPlantBomb() || (me->IsAtBombsite() && gpGlobals->time - me->GetLastSawEnemyTimestamp() > safeTime))
// { {
// float oldest; // 163 me->Idle();
// int areaCount; // 165 return;
// float const minSize; // 166 }
// iterator iter; // 167 }
// int which; // 189
// { // if we notice the bomb lying on the ground, go get it
// class CNavArea *area; // 170 if (me->NoticeLooseBomb())
// const class Extent *extent; // 175 {
// float age; // 180 me->FetchBomb();
// GetClearedTimestamp(CNavArea *const this, return;
// int teamID); // 180 }
// }
// operator++(_List_iterator<CNavArea*> *const this); // 168 // if bomb has been planted, and we hear it, move to a hiding spot near the bomb and watch it
// operator++(_List_iterator<CNavArea*> *const this); // 192 const Vector *bombPos = me->GetGameState()->GetBombPosition();
// } if (!me->IsRogue() && me->GetGameState()->IsBombPlanted() && bombPos != NULL)
// SetRogue(CCSBot *const this, {
// bool rogue); // 49 me->SetTask(CCSBot::GUARD_TICKING_BOMB);
// } me->Hide(TheNavAreaGrid.GetNavArea(bombPos));
return;
}
}
// CT
else
{
if (!me->IsRogue() && me->CanSeeLooseBomb())
{
// if we are near the loose bomb and can see it, hide nearby and guard it
me->SetTask(CCSBot::GUARD_LOOSE_BOMB);
me->Hide(ctrl->GetLooseBombArea());
me->GetChatter()->AnnouncePlan("GoingToGuardLooseBomb", ctrl->GetLooseBombArea()->GetPlace());
return;
}
else if (ctrl->IsBombPlanted())
{
// rogues will defuse a bomb, but not guard the defuser
if (!me->IsRogue() || !ctrl->GetBombDefuser())
{
// search for the planted bomb to defuse
me->Idle();
return;
}
}
}
}
else if (ctrl->GetScenario() == CCSBotManager::SCENARIO_RESCUE_HOSTAGES)
{
if (me->m_iTeam == TERRORIST)
{
if (me->GetGameState()->AreAllHostagesBeingRescued())
{
// all hostages are being rescued, head them off at the escape zones
if (me->GuardRandomZone())
{
me->SetTask(CCSBot::GUARD_HOSTAGE_RESCUE_ZONE);
me->PrintIfWatched("Trying to beat them to an escape zone!\n");
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->GetChatter()->GuardingHostageEscapeZone(IS_PLAN);
return;
}
}
// if safe time is up, and we stumble across a hostage, guard it
if (!me->IsRogue() && !me->IsSafe())
{
CHostage *hostage = me->GetGameState()->GetNearestVisibleFreeHostage();
if (hostage != NULL)
{
CNavArea *area = TheNavAreaGrid.GetNearestNavArea(&hostage->pev->origin);
if (area != NULL)
{
// we see a free hostage, guard it
me->SetTask(CCSBot::GUARD_HOSTAGES);
me->Hide(area);
me->PrintIfWatched("I'm guarding hostages\n");
me->GetChatter()->GuardingHostages(area->GetPlace(), IS_PLAN);
return;
}
}
}
}
}
// listen for enemy noises
if (me->ShouldInvestigateNoise())
{
me->InvestigateNoise();
return;
}
// look around
me->UpdateLookAround();
// if we have reached our destination area, pick a new one
// if our path fails, pick a new one
if (me->GetLastKnownArea() == m_huntArea || me->UpdatePathMovement() != CCSBot::PROGRESSING)
{
m_huntArea = NULL;
float oldest = 0.0f;
int areaCount = 0;
const float minSize = 150.0f;
NavAreaList::iterator iter;
for (iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
{
CNavArea *area = (*iter);
++areaCount;
// skip the small areas
const Extent *extent = area->GetExtent();
if (extent->hi.x - extent->lo.x < minSize || extent->hi.y - extent->lo.y < minSize)
continue;
// keep track of the least recently cleared area
float_precision age = gpGlobals->time - area->GetClearedTimestamp(me->m_iTeam - 1);
if (age > oldest)
{
oldest = age;
m_huntArea = area;
}
}
// if all the areas were too small, pick one at random
int which = RANDOM_LONG(0, areaCount - 1);
areaCount = 0;
for (iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
{
m_huntArea = (*iter);
if (which == areaCount)
break;
--which;
}
if (m_huntArea != NULL)
{
// create a new path to a far away area of the map
me->ComputePath(m_huntArea, NULL, SAFEST_ROUTE);
}
}
} }
// Done hunting
/* <58e418> ../cstrike/dlls/bot/states/cs_bot_hunt.cpp:211 */ /* <58e418> ../cstrike/dlls/bot/states/cs_bot_hunt.cpp:211 */
NOBODY void HuntState::__MAKE_VHOOK(OnExit)(CCSBot *me) void HuntState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
;
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,158 +1,758 @@
#include "precompiled.h" #include "precompiled.h"
// range for snipers to select a hiding spot
const float sniperHideRange = 2000.0f;
// The Idle state.
// We never stay in the Idle state - it is a "home base" for the state machine that
// does various checks to determine what we should do next.
/* <5a12ee> ../cstrike/dlls/bot/states/cs_bot_idle.cpp:26 */ /* <5a12ee> ../cstrike/dlls/bot/states/cs_bot_idle.cpp:26 */
NOBODY void IdleState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void IdleState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// DestroyPath(CCSBot *const this); // 28 me->DestroyPath();
// SetTask(CCSBot *const this, me->SetEnemy(NULL);
// enum TaskType task,
// class CBaseEntity *entity); // 38 // lurking death
if (me->IsUsingKnife() && me->IsWellPastSafe() && !me->IsHurrying())
me->Walk();
// Since Idle assigns tasks, we assume that coming back to Idle means our task is complete
me->SetTask(CCSBot::SEEK_AND_DESTROY);
me->SetDisposition(CCSBot::ENGAGE_AND_INVESTIGATE);
} }
/* <5a0c66> ../cstrike/dlls/bot/states/cs_bot_idle.cpp:46 */ /* <5a0c66> ../cstrike/dlls/bot/states/cs_bot_idle.cpp:46 */
NOBODY void IdleState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void IdleState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { // all other states assume GetLastKnownArea() is valid, ensure that it is
// class CCSBotManager *ctrl; // 59 if (me->GetLastKnownArea() == NULL && me->StayOnNavMesh() == false)
// float const defenseSniperCampChance; // 95 return;
// float const offenseSniperCampChance; // 96
// { // zombies never leave the Idle state
// const class Zone *zone; // 81 if (cv_bot_zombie.value > 0.0f)
// } {
// { me->ResetStuckMonitor();
// const class Zone *zone; // 121 return;
// { }
// Place place; // 126
// { // if we are in the early "safe" time, grab a knife or grenade
// const Vector *spot; // 130 if (me->IsSafe())
// } {
// } // if we have a grenade, use it
// } if (!me->EquipGrenade())
// { {
// int zoneIndex; // 149 // high-skill bots run with the knife
// const Vector *pos; // 152 if (me->GetProfile()->GetSkill() > 0.33f)
// } {
// { me->EquipKnife();
// const class Zone *zone; // 178 }
// { }
// const Vector *pos; // 182 }
// }
// } CCSBotManager *ctrl = TheCSBots();
// {
// const Vector *bombPos; // 228 // if round is over, hunt
// { if (me->GetGameState()->IsRoundOver())
// const class Zone *zone; // 261 {
// } // if we are escorting hostages, try to get to the rescue zone
// { if (me->GetHostageEscortCount())
// const class Zone *zone; // 286 {
// float travelDistance; // 287 const CCSBotManager::Zone *zone = ctrl->GetClosestZone(me->GetLastKnownArea(), PathCost(me, FASTEST_ROUTE));
// { me->SetTask(CCSBot::RESCUE_HOSTAGES);
// int z; // 289 me->Run();
// { me->SetDisposition(CCSBot::SELF_DEFENSE);
// class ShortestPathCost pathCost; // 299 me->MoveTo(ctrl->GetRandomPositionInZone(zone), FASTEST_ROUTE);
// float dist; // 300 me->PrintIfWatched("Trying to rescue hostages at the end of the round\n");
// } return;
// } }
// {
// float const farAwayRange; // 314 me->Hunt();
// } return;
// { }
// int zoneIndex; // 324
// } const float defenseSniperCampChance = 75.0f;
// { const float offenseSniperCampChance = 10.0f;
// const Vector *pos; // 331
// } // if we were following someone, continue following them
// } if (me->IsFollowing())
// } {
// { me->ContinueFollowing();
// class CNavArea *snipingArea; // 368 return;
// { }
// const class Zone *zone; // 379
// } // Scenario logic
// } switch (ctrl->GetScenario())
// { {
// float guardBombsiteChance; // 410 case CCSBotManager::SCENARIO_DEFUSE_BOMB:
// { {
// class CNavArea *area; // 414 static int inumpo = 0;
// float guardRange; // 415 inumpo++;
// const class Zone *zone; // 418
// { // if this is a bomb game and we have the bomb, go plant it
// class CNavArea *area; // 421 if (me->m_iTeam == TERRORIST)
// } {
// } if (me->GetGameState()->IsBombPlanted())
// } {
// { if (me->GetGameState()->GetPlantedBombsite() != CSGameState::UNKNOWN)
// float guardEscapeZoneChance; // 472 {
// { // T's always know where the bomb is - go defend it
// const class Zone *zone; // 450 const CCSBotManager::Zone *zone = ctrl->GetZone(me->GetGameState()->GetPlantedBombsite());
// { me->SetTask(CCSBot::GUARD_TICKING_BOMB);
// class CNavArea *area; // 453
// } Place place = TheNavAreaGrid.GetPlace(&zone->m_center);
// } if (place != UNDEFINED_PLACE)
// { {
// const class Zone *zone; // 477 // pick a random hiding spot in this place
// { const Vector *spot = FindRandomHidingSpot(me, place, me->IsSniper());
// class CNavArea *area; // 480 if (spot != NULL)
// { {
// float escapeGuardRange; // 487 me->Hide(spot);
// } return;
// } }
// } }
// }
// { // hide nearby
// float const earlyTime; // 501 me->Hide(TheNavAreaGrid.GetNearestNavArea(&zone->m_center));
// const class Zone *zone; // 502 return;
// { }
// const Vector *pos; // 518 else
// { {
// float const repeatTime; // 527 // ask our teammates where the bomb is
// } me->GetChatter()->RequestBombLocation();
// }
// } // we dont know where the bomb is - we must search the bombsites
// { int zoneIndex = me->GetGameState()->GetNextBombsiteToSearch();
// bool campHostages; // 556
// float const huntChance; // 625 // move to bombsite - if we reach it, we'll update its cleared status, causing us to select another
// const Vector *hostagePos; // 639 const Vector *pos = ctrl->GetRandomPositionInZone(ctrl->GetZone(zoneIndex));
// { if (pos != NULL)
// float const campZoneChance; // 570 {
// } me->SetTask(CCSBot::FIND_TICKING_BOMB);
// { me->MoveTo(pos);
// const Vector *hostagePos; // 581 return;
// } }
// { }
// class CBaseEntity *hostage; // 607 }
// { else if (me->IsCarryingBomb())
// class CNavArea *area; // 611 {
// } // if we're at a bomb site, plant the bomb
// } if (me->IsAtBombsite())
// { {
// class CNavArea *area; // 642 // plant it
// { me->SetTask(CCSBot::PLANT_BOMB);
// float hostageGuardRange; // 649 me->PlantBomb();
// }
// } // radio to the team
// } me->GetChatter()->PlantingTheBomb(me->GetPlace());
// {
// class CHostage *hostage; // 699 return;
// bool fetchHostages; // 721 }
// bool rescueHostages; // 722 else if (ctrl->IsTimeToPlantBomb())
// const class Zone *zone; // 723 {
// { // move to the closest bomb site
// float const huntChance; // 689 const CCSBotManager::Zone *zone = ctrl->GetClosestZone(me->GetLastKnownArea(), PathCost(me));
// } if (zone != NULL)
// { {
// class CNavArea *area; // 706 // pick a random spot within the bomb zone
// } const Vector *pos = ctrl->GetRandomPositionInZone(zone);
// { if (pos != NULL)
// class PathCost pathCost; // 736 {
// float toZone; // 737 // move to bombsite
// float toHostage; // 738 me->SetTask(CCSBot::PLANT_BOMB);
// } me->Run();
// { me->MoveTo(pos);
// enum RouteType route; // 772
// } return;
// } }
// } }
}
}
else
{
// small chance of sniper camping on offense, if we aren't carrying the bomb
if (me->GetFriendsRemaining() && me->IsSniper() && RANDOM_FLOAT(0, 100.0f) < offenseSniperCampChance)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->Hide(me->GetLastKnownArea(), RANDOM_FLOAT(10.0f, 30.0f), sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->PrintIfWatched("Sniping!\n");
return;
}
// if the bomb is loose (on the ground), go get it
if (me->NoticeLooseBomb())
{
me->FetchBomb();
return;
}
// if bomb has been planted, and we hear it, move to a hiding spot near the bomb and guard it
if (!me->IsRogue() && me->GetGameState()->IsBombPlanted() && me->GetGameState()->GetBombPosition() != NULL)
{
const Vector *bombPos = me->GetGameState()->GetBombPosition();
if (bombPos != NULL)
{
me->SetTask(CCSBot::GUARD_TICKING_BOMB);
me->Hide(TheNavAreaGrid.GetNavArea(bombPos));
return;
}
}
}
}
// CT
else
{
if (me->GetGameState()->IsBombPlanted())
{
// if the bomb has been planted, attempt to defuse it
const Vector *bombPos = me->GetGameState()->GetBombPosition();
if (bombPos != NULL)
{
// if someone is defusing the bomb, guard them
if (ctrl->GetBombDefuser())
{
if (!me->IsRogue())
{
me->SetTask(CCSBot::GUARD_BOMB_DEFUSER);
me->Hide(TheNavAreaGrid.GetNavArea(bombPos));
return;
}
}
else if (me->IsDoingScenario())
{
// move to the bomb and defuse it
me->SetTask(CCSBot::DEFUSE_BOMB);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->MoveTo(bombPos);
return;
}
else
{
// we're not allowed to defuse, guard the bomb zone
me->SetTask(CCSBot::GUARD_BOMB_ZONE);
me->Hide(TheNavAreaGrid.GetNavArea(bombPos));
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
}
else if (me->GetGameState()->GetPlantedBombsite() != CSGameState::UNKNOWN)
{
// we know which bombsite, but not exactly where the bomb is, go there
const CCSBotManager::Zone *zone = ctrl->GetZone(me->GetGameState()->GetPlantedBombsite());
if (zone != NULL)
{
if (me->IsDoingScenario())
{
me->SetTask(CCSBot::DEFUSE_BOMB);
me->MoveTo(&zone->m_center);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
else
{
// we're not allowed to defuse, guard the bomb zone
me->SetTask(CCSBot::GUARD_BOMB_ZONE);
me->Hide(TheNavAreaGrid.GetNavArea(&zone->m_center));
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
}
}
else
{
// we dont know where the bomb is - we must search the bombsites
// find closest un-cleared bombsite
const CCSBotManager::Zone *zone = NULL;
float travelDistance = 9999999.9f;
for (int z = 0; z < ctrl->GetZoneCount(); ++z)
{
if (ctrl->GetZone(z)->m_areaCount == 0)
continue;
// don't check bombsites that have been cleared
if (me->GetGameState()->IsBombsiteClear(z))
continue;
// just use the first overlapping nav area as a reasonable approximation
ShortestPathCost pathCost = ShortestPathCost();
float_precision dist = NavAreaTravelDistance(me->GetLastKnownArea(), TheNavAreaGrid.GetNearestNavArea(&ctrl->GetZone(z)->m_center), pathCost);
if (/*dist >= 0.0f && */dist < travelDistance)
{
zone = ctrl->GetZone(z);
travelDistance = dist;
}
}
if (zone != NULL)
{
const float farAwayRange = 2000.0f;
if (travelDistance > farAwayRange)
{
zone = NULL;
}
}
// if closest bombsite is "far away", pick one at random
if (zone == NULL)
{
int zoneIndex = me->GetGameState()->GetNextBombsiteToSearch();
zone = ctrl->GetZone(zoneIndex);
}
// move to bombsite - if we reach it, we'll update its cleared status, causing us to select another
if (zone != NULL)
{
const Vector *pos = ctrl->GetRandomPositionInZone(zone);
if (pos != NULL)
{
me->SetTask(CCSBot::FIND_TICKING_BOMB);
me->MoveTo(pos);
return;
}
}
}
assert((0, "A CT bot doesn't know what to do while the bomb is planted!\n"));
}
// if we have a sniper rifle, we like to camp, whether rogue or not
if (me->IsSniper())
{
if (RANDOM_FLOAT(0, 100) <= defenseSniperCampChance)
{
CNavArea *snipingArea = NULL;
// if the bomb is loose, snipe near it
if (me->GetGameState()->IsLooseBombLocationKnown())
{
snipingArea = TheNavAreaGrid.GetNearestNavArea(me->GetGameState()->GetBombPosition());
me->PrintIfWatched("Sniping near loose bomb\n");
}
else
{
// snipe bomb zone(s)
const CCSBotManager::Zone *zone = ctrl->GetRandomZone();
if (zone != NULL)
{
snipingArea = ctrl->GetRandomAreaInZone(zone);
me->PrintIfWatched("Sniping near bombsite\n");
}
}
if (snipingArea != NULL)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->Hide(snipingArea, -1.0f, sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
}
}
// rogues just hunt, unless they want to snipe
// if the whole team has decided to rush, hunt
// if we know the bomb is dropped, hunt for enemies and the loose bomb
if (me->IsRogue() || ctrl->IsDefenseRushing() || me->GetGameState()->IsLooseBombLocationKnown())
{
me->Hunt();
return;
}
// the lower our morale gets, the more we want to camp the bomb zone(s)
// only decide to camp at the start of the round, or if we haven't seen anything for a long time
if (me->IsSafe() || me->HasNotSeenEnemyForLongTime())
{
float guardBombsiteChance = -34.0f * me->GetMorale();
if (RANDOM_FLOAT(0.0f, 100.0f) < guardBombsiteChance)
{
float guardRange = 500.0f + 100.0f * (me->GetMorale() + 3);
// guard bomb zone(s)
const CCSBotManager::Zone *zone = ctrl->GetRandomZone();
if (zone != NULL)
{
CNavArea *area = ctrl->GetRandomAreaInZone(zone);
if (area != NULL)
{
me->PrintIfWatched("I'm guarding a bombsite\n");
me->GetChatter()->AnnouncePlan("GoingToDefendBombsite", area->GetPlace());
me->SetTask(CCSBot::GUARD_BOMB_ZONE);
me->Hide(area, -1.0, guardRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
}
}
}
}
break;
}
case CCSBotManager::SCENARIO_ESCORT_VIP:
{
if (me->m_iTeam == TERRORIST)
{
// if we have a sniper rifle, we like to camp, whether rogue or not
if (me->IsSniper())
{
if (RANDOM_FLOAT(0, 100) <= defenseSniperCampChance)
{
// snipe escape zone(s)
const CCSBotManager::Zone *zone = ctrl->GetRandomZone();
if (zone != NULL)
{
CNavArea *area = ctrl->GetRandomAreaInZone(zone);
if (area != NULL)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->Hide(area, -1.0, sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->PrintIfWatched("Sniping near escape zone\n");
return;
}
}
}
}
// rogues just hunt, unless they want to snipe
// if the whole team has decided to rush, hunt
if (me->IsRogue() || ctrl->IsDefenseRushing())
break;
// the lower our morale gets, the more we want to camp the escape zone(s)
float guardEscapeZoneChance = -34.0f * me->GetMorale();
if (RANDOM_FLOAT(0.0f, 100.0f) < guardEscapeZoneChance)
{
// guard escape zone(s)
const CCSBotManager::Zone *zone = ctrl->GetRandomZone();
if (zone != NULL)
{
CNavArea *area = ctrl->GetRandomAreaInZone(zone);
if (area != NULL)
{
// guard the escape zone - stay closer if our morale is low
me->SetTask(CCSBot::GUARD_VIP_ESCAPE_ZONE);
me->PrintIfWatched("I'm guarding an escape zone\n");
float escapeGuardRange = 750.0f + 250.0f * (me->GetMorale() + 3);
me->Hide(area, -1.0, escapeGuardRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
}
}
}
// CT
else
{
if (me->m_bIsVIP)
{
// if early in round, pick a random zone, otherwise pick closest zone
const float earlyTime = 20.0f;
const CCSBotManager::Zone *zone = NULL;
if (ctrl->GetElapsedRoundTime() < earlyTime)
{
// pick random zone
zone = ctrl->GetRandomZone();
}
else
{
// pick closest zone
zone = ctrl->GetClosestZone(me->GetLastKnownArea(), PathCost(me));
}
if (zone != NULL)
{
// pick a random spot within the escape zone
const Vector *pos = ctrl->GetRandomPositionInZone(zone);
if (pos != NULL)
{
// move to escape zone
me->SetTask(CCSBot::VIP_ESCAPE);
me->Run();
me->MoveTo(pos);
// tell team to follow
const float repeatTime = 30.0f;
if (me->GetFriendsRemaining() && ctrl->GetRadioMessageInterval(EVENT_RADIO_FOLLOW_ME, me->m_iTeam) > repeatTime)
me->SendRadioMessage(EVENT_RADIO_FOLLOW_ME);
return;
}
}
}
else
{
// small chance of sniper camping on offense, if we aren't VIP
if (me->GetFriendsRemaining() && me->IsSniper() && RANDOM_FLOAT(0, 100.0f) < offenseSniperCampChance)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->Hide(me->GetLastKnownArea(), RANDOM_FLOAT(10.0f, 30.0f), sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->PrintIfWatched("Sniping!\n");
return;
}
}
}
break;
}
case CCSBotManager::SCENARIO_RESCUE_HOSTAGES:
{
if (me->m_iTeam == TERRORIST)
{
bool campHostages;
// if we are in early game, camp the hostages
if (me->IsSafe())
{
campHostages = true;
}
else if (me->GetGameState()->HaveSomeHostagesBeenTaken() || me->GetGameState()->AreAllHostagesBeingRescued())
{
campHostages = false;
}
else
{
// later in the game, camp either hostages or escape zone
const float campZoneChance = 100.0f * (ctrl->GetElapsedRoundTime() - me->GetSafeTime()) / 120.0f;
campHostages = (RANDOM_FLOAT(0, 100) > campZoneChance) ? true : false;
}
// if we have a sniper rifle, we like to camp, whether rogue or not
if (me->IsSniper())
{
if (RANDOM_FLOAT(0, 100) <= defenseSniperCampChance)
{
const Vector *hostagePos = me->GetGameState()->GetRandomFreeHostagePosition();
if (hostagePos != NULL && campHostages)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->PrintIfWatched("Sniping near hostages\n");
me->Hide(TheNavAreaGrid.GetNearestNavArea(hostagePos), -1.0, sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
else
{
// camp the escape zone(s)
if (me->GuardRandomZone(sniperHideRange))
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->PrintIfWatched("Sniping near a rescue zone\n");
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
return;
}
}
}
}
// if safe time is up, and we stumble across a hostage, guard it
if (!me->IsSafe() && !me->IsRogue())
{
CBaseEntity *hostage = me->GetGameState()->GetNearestVisibleFreeHostage();
if (hostage != NULL)
{
// we see a free hostage, guard it
CNavArea *area = TheNavAreaGrid.GetNearestNavArea(&hostage->pev->origin);
if (area != NULL)
{
me->SetTask(CCSBot::GUARD_HOSTAGES);
me->Hide(area);
me->PrintIfWatched("I'm guarding hostages I found\n");
// don't chatter here - he'll tell us when he's in his hiding spot
return;
}
}
}
// decide if we want to hunt, or guard
const float huntChance = 70.0f + 25.0f * me->GetMorale();
// rogues just hunt, unless they want to snipe
// if the whole team has decided to rush, hunt
if (me->GetFriendsRemaining())
{
if (me->IsRogue() || ctrl->IsDefenseRushing() || RANDOM_FLOAT(0, 100) < huntChance)
{
me->Hunt();
return;
}
}
// decide whether to camp the hostages or the escape zones
const Vector *hostagePos = me->GetGameState()->GetRandomFreeHostagePosition();
if (hostagePos != NULL && campHostages)
{
CNavArea *area = TheNavAreaGrid.GetNearestNavArea(hostagePos);
if (area != NULL)
{
// guard the hostages - stay closer to hostages if our morale is low
me->SetTask(CCSBot::GUARD_HOSTAGES);
me->PrintIfWatched("I'm guarding hostages\n");
float hostageGuardRange = 750.0f + 250.0f * (me->GetMorale() + 3);
me->Hide(area, -1.0, hostageGuardRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
if (RANDOM_FLOAT(0, 100) < 50)
me->GetChatter()->GuardingHostages(area->GetPlace(), IS_PLAN);
return;
}
}
// guard rescue zone(s)
if (me->GuardRandomZone())
{
me->SetTask(CCSBot::GUARD_HOSTAGE_RESCUE_ZONE);
me->PrintIfWatched("I'm guarding a rescue zone\n");
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->GetChatter()->GuardingHostageEscapeZone(IS_PLAN);
return;
}
}
// CT
else
{
// only decide to do something else if we aren't already rescuing hostages
if (!me->GetHostageEscortCount())
{
// small chance of sniper camping on offense
if (me->GetFriendsRemaining() && me->IsSniper() && RANDOM_FLOAT(0, 100.0f) < offenseSniperCampChance)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->Hide(me->GetLastKnownArea(), RANDOM_FLOAT(10.0f, 30.0f), sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->PrintIfWatched("Sniping!\n");
return;
}
if (me->GetFriendsRemaining() && !me->GetHostageEscortCount())
{
// rogues just hunt, unless all friends are dead
// if we have friends left, we might go hunting instead of hostage rescuing
const float huntChance = 33.3f;
if (me->IsRogue() || RANDOM_FLOAT(0.0f, 100.0f) < huntChance)
{
me->Hunt();
return;
}
}
}
// look for free hostages - CT's have radar so they know where hostages are at all times
CHostage *hostage = me->GetGameState()->GetNearestFreeHostage();
// if we are not allowed to do the scenario, guard the hostages to clear the area for the human(s)
if (!me->IsDoingScenario())
{
if (hostage != NULL)
{
CNavArea *area = TheNavAreaGrid.GetNearestNavArea(&hostage->pev->origin);
if (area != NULL)
{
me->SetTask(CCSBot::GUARD_HOSTAGES);
me->Hide(area);
me->PrintIfWatched("I'm securing the hostages for a human to rescue\n");
return;
}
}
me->Hunt();
return;
}
bool fetchHostages = false;
bool rescueHostages = false;
const CCSBotManager::Zone *zone = NULL;
me->SetGoalEntity(NULL);
// if we are escorting hostages, determine where to take them
if (me->GetHostageEscortCount())
zone = ctrl->GetClosestZone(me->GetLastKnownArea(), PathCost(me, FASTEST_ROUTE));
// if we are escorting hostages and there are more hostages to rescue,
// determine whether it's faster to rescue the ones we have, or go get the remaining ones
if (hostage != NULL)
{
if (zone != NULL)
{
PathCost pathCost(me, FASTEST_ROUTE);
float toZone = NavAreaTravelDistance(me->GetLastKnownArea(), zone->m_area[0], pathCost);
float toHostage = NavAreaTravelDistance(me->GetLastKnownArea(), TheNavAreaGrid.GetNearestNavArea(&hostage->pev->origin), pathCost);
if (toHostage < 0.0f)
{
rescueHostages = true;
}
else
{
if (toZone < toHostage)
rescueHostages = true;
else
fetchHostages = true;
}
}
else
{
fetchHostages = true;
}
}
else if (zone != NULL)
{
rescueHostages = true;
}
if (fetchHostages)
{
// go get hostages
me->SetTask(CCSBot::COLLECT_HOSTAGES);
me->Run();
me->SetGoalEntity(hostage);
me->ResetWaitForHostagePatience();
// if we already have some hostages, move to the others by the quickest route
RouteType route = (me->GetHostageEscortCount()) ? FASTEST_ROUTE : SAFEST_ROUTE;
me->MoveTo(&hostage->pev->origin, route);
me->PrintIfWatched("I'm collecting hostages\n");
return;
}
if (rescueHostages)
{
me->SetTask(CCSBot::RESCUE_HOSTAGES);
me->Run();
me->SetDisposition(CCSBot::SELF_DEFENSE);
me->MoveTo(ctrl->GetRandomPositionInZone(zone), FASTEST_ROUTE);
me->PrintIfWatched("I'm rescuing hostages\n");
me->GetChatter()->EscortingHostages();
return;
}
}
break;
}
// deathmatch
default:
{
// sniping check
if (me->GetFriendsRemaining() && me->IsSniper() && RANDOM_FLOAT(0, 100.0f) < offenseSniperCampChance)
{
me->SetTask(CCSBot::MOVE_TO_SNIPER_SPOT);
me->Hide(me->GetLastKnownArea(), RANDOM_FLOAT(10.0f, 30.0f), sniperHideRange);
me->SetDisposition(CCSBot::OPPORTUNITY_FIRE);
me->PrintIfWatched("Sniping!\n");
return;
}
break;
}
}
// if we have nothing special to do, go hunting for enemies
me->Hunt();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -3,47 +3,117 @@
// Move towards currently heard noise // Move towards currently heard noise
/* <5b3114> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:17 */ /* <5b3114> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:17 */
NOBODY void InvestigateNoiseState::AttendCurrentNoise(CCSBot *me) void InvestigateNoiseState::AttendCurrentNoise(CCSBot *me)
{ {
// IsNoiseHeard(const class CCSBot *const this); // 19 if (!me->IsNoiseHeard() && me->GetNoisePosition())
return;
// remember where the noise we heard was
m_checkNoisePosition = *me->GetNoisePosition();
// tell our teammates (unless the noise is obvious, like gunfire)
if (me->IsWellPastSafe() && me->HasNotSeenEnemyForLongTime() && me->GetNoisePriority() != PRIORITY_HIGH)
me->GetChatter()->HeardNoise(me->GetNoisePosition());
// figure out how to get to the noise
me->PrintIfWatched("Attending to noise...\n");
me->ComputePath(me->GetNoiseArea(), &m_checkNoisePosition, SAFEST_ROUTE);
// consume the noise
me->ForgetNoise();
} }
/* <5b2f37> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:38 */ /* <5b2f37> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:38 */
NOBODY void InvestigateNoiseState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void InvestigateNoiseState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// AttendCurrentNoise(InvestigateNoiseState *const this, AttendCurrentNoise(me);
// class CCSBot *me); // 40
} }
// Use TravelDistance instead of distance...
/* <5b2fa2> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:47 */ /* <5b2fa2> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:47 */
NOBODY void InvestigateNoiseState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void InvestigateNoiseState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { float newNoiseDist;
// float newNoiseDist; // 50 if (me->ShouldInvestigateNoise(&newNoiseDist))
// float noiseDist; // 74 {
// float const nearDist; // 111 Vector toOldNoise = m_checkNoisePosition - me->pev->origin;
// { const float muchCloserDist = 100.0f;
// Vector toOldNoise; // 54 if (toOldNoise.IsLengthGreaterThan(newNoiseDist + muchCloserDist))
// float const muchCloserDist; // 56 {
// operator-(const Vector *const this, // new sound is closer
// const Vector &v); // 54 AttendCurrentNoise(me);
// IsLengthGreaterThan(const Vector *const this, }
// float length); // 57 }
// AttendCurrentNoise(InvestigateNoiseState *const this,
// class CCSBot *me); // 60 // if the pathfind fails, give up
// } if (!me->HasPath())
// operator-(const Vector *const this, {
// const Vector &v); // 74 me->Idle();
// Length(const Vector *const this); // 74 return;
// { }
// float const closeToNoiseRange; // 85
// } // look around
// } me->UpdateLookAround();
// get distance remaining on our path until we reach the source of the noise
float noiseDist = (m_checkNoisePosition - me->pev->origin).Length();
if (me->IsUsingKnife())
{
if (me->IsHurrying())
me->Run();
else
me->Walk();
}
else
{
const float closeToNoiseRange = 1500.0f;
if (noiseDist < closeToNoiseRange)
{
// if we dont have many friends left, or we are alone, and we are near noise source, sneak quietly
if (me->GetFriendsRemaining() <= 2 && !me->IsHurrying())
{
me->Walk();
}
else
{
me->Run();
}
}
else
{
me->Run();
}
}
// if we can see the noise position and we're close enough to it and looking at it,
// we don't need to actually move there (it's checked enough)
const float closeRange = 200.0f;
if (noiseDist < closeRange)
{
if (me->IsLookingAtPosition(&m_checkNoisePosition) && me->IsVisible(&m_checkNoisePosition))
{
// can see noise position
me->PrintIfWatched("Noise location is clear.\n");
//me->ForgetNoise();
me->Idle();
return;
}
}
// move towards noise
if (me->UpdatePathMovement() != CCSBot::PROGRESSING)
{
me->Idle();
}
} }
/* <5b2e95> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:129 */ /* <5b2e95> ../cstrike/dlls/bot/states/cs_bot_investigate_noise.cpp:129 */
NOBODY void InvestigateNoiseState::__MAKE_VHOOK(OnExit)(CCSBot *me) void InvestigateNoiseState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
// reset to run mode in case we were sneaking about
me->Run();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -1,89 +1,304 @@
#include "precompiled.h" #include "precompiled.h"
// Move to a potentially far away position.
/* <5c4e91> ../cstrike/dlls/bot/states/cs_bot_move_to.cpp:21 */ /* <5c4e91> ../cstrike/dlls/bot/states/cs_bot_move_to.cpp:21 */
NOBODY void MoveToState::__MAKE_VHOOK(OnEnter)(CCSBot *me) void MoveToState::__MAKE_VHOOK(OnEnter)(CCSBot *me)
{ {
// { if (me->IsUsingKnife() && me->IsWellPastSafe() && !me->IsHurrying())
// enum RouteType route; // 30 {
// } me->Walk();
}
else
{
me->Run();
}
// if we need to find the bomb, get there as quick as we can
RouteType route;
switch (me->GetTask())
{
case CCSBot::FIND_TICKING_BOMB:
case CCSBot::DEFUSE_BOMB:
case CCSBot::MOVE_TO_LAST_KNOWN_ENEMY_POSITION:
route = FASTEST_ROUTE;
break;
default:
route = SAFEST_ROUTE;
break;
}
// build path to, or nearly to, goal position
me->ComputePath(TheNavAreaGrid.GetNavArea(&m_goalPosition), &m_goalPosition, route);
m_radioedPlan = false;
m_askedForCover = false;
} }
// Move to a potentially far away position.
/* <5c4edf> ../cstrike/dlls/bot/states/cs_bot_move_to.cpp:55 */ /* <5c4edf> ../cstrike/dlls/bot/states/cs_bot_move_to.cpp:55 */
NOBODY void MoveToState::__MAKE_VHOOK(OnUpdate)(CCSBot *me) void MoveToState::__MAKE_VHOOK(OnUpdate)(CCSBot *me)
{ {
// { CCSBotManager *ctrl = TheCSBots();
// class CCSBotManager *ctrl; // 76
// { // assume that we are paying attention and close enough to know our enemy died
// class CBasePlayer *victim; // 61 if (me->GetTask() == CCSBot::MOVE_TO_LAST_KNOWN_ENEMY_POSITION)
// GetTaskEntity(CCSBot *const this); // 61 {
// } // TODO: Account for reaction time so we take some time to realized the enemy is dead
// { CBasePlayer *victim = static_cast<CBasePlayer *>(me->GetTaskEntity());
// float const nearPlantSite; // 161 if (victim == NULL || !victim->IsAlive())
// { {
// float const radioTime; // 173 me->PrintIfWatched("The enemy I was chasing was killed - giving up.\n");
// } me->Idle();
// } return;
// Say(BotChatterInterface *const this, }
// const char *phraseName, }
// float lifetime,
// float delay); // 140 // look around
// { me->UpdateLookAround();
// class CHostage *hostage; // 197
// float const repathToleranceSq; // 205 // Scenario logic
// float error; // 206 switch (ctrl->GetScenario())
// GetGoalEntity(CCSBot *const this); // 197 {
// IsValid(CHostage *const this); // 198 case CCSBotManager::SCENARIO_DEFUSE_BOMB:
// IsFollowingSomeone(CHostage *const this); // 198 {
// operator-(const Vector *const this, // if the bomb has been planted, find it
// const Vector &v); // 206 // NOTE: This task is used by both CT and T's to find the bomb
// LengthSquared(const Vector *const this); // 206 if (me->GetTask() == CCSBot::FIND_TICKING_BOMB)
// { {
// Vector pos; // 216 if (!me->GetGameState()->IsBombPlanted())
// Vector to; // 217 {
// float const watchHostageRange; // 220 // the bomb is not planted - give up this task
// operator+(const Vector *const this, me->Idle();
// const Vector &v); // 216 return;
// operator-(const Vector *const this, }
// const Vector &v); // 217
// IsLengthLessThan(const Vector *const this, if (me->GetGameState()->GetPlantedBombsite() != CSGameState::UNKNOWN)
// float length); // 221 {
// { // we know where the bomb is planted, stop searching
// enum NavRelativeDirType dir; // 226 me->Idle();
// float const useRange; // 236 return;
// GetGoalEntity(CCSBot *const this); // 239 }
// }
// } // check off bombsites that we explore or happen to stumble into
// } for (int z = 0; z < ctrl->GetZoneCount(); ++z)
// { {
// int z; // 100 // don't re-check zones
// Contains(const class Extent *const this, if (me->GetGameState()->IsBombsiteClear(z))
// const Vector *pos); // 106 continue;
// }
// { if (ctrl->GetZone(z)->m_extent.Contains(&me->pev->origin))
// const Vector *bombPos; // 284 {
// IsActiveWeaponReloading(const class CBot *const this); // 278 // note this bombsite is clear
// { me->GetGameState()->ClearBombsite(z);
// Vector toBomb; // 287
// float const defuseRange; // 291 if (me->m_iTeam == CT)
// GetFeetZ(const class CCSBot *const this); // 290 {
// IsLengthLessThan(const Vector *const this, // tell teammates this bombsite is clear
// float length); // 292 me->GetChatter()->BombsiteClear(z);
// } }
// }
// { // find another zone to check
// class CBasePlayer *victim; // 303 me->Idle();
// GetTaskEntity(CCSBot *const this); // 303 return;
// Say(BotChatterInterface *const this, }
// const char *phraseName, }
// float lifetime,
// float delay); // 307 // move to a bombsite
// } break;
// } }
else if (me->m_iTeam == CT)
{
if (me->GetGameState()->IsBombPlanted())
{
switch (me->GetTask())
{
case CCSBot::DEFUSE_BOMB:
{
// if we are trying to defuse the bomb, and someone has started defusing, guard them instead
if (me->CanSeePlantedBomb() && ctrl->GetBombDefuser())
{
me->GetChatter()->Say("CoveringFriend");
me->Idle();
return;
}
break;
}
default:
{
// we need to find the bomb
me->Idle();
return;
}
}
}
}
// TERRORIST
else
{
if (me->GetTask() == CCSBot::PLANT_BOMB)
{
if (me->GetFriendsRemaining())
{
// if we are about to plant, radio for cover
if (!m_askedForCover)
{
const float nearPlantSite = 50.0f;
if (me->IsAtBombsite() && me->GetPathDistanceRemaining() < nearPlantSite)
{
// radio to the team
me->GetChatter()->PlantingTheBomb(me->GetPlace());
m_askedForCover = true;
}
// after we have started to move to the bombsite, tell team we're going to plant, and where
// don't do this if we have already radioed that we are starting to plant
if (!m_radioedPlan)
{
const float radioTime = 2.0f;
if (gpGlobals->time - me->GetStateTimestamp() > radioTime)
{
me->GetChatter()->GoingToPlantTheBomb(TheNavAreaGrid.GetPlace(&m_goalPosition));
m_radioedPlan = true;
}
}
}
}
}
}
break;
}
case CCSBotManager::SCENARIO_RESCUE_HOSTAGES:
{
if (me->GetTask() == CCSBot::COLLECT_HOSTAGES)
{
// Since CT's have a radar, they can directly look at the actual hostage state
// check if someone else collected our hostage, or the hostage died or was rescued
CHostage *hostage = static_cast<CHostage *>(me->GetGoalEntity());
if (hostage == NULL || !hostage->IsValid() || hostage->IsFollowingSomeone())
{
me->Idle();
return;
}
// if our hostage has moved, repath
const float repathToleranceSq = 75.0f * 75.0f;
float error = (hostage->pev->origin - m_goalPosition).LengthSquared();
if (error > repathToleranceSq)
{
m_goalPosition = hostage->pev->origin;
me->ComputePath(TheNavAreaGrid.GetNavArea(&m_goalPosition), &m_goalPosition, SAFEST_ROUTE);
}
// TODO: Generalize ladder priorities over other tasks
if (!me->IsUsingLadder())
{
Vector pos = hostage->pev->origin + Vector(0, 0, HumanHeight * 0.75f);
Vector to = pos - me->pev->origin;
// look at the hostage as we approach
const float watchHostageRange = 100.0f;
if (to.IsLengthLessThan(watchHostageRange))
{
me->SetLookAt("Hostage", &pos, PRIORITY_LOW, 0.5f);
// randomly move just a bit to avoid infinite use loops from bad hostage placement
NavRelativeDirType dir = (NavRelativeDirType)RANDOM_LONG(0, 3);
switch (dir)
{
case LEFT: me->StrafeLeft(); break;
case RIGHT: me->StrafeRight(); break;
case FORWARD: me->MoveForward(); break;
case BACKWARD: me->MoveBackward(); break;
}
// check if we are close enough to the hostage to talk to him
const float useRange = PLAYER_USE_RADIUS - 14.0f; // shave off a fudge factor to make sure we're within range
if (to.IsLengthLessThan(useRange))
{
me->UseEntity(me->GetGoalEntity());
return;
}
}
}
}
else if (me->GetTask() == CCSBot::RESCUE_HOSTAGES)
{
// periodically check if we lost all our hostages
if (me->GetHostageEscortCount() == 0)
{
// lost our hostages - go get 'em
me->Idle();
return;
}
}
break;
}
}
if (me->UpdatePathMovement() != CCSBot::PROGRESSING)
{
// reached destination
switch (me->GetTask())
{
case CCSBot::PLANT_BOMB:
{
// if we are at bombsite with the bomb, plant it
if (me->IsAtBombsite() && me->IsCarryingBomb())
{
me->PlantBomb();
return;
}
break;
}
case CCSBot::DEFUSE_BOMB:
{
if (!me->IsActiveWeaponReloading())
{
// if we are near the bomb, defuse it (if we are reloading, don't try to defuse until we finish)
const Vector *bombPos = me->GetGameState()->GetBombPosition();
if (bombPos != NULL)
{
const float defuseRange = 100.0f;
Vector toBomb = *bombPos - me->pev->origin + Vector(0, 0, me->GetFeetZ());
if (toBomb.IsLengthLessThan(defuseRange))
{
me->DefuseBomb();
return;
}
}
}
break;
}
case CCSBot::MOVE_TO_LAST_KNOWN_ENEMY_POSITION:
{
CBasePlayer *victim = static_cast<CBasePlayer *>(me->GetTaskEntity());
if (victim != NULL && victim->IsAlive())
{
// if we got here and haven't re-acquired the enemy, we lost him
me->GetChatter()->Say("LostEnemy");
}
break;
}
}
// default behavior when destination is reached
me->Idle();
return;
}
} }
/* <5c4e54> ../cstrike/dlls/bot/states/cs_bot_move_to.cpp:320 */ /* <5c4e54> ../cstrike/dlls/bot/states/cs_bot_move_to.cpp:320 */
NOBODY void MoveToState::__MAKE_VHOOK(OnExit)(CCSBot *me) void MoveToState::__MAKE_VHOOK(OnExit)(CCSBot *me)
{ {
// reset to run in case we were walking near our goal position
me->Run();
me->SetDisposition(CCSBot::ENGAGE_AND_INVESTIGATE);
//me->StopAiming();
} }
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -483,7 +483,7 @@ void CCareerTaskManager::AddTask(const char *taskName, const char *weaponName, i
{ {
++m_nextId; ++m_nextId;
for (int i = 0; i < ARRAYSIZE(taskInfo); i++) for (int i = 0; i < ARRAYSIZE(taskInfo); ++i)
{ {
const TaskInfo *pTaskInfo = &taskInfo[ i ]; const TaskInfo *pTaskInfo = &taskInfo[ i ];
@ -598,9 +598,9 @@ void CCareerTaskManager::HandleDeath(int team, CBasePlayer *pAttacker)
if (enemyTeam != team) if (enemyTeam != team)
return; return;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer && pPlayer->m_iTeam == enemyTeam && pPlayer->IsAlive()) if (pPlayer && pPlayer->m_iTeam == enemyTeam && pPlayer->IsAlive())
++numEnemies; ++numEnemies;

View File

@ -117,7 +117,7 @@ void EmptyEntityHashTable(void)
int i; int i;
hash_item_t *item, *temp, *free; hash_item_t *item, *temp, *free;
for (i = 0; i < stringsHashTable.Count(); i++) for (i = 0; i < stringsHashTable.Count(); ++i)
{ {
item = &stringsHashTable[i]; item = &stringsHashTable[i];
temp = item->next; temp = item->next;
@ -281,7 +281,7 @@ void RemoveEntityHashValue(entvars_t *pev, const char *value, hash_types_e field
/* <31125> ../cstrike/dlls/cbase.cpp:337 */ /* <31125> ../cstrike/dlls/cbase.cpp:337 */
void printEntities(void) void printEntities(void)
{ {
for (int i = 0; i < stringsHashTable.Count(); i++) for (int i = 0; i < stringsHashTable.Count(); ++i)
{ {
hash_item_t *item = &stringsHashTable[i]; hash_item_t *item = &stringsHashTable[i];
@ -342,7 +342,7 @@ void loopPerformance(void)
start = loopCounter.GetCurTime(); start = loopCounter.GetCurTime();
for (i = 0; i < 100; i++) for (i = 0; i < 100; ++i)
{ {
CBaseEntity *pSpot; CBaseEntity *pSpot;
for (pSpot = UTIL_FindEntityByString_Old(NULL, "classname", "info_player_start"); pSpot != NULL; pSpot = UTIL_FindEntityByString_Old(pSpot, "classname", "info_player_start")) for (pSpot = UTIL_FindEntityByString_Old(NULL, "classname", "info_player_start"); pSpot != NULL; pSpot = UTIL_FindEntityByString_Old(pSpot, "classname", "info_player_start"))
@ -364,7 +364,7 @@ void loopPerformance(void)
// check time new search loop // check time new search loop
start = loopCounter.GetCurTime(); start = loopCounter.GetCurTime();
for (i = 0; i < 100; i++) for (i = 0; i < 100; ++i)
{ {
CBaseEntity *pSpot; CBaseEntity *pSpot;
for (pSpot = UTIL_FindEntityByString(NULL, "classname", "info_player_start"); pSpot != NULL; pSpot = UTIL_FindEntityByString(pSpot, "classname", "info_player_start")) for (pSpot = UTIL_FindEntityByString(NULL, "classname", "info_player_start"); pSpot != NULL; pSpot = UTIL_FindEntityByString(pSpot, "classname", "info_player_start"))
@ -392,7 +392,7 @@ C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion
Q_memcpy(pFunctionTable, &gFunctionTable, sizeof(DLL_FUNCTIONS)); Q_memcpy(pFunctionTable, &gFunctionTable, sizeof(DLL_FUNCTIONS));
stringsHashTable.AddMultipleToTail(2048); stringsHashTable.AddMultipleToTail(2048);
for (int i = 0; i < stringsHashTable.Count(); i++) for (int i = 0; i < stringsHashTable.Count(); ++i)
{ {
stringsHashTable[i].next = NULL; stringsHashTable[i].next = NULL;
} }
@ -968,7 +968,7 @@ void SetObjectCollisionBox(entvars_t *pev)
int i; int i;
max = 0; max = 0;
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
v = fabs((float_precision)((float *)pev->mins)[i]); v = fabs((float_precision)((float *)pev->mins)[i]);
if (v > max) if (v > max)
@ -982,7 +982,7 @@ void SetObjectCollisionBox(entvars_t *pev)
max = v; max = v;
} }
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
((float *)pev->absmin)[i] = ((float *)pev->origin)[i] - max; ((float *)pev->absmin)[i] = ((float *)pev->origin)[i] - max;
((float *)pev->absmax)[i] = ((float *)pev->origin)[i] + max; ((float *)pev->absmax)[i] = ((float *)pev->origin)[i] + max;

View File

@ -88,7 +88,7 @@ int CMD_ARGC_(void)
int i = 0; int i = 0;
while (BotArgs[i]) while (BotArgs[i])
i++; ++i;
return i; return i;
} }
@ -352,7 +352,7 @@ int CountTeamPlayers(int iTeam)
continue; continue;
if (GetClassPtr((CBasePlayer *)pPlayer->pev)->m_iTeam == iTeam) if (GetClassPtr((CBasePlayer *)pPlayer->pev)->m_iTeam == iTeam)
i++; ++i;
} }
return i; return i;
@ -3637,7 +3637,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity)
player->m_bNightVisionOn = false; player->m_bNightVisionOn = false;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
@ -3663,7 +3663,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity)
player->m_bNightVisionOn = true; player->m_bNightVisionOn = true;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
@ -3798,7 +3798,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity)
{ {
player->ClearAutoBuyData(); player->ClearAutoBuyData();
for (int i = 1; i < CMD_ARGC_(); i++) for (int i = 1; i < CMD_ARGC_(); ++i)
{ {
player->AddAutoBuyData(CMD_ARGV_(i)); player->AddAutoBuyData(CMD_ARGV_(i));
} }
@ -3973,7 +3973,7 @@ void EXT_FUNC ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
EmptyEntityHashTable(); EmptyEntityHashTable();
// Clients have not been initialized yet // Clients have not been initialized yet
for (i = 0; i < edictCount; i++) for (i = 0; i < edictCount; ++i)
{ {
edict_t *pEdict = &pEdictList[i]; edict_t *pEdict = &pEdictList[i];
@ -4222,12 +4222,12 @@ void ClientPrecache(void)
else else
numPlayerModels = ARRAYSIZE(sPlayerModelFiles) - 2; numPlayerModels = ARRAYSIZE(sPlayerModelFiles) - 2;
for (i = 0; i < numPlayerModels; i++) for (i = 0; i < numPlayerModels; ++i)
PRECACHE_MODEL(sPlayerModelFiles[i]); PRECACHE_MODEL(sPlayerModelFiles[i]);
if (isCZero) if (isCZero)
{ {
for (i = FirstCustomSkin; i <= LastCustomSkin; i++) for (i = FirstCustomSkin; i <= LastCustomSkin; ++i)
{ {
const char *fname = TheBotProfiles->GetCustomSkinFname(i); const char *fname = TheBotProfiles->GetCustomSkinFname(i);
@ -4287,12 +4287,12 @@ void ClientPrecache(void)
Vector vMin = Vector(-38, -24, -41); Vector vMin = Vector(-38, -24, -41);
Vector vMax = Vector(38, 24, 41); Vector vMax = Vector(38, 24, 41);
for (i = 0; i < numPlayerModels; i++) for (i = 0; i < numPlayerModels; ++i)
ENGINE_FORCE_UNMODIFIED(force_model_specifybounds, (float *)&vMin, (float *)&vMax, sPlayerModelFiles[i]); ENGINE_FORCE_UNMODIFIED(force_model_specifybounds, (float *)&vMin, (float *)&vMax, sPlayerModelFiles[i]);
if (isCZero) if (isCZero)
{ {
for (i = FirstCustomSkin; i <= LastCustomSkin; i++) for (i = FirstCustomSkin; i <= LastCustomSkin; ++i)
{ {
const char *fname = TheBotProfiles->GetCustomSkinFname(i); const char *fname = TheBotProfiles->GetCustomSkinFname(i);
@ -4663,7 +4663,7 @@ bool CheckPlayerPVSLeafChanged(edict_t *client, int clientnum)
if (pvs->headnode != client->headnode || pvs->num_leafs != client->num_leafs) if (pvs->headnode != client->headnode || pvs->num_leafs != client->num_leafs)
return true; return true;
for (int i = 0; i < pvs->num_leafs; i++) for (int i = 0; i < pvs->num_leafs; ++i)
{ {
if (client->leafnums[i] != pvs->leafnums[i]) if (client->leafnums[i] != pvs->leafnums[i])
return true; return true;
@ -4794,10 +4794,10 @@ int EXT_FUNC AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, ed
state->framerate = ent->v.framerate; state->framerate = ent->v.framerate;
state->body = ent->v.body; state->body = ent->v.body;
for (i = 0; i < 4; i++) for (i = 0; i < 4; ++i)
state->controller[i] = ent->v.controller[i]; state->controller[i] = ent->v.controller[i];
for (i = 0; i < 2; i++) for (i = 0; i < 2; ++i)
state->blending[i] = ent->v.blending[i]; state->blending[i] = ent->v.blending[i];
state->rendermode = ent->v.rendermode; state->rendermode = ent->v.rendermode;
@ -5086,7 +5086,7 @@ int EXT_FUNC GetWeaponData(edict_s *player, struct weapon_data_s *info)
return 1; return 1;
} }
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
CBasePlayerItem *pPlayerItem = pl->m_rgpPlayerItems[i]; CBasePlayerItem *pPlayerItem = pl->m_rgpPlayerItems[i];

View File

@ -25,7 +25,7 @@ NOXREF void CGib::SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cG
return; return;
} }
for (i = 0; i < cGibs; i++) for (i = 0; i < cGibs; ++i)
{ {
CGib *pGib = GetClassPtr((CGib *)NULL); CGib *pGib = GetClassPtr((CGib *)NULL);
@ -1047,7 +1047,7 @@ void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker,
UTIL_ScreenFade(pPlayer, Vector(255, 255, 255), fadeTime, fadeHold, alpha, 0); UTIL_ScreenFade(pPlayer, Vector(255, 255, 255), fadeTime, fadeHold, alpha, 0);
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
@ -1921,7 +1921,7 @@ void CBaseEntity::__MAKE_VHOOK(TraceBleed)(float flDamage, Vector vecDir, TraceR
cCount = 4; cCount = 4;
} }
for (i = 0; i < cCount; i++) for (i = 0; i < cCount; ++i)
{ {
// trace in the opposite direction the shot came from (the direction the shot is going) // trace in the opposite direction the shot came from (the direction the shot is going)
vecTraceDir = vecDir * -1.0f; vecTraceDir = vecDir * -1.0f;
@ -1961,7 +1961,7 @@ NOXREF void CBaseMonster::MakeDamageBloodDecal(int cCount, float flNoise, TraceR
pev->max_health--; pev->max_health--;
} }
for (i = 0; i < cCount; i++) for (i = 0; i < cCount; ++i)
{ {
vecTraceDir = vecDir; vecTraceDir = vecDir;

View File

@ -72,7 +72,7 @@ void PrintDebugFlags(void)
theDebugBuffer[0] = '\0'; theDebugBuffer[0] = '\0';
tmp = BufPrintf(theDebugBuffer, remainder, "mp_debug:\n"); tmp = BufPrintf(theDebugBuffer, remainder, "mp_debug:\n");
for (int i = 0; i < NUM_LEVELS - 1; i++) for (int i = 0; i < NUM_LEVELS - 1; ++i)
{ {
DebugOutputLevel level = outputLevel[i]; DebugOutputLevel level = outputLevel[i];
@ -87,7 +87,7 @@ void SetDebugFlag(const char *flagStr, bool state)
if (flagStr != NULL) if (flagStr != NULL)
{ {
DebugOutputType flag; DebugOutputType flag;
for (int i = 0; i < ARRAYSIZE(outputLevel); i++) for (int i = 0; i < ARRAYSIZE(outputLevel); ++i)
{ {
DebugOutputLevel level = outputLevel[ i ]; DebugOutputLevel level = outputLevel[ i ];
@ -115,7 +115,7 @@ void PrintDebugFlag(const char *flagStr)
if (flagStr != NULL) if (flagStr != NULL)
{ {
DebugOutputType flag; DebugOutputType flag;
for (int i = 0; i < ARRAYSIZE(outputLevel); i++) for (int i = 0; i < ARRAYSIZE(outputLevel); ++i)
{ {
DebugOutputLevel level = outputLevel[ i ]; DebugOutputLevel level = outputLevel[ i ];

View File

@ -1655,7 +1655,7 @@ void CTestEffect::TestThink(void)
if (t < 3.0) if (t < 3.0)
{ {
for (i = 0; i < m_iBeam; i++) for (i = 0; i < m_iBeam; ++i)
{ {
t = (gpGlobals->time - m_flBeamTime[i]) / (3 + m_flStartTime - m_flBeamTime[i]); t = (gpGlobals->time - m_flBeamTime[i]) / (3 + m_flStartTime - m_flBeamTime[i]);
m_pBeam[i]->SetBrightness(255 * t); m_pBeam[i]->SetBrightness(255 * t);
@ -1664,7 +1664,7 @@ void CTestEffect::TestThink(void)
} }
else else
{ {
for (i = 0; i < m_iBeam; i++) for (i = 0; i < m_iBeam; ++i)
{ {
UTIL_Remove(m_pBeam[i]); UTIL_Remove(m_pBeam[i]);
} }

View File

@ -189,7 +189,7 @@ void CEnvExplosion::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCal
{ {
int sparkCount = RANDOM_LONG(0, 3); int sparkCount = RANDOM_LONG(0, 3);
for (int i = 0; i < sparkCount; i++) for (int i = 0; i < sparkCount; ++i)
{ {
Create("spark_shower", pev->origin, tr.vecPlaneNormal, NULL); Create("spark_shower", pev->origin, tr.vecPlaneNormal, NULL);
} }

View File

@ -322,7 +322,7 @@ void CBreakable::MaterialSoundPrecache(Materials precacheMaterial)
pSoundList = MaterialSoundList(precacheMaterial, soundCount); pSoundList = MaterialSoundList(precacheMaterial, soundCount);
for (i = 0; i < soundCount; i++) for (i = 0; i < soundCount; ++i)
{ {
PRECACHE_SOUND((char *)pSoundList[i]); PRECACHE_SOUND((char *)pSoundList[i]);
} }
@ -834,7 +834,7 @@ void CBreakable::Die(void)
if (count) if (count)
{ {
for (int i = 0; i < count; i++) for (int i = 0; i < count; ++i)
{ {
pList[i]->pev->flags &= ~FL_ONGROUND; pList[i]->pev->flags &= ~FL_ONGROUND;
pList[i]->pev->groundentity = NULL; pList[i]->pev->groundentity = NULL;
@ -917,7 +917,7 @@ void CPushable::__MAKE_VHOOK(Spawn)(void)
/* <863eb> ../cstrike/dlls/func_break.cpp:920 */ /* <863eb> ../cstrike/dlls/func_break.cpp:920 */
void CPushable::__MAKE_VHOOK(Precache)(void) void CPushable::__MAKE_VHOOK(Precache)(void)
{ {
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; ++i)
{ {
PRECACHE_SOUND(m_soundNames[i]); PRECACHE_SOUND(m_soundNames[i]);
} }

View File

@ -696,9 +696,9 @@ void CFuncTankGun::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector &for
if (bulletCount > 0) if (bulletCount > 0)
{ {
for (i = 0; i < bulletCount; i++) for (i = 0; i < bulletCount; ++i)
{ {
switch(m_bulletType) switch (m_bulletType)
{ {
case TANK_BULLET_9MM: case TANK_BULLET_9MM:
FireBullets(1, barrelEnd, forward, gTankSpread[m_spread], 4096, BULLET_MONSTER_9MM, 1, m_iBulletDamage, pevAttacker); FireBullets(1, barrelEnd, forward, gTankSpread[m_spread], 4096, BULLET_MONSTER_9MM, 1, m_iBulletDamage, pevAttacker);
@ -807,14 +807,14 @@ void CFuncTankLaser::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector &f
if (bulletCount) if (bulletCount)
{ {
for (i = 0; i < bulletCount; i++) for (i = 0; i < bulletCount; ++i)
{ {
m_pLaser->pev->origin = barrelEnd; m_pLaser->pev->origin = barrelEnd;
TankTrace(barrelEnd, forward, gTankSpread[m_spread], tr); TankTrace(barrelEnd, forward, gTankSpread[m_spread], tr);
m_laserTime = gpGlobals->time; m_laserTime = gpGlobals->time;
m_pLaser->TurnOn(); m_pLaser->TurnOn();
m_pLaser->pev->dmgtime = gpGlobals->time - 1.0; m_pLaser->pev->dmgtime = gpGlobals->time - 1.0f;
m_pLaser->FireAtPoint(tr); m_pLaser->FireAtPoint(tr);
m_pLaser->pev->nextthink = 0; m_pLaser->pev->nextthink = 0;
} }
@ -849,7 +849,7 @@ void CFuncTankRocket::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector &
if (bulletCount > 0) if (bulletCount > 0)
{ {
for (i = 0; i < bulletCount; i++) for (i = 0; i < bulletCount; ++i)
{ {
CBaseEntity *pRocket = CBaseEntity::Create("rpg_rocket", barrelEnd, pev->angles, edict()); CBaseEntity *pRocket = CBaseEntity::Create("rpg_rocket", barrelEnd, pev->angles, edict());
} }

View File

@ -123,18 +123,7 @@ void CGameRules::__MAKE_VHOOK(RefreshSkillData)(void)
gSkillData.healthkitCapacity = 15; gSkillData.healthkitCapacity = 15;
} }
void (*pInstallGameRules)(void);
/* <ada23> ../cstrike/dlls/gamerules.cpp:157 */ /* <ada23> ../cstrike/dlls/gamerules.cpp:157 */
#ifdef HOOK_GAMEDLL
NOBODY __declspec(naked) CGameRules *InstallGameRules(void)
{
__asm
{
jmp pInstallGameRules
}
}
#else
CGameRules *InstallGameRules(void) CGameRules *InstallGameRules(void)
{ {
SERVER_COMMAND("exec game.cfg\n"); SERVER_COMMAND("exec game.cfg\n");
@ -145,7 +134,6 @@ CGameRules *InstallGameRules(void)
return new CHalfLifeMultiplay; return new CHalfLifeMultiplay;
} }
#endif // HOOK_GAMEDLL
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL

View File

@ -812,9 +812,6 @@ int CountPlayers(void);
void ExtractCommandString(char *s, char *szCommand); void ExtractCommandString(char *s, char *szCommand);
int GetMapCount(void); int GetMapCount(void);
// refs
extern void (*pInstallGameRules)(void);
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
// linked objects // linked objects

View File

@ -100,7 +100,7 @@ void CGrenade::Explode(TraceResult *pTrace, int bitsDamageType)
{ {
int sparkCount = RANDOM_LONG(0, 3); int sparkCount = RANDOM_LONG(0, 3);
for (int i = 0; i < sparkCount; i++) for (int i = 0; i < sparkCount; ++i)
Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL); Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL);
} }
} }
@ -234,7 +234,7 @@ void CGrenade::Explode2(TraceResult *pTrace, int bitsDamageType)
{ {
int sparkCount = RANDOM_LONG(0, 3); int sparkCount = RANDOM_LONG(0, 3);
for (int i = 0; i < sparkCount; i++) for (int i = 0; i < sparkCount; ++i)
Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL); Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL);
} }
} }
@ -313,7 +313,7 @@ void CGrenade::Explode3(TraceResult *pTrace, int bitsDamageType)
pev->nextthink = gpGlobals->time + 0.55; pev->nextthink = gpGlobals->time + 0.55;
int sparkCount = RANDOM_LONG(0, 3); int sparkCount = RANDOM_LONG(0, 3);
for (int i = 0; i < sparkCount; i++) for (int i = 0; i < sparkCount; ++i)
Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL); Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL);
} }
@ -362,7 +362,7 @@ NOXREF void CGrenade::SG_Explode(TraceResult *pTrace, int bitsDamageType)
{ {
int sparkCount = RANDOM_LONG(0, 3); int sparkCount = RANDOM_LONG(0, 3);
for (int i = 0; i < sparkCount; i++) for (int i = 0; i < sparkCount; ++i)
Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL); Create("spark_shower", pev->origin, pTrace->vecPlaneNormal, NULL);
} }
} }

View File

@ -27,7 +27,7 @@ NOXREF BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecT
//look through the monster's 'eyes' //look through the monster's 'eyes'
Vector vecLookerOrigin = pevLooker->origin + pevLooker->view_ofs; Vector vecLookerOrigin = pevLooker->origin + pevLooker->view_ofs;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; ++i)
{ {
Vector vecTarget = pevTarget->origin; Vector vecTarget = pevTarget->origin;

View File

@ -216,7 +216,7 @@ void CCyclerSprite::__MAKE_VHOOK(Spawn)(void)
m_rendermode = pev->rendermode; m_rendermode = pev->rendermode;
m_renderamt = pev->renderamt; m_renderamt = pev->renderamt;
for (int i = 0; i < ARRAYSIZE(pev->rendercolor); i++) for (int i = 0; i < ARRAYSIZE(pev->rendercolor); ++i)
{ {
pev->rendercolor[i] = m_rendercolor[i]; pev->rendercolor[i] = m_rendercolor[i];
} }
@ -239,7 +239,7 @@ void CCyclerSprite::__MAKE_VHOOK(Restart)(void)
pev->rendermode = m_rendermode; pev->rendermode = m_rendermode;
pev->renderamt = m_renderamt; pev->renderamt = m_renderamt;
for (int i = 0; i < ARRAYSIZE(pev->rendercolor); i++) for (int i = 0; i < ARRAYSIZE(pev->rendercolor); ++i)
{ {
pev->rendercolor[i] = m_rendercolor[i]; pev->rendercolor[i] = m_rendercolor[i];
} }

View File

@ -9,7 +9,7 @@ CHintMessage::CHintMessage(const char *hintString, bool isHint, CUtlVector<const
if (args) if (args)
{ {
for (int i = 0; i < args->Count(); i++) for (int i = 0; i < args->Count(); ++i)
m_args.AddToTail(CloneString((*args)[i])); m_args.AddToTail(CloneString((*args)[i]));
} }
} }

View File

@ -1148,7 +1148,7 @@ void CHostage::Wiggle(void)
Vector(-50, -50, 0) Vector(-50, -50, 0)
}; };
for (int i = 0; i < ARRAYSIZE(wiggle_directions); i++) for (int i = 0; i < ARRAYSIZE(wiggle_directions); ++i)
{ {
Vector dest = pev->origin + wiggle_directions[i]; Vector dest = pev->origin + wiggle_directions[i];
@ -1424,7 +1424,7 @@ void CHostageManager::ServerDeactivate(void)
/* <45e3f7> ../cstrike/dlls/hostage/hostage.cpp:1631 */ /* <45e3f7> ../cstrike/dlls/hostage/hostage.cpp:1631 */
void CHostageManager::RestartRound(void) void CHostageManager::RestartRound(void)
{ {
for (int i = 0; i < m_hostageCount; i++) for (int i = 0; i < m_hostageCount; ++i)
{ {
if (m_hostage[i]->m_improv != NULL) if (m_hostage[i]->m_improv != NULL)
{ {
@ -1440,7 +1440,7 @@ void CHostageManager::AddHostage(CHostage *hostage)
return; return;
int i; int i;
for (i = 0; i < m_hostageCount; i++) for (i = 0; i < m_hostageCount; ++i)
{ {
if (m_hostage[i] == hostage) if (m_hostage[i] == hostage)
{ {
@ -1458,7 +1458,7 @@ void CHostageManager::AddHostage(CHostage *hostage)
/* <45e47f> ../cstrike/dlls/hostage/hostage.cpp:1657 */ /* <45e47f> ../cstrike/dlls/hostage/hostage.cpp:1657 */
bool CHostageManager::IsNearbyHostageTalking(CHostageImprov *improv) bool CHostageManager::IsNearbyHostageTalking(CHostageImprov *improv)
{ {
for (int i = 0; i < m_hostageCount; i++) for (int i = 0; i < m_hostageCount; ++i)
{ {
const float closeRange = 500.0f; const float closeRange = 500.0f;
const CHostageImprov *other = m_hostage[i]->m_improv; const CHostageImprov *other = m_hostage[i]->m_improv;
@ -1481,7 +1481,7 @@ bool CHostageManager::IsNearbyHostageTalking(CHostageImprov *improv)
/* <45e57b> ../cstrike/dlls/hostage/hostage.cpp:1689 */ /* <45e57b> ../cstrike/dlls/hostage/hostage.cpp:1689 */
bool CHostageManager::IsNearbyHostageJumping(CHostageImprov *improv) bool CHostageManager::IsNearbyHostageJumping(CHostageImprov *improv)
{ {
for (int i = 0; i < m_hostageCount; i++) for (int i = 0; i < m_hostageCount; ++i)
{ {
const CHostageImprov *other = m_hostage[i]->m_improv; const CHostageImprov *other = m_hostage[i]->m_improv;
@ -1504,7 +1504,7 @@ bool CHostageManager::IsNearbyHostageJumping(CHostageImprov *improv)
/* <45e642> ../cstrike/dlls/hostage/hostage.cpp:1716 */ /* <45e642> ../cstrike/dlls/hostage/hostage.cpp:1716 */
void CHostageManager::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other) void CHostageManager::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
{ {
for (int i = 0; i < m_hostageCount; i++) for (int i = 0; i < m_hostageCount; ++i)
{ {
CHostageImprov *improv = m_hostage[ i ]->m_improv; CHostageImprov *improv = m_hostage[ i ]->m_improv;
@ -1518,7 +1518,7 @@ void CHostageManager::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEnt
/* <45e6b8> ../cstrike/dlls/hostage/hostage.cpp:1726 */ /* <45e6b8> ../cstrike/dlls/hostage/hostage.cpp:1726 */
SimpleChatter::SimpleChatter(void) SimpleChatter::SimpleChatter(void)
{ {
for (int i = 0; i < ARRAYSIZE(m_chatter); i++) for (int i = 0; i < ARRAYSIZE(m_chatter); ++i)
{ {
m_chatter[i].count = 0; m_chatter[i].count = 0;
m_chatter[i].index = 0; m_chatter[i].index = 0;
@ -1529,7 +1529,7 @@ SimpleChatter::SimpleChatter(void)
/* <45e6f0> ../cstrike/dlls/hostage/hostage.cpp:1737 */ /* <45e6f0> ../cstrike/dlls/hostage/hostage.cpp:1737 */
SimpleChatter::~SimpleChatter(void) SimpleChatter::~SimpleChatter(void)
{ {
for (int i = 0; i < ARRAYSIZE(m_chatter); i++) for (int i = 0; i < ARRAYSIZE(m_chatter); ++i)
{ {
for (int f = 0; f < m_chatter[i].count; f++) for (int f = 0; f < m_chatter[i].count; f++)
{ {
@ -1566,7 +1566,7 @@ void SimpleChatter::Shuffle(ChatterSet *chatter)
if (!chatter->needsShuffle) if (!chatter->needsShuffle)
return; return;
for (int i = 1; i < chatter->count; i++) for (int i = 1; i < chatter->count; ++i)
{ {
for (int j = i; j < chatter->count; j++) for (int j = i; j < chatter->count; j++)
{ {

View File

@ -1534,7 +1534,7 @@ CBasePlayer *CHostageImprov::GetClosestVisiblePlayer(int team)
CBasePlayer *close = NULL; CBasePlayer *close = NULL;
float closeRangeSq = 1e8f; float closeRangeSq = 1e8f;
for (int i = 0; i < m_visiblePlayerCount; i++) for (int i = 0; i < m_visiblePlayerCount; ++i)
{ {
CBasePlayer *player = (CBasePlayer *)m_visiblePlayer[i]; CBasePlayer *player = (CBasePlayer *)m_visiblePlayer[i];
@ -1937,18 +1937,6 @@ void CHostageImprov::UpdateStationaryAnimation(void)
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
// NavAreaBuildPath<HostagePathCost> hook
bool NavAreaBuildPath__HostagePathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, class HostagePathCost &costFunc, CNavArea **closestArea)
{
return NavAreaBuildPath(startArea, goalArea, goalPos, costFunc, closestArea);
}
// NavAreaBuildPath<ShortestPathCost> hook
bool NavAreaBuildPath__ShortestPathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, class ShortestPathCost &costFunc, CNavArea **closestArea)
{
return NavAreaBuildPath(startArea, goalArea, goalPos, costFunc, closestArea);
}
void CHostageImprov::OnMoveToFailure(const Vector &goal, MoveToFailureType reason) void CHostageImprov::OnMoveToFailure(const Vector &goal, MoveToFailureType reason)
{ {
OnMoveToFailure_(goal, reason); OnMoveToFailure_(goal, reason);

View File

@ -513,8 +513,17 @@ private:
#ifdef HOOK_GAMEDLL #ifdef HOOK_GAMEDLL
bool NavAreaBuildPath__HostagePathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, class HostagePathCost &costFunc, CNavArea **closestArea = NULL); // NavAreaBuildPath<HostagePathCost> hook
bool NavAreaBuildPath__ShortestPathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, class ShortestPathCost &costFunc, CNavArea **closestArea = NULL); inline bool NavAreaBuildPath__HostagePathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, class HostagePathCost &costFunc, CNavArea **closestArea)
{
return NavAreaBuildPath(startArea, goalArea, goalPos, costFunc, closestArea);
}
// NavAreaBuildPath<ShortestPathCost> hook
inline bool NavAreaBuildPath__ShortestPathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, class ShortestPathCost &costFunc, CNavArea **closestArea)
{
return NavAreaBuildPath(startArea, goalArea, goalPos, costFunc, closestArea);
}
typedef bool (CHostageImprov::*IS_FRIEND_IN_THE_WAY_VECTOR)(const Vector &) const; typedef bool (CHostageImprov::*IS_FRIEND_IN_THE_WAY_VECTOR)(const Vector &) const;
typedef bool (CHostageImprov::*IS_FRIEND_IN_THE_WAY_CBASE)(CBaseEntity *, const Vector &) const; typedef bool (CHostageImprov::*IS_FRIEND_IN_THE_WAY_CBASE)(CBaseEntity *, const Vector &) const;

View File

@ -860,7 +860,7 @@ void CLocalNav::RequestNav(CHostage *pCaller)
return; return;
} }
for (int i = 0; i < tot_inqueue; i++) for (int i = 0; i < tot_inqueue; ++i)
{ {
CHostage *pQueueItem = GetClassPtr((CHostage *)_queue[curr]->pev); CHostage *pQueueItem = GetClassPtr((CHostage *)_queue[curr]->pev);

View File

@ -249,7 +249,7 @@ void CGameTeamMaster::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
{ {
int type = Q_atoi(pkvd->szValue); int type = Q_atoi(pkvd->szValue);
switch(type) switch (type)
{ {
case 0: case 0:
triggerType = USE_OFF; triggerType = USE_OFF;
@ -398,9 +398,9 @@ void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC
CBaseEntity *pPlayer = NULL; CBaseEntity *pPlayer = NULL;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer) if (pPlayer)
{ {
@ -417,7 +417,7 @@ void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC
if (trace.fStartSolid) if (trace.fStartSolid)
{ {
playersInCount++; ++playersInCount;
if (!FStringNull(m_iszInTarget)) if (!FStringNull(m_iszInTarget))
{ {
FireTargets(STRING(m_iszInTarget), pPlayer, pActivator, useType, value); FireTargets(STRING(m_iszInTarget), pPlayer, pActivator, useType, value);
@ -425,7 +425,7 @@ void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC
} }
else else
{ {
playersOutCount++; ++playersOutCount;
if (!FStringNull(m_iszOutTarget)) if (!FStringNull(m_iszOutTarget))
{ {
FireTargets(STRING(m_iszOutTarget), pPlayer, pActivator, useType, value); FireTargets(STRING(m_iszOutTarget), pPlayer, pActivator, useType, value);
@ -547,7 +547,7 @@ void CGamePlayerEquip::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
if (!pkvd->fHandled) if (!pkvd->fHandled)
{ {
for (int i = 0; i < MAX_EQUIP; i++) for (int i = 0; i < MAX_EQUIP; ++i)
{ {
if (FStringNull(m_weaponNames[i])) if (FStringNull(m_weaponNames[i]))
{ {
@ -590,12 +590,12 @@ void CGamePlayerEquip::EquipPlayer(CBaseEntity *pEntity)
if (!pPlayer) if (!pPlayer)
return; return;
for (int i = 0; i < MAX_EQUIP; i++) for (int i = 0; i < MAX_EQUIP; ++i)
{ {
if (FStringNull(m_weaponNames[i])) if (FStringNull(m_weaponNames[i]))
break; break;
for (int j = 0; j < m_weaponCount[i]; j++) for (int j = 0; j < m_weaponCount[i]; ++j)
{ {
pPlayer->GiveNamedItem(STRING(m_weaponNames[i])); pPlayer->GiveNamedItem(STRING(m_weaponNames[i]));
} }

View File

@ -139,7 +139,7 @@ void CFuncMortarField::FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, U
EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "weapons/mortar.wav", VOL_NORM, ATTN_NONE, 0, pitch); EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "weapons/mortar.wav", VOL_NORM, ATTN_NONE, 0, pitch);
float t = 2.5; float t = 2.5;
for (int i = 0; i < m_iCount; i++) for (int i = 0; i < m_iCount; ++i)
{ {
Vector vecSpot = vecStart; Vector vecSpot = vecStart;
vecSpot.x += RANDOM_FLOAT(-m_flSpread, m_flSpread); vecSpot.x += RANDOM_FLOAT(-m_flSpread, m_flSpread);

View File

@ -171,7 +171,7 @@ void CBaseMonster::__MAKE_VHOOK(Look)(int iDistance)
// Find only monsters/clients in box, NOT limited to PVS // Find only monsters/clients in box, NOT limited to PVS
int count = UTIL_EntitiesInBox(pList, ARRAYSIZE(pList), pev->origin - delta, pev->origin + delta, (FL_CLIENT | FL_MONSTER)); int count = UTIL_EntitiesInBox(pList, ARRAYSIZE(pList), pev->origin - delta, pev->origin + delta, (FL_CLIENT | FL_MONSTER));
for (int i = 0; i < count; i++) for (int i = 0; i < count; ++i)
{ {
pSightEnt = pList[i]; pSightEnt = pList[i];
if (pSightEnt != this && pSightEnt->pev->health > 0) if (pSightEnt != this && pSightEnt->pev->health > 0)

View File

@ -21,14 +21,14 @@ CHalfLifeMultiplay *g_pMPGameRules = NULL;
/* <1153e2> ../cstrike/dlls/multiplay_gamerules.cpp:92 */ /* <1153e2> ../cstrike/dlls/multiplay_gamerules.cpp:92 */
bool IsBotSpeaking(void) bool IsBotSpeaking(void)
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer == NULL || !pPlayer->IsBot()) if (pPlayer == NULL || !pPlayer->IsBot())
continue; continue;
CCSBot *pBot = reinterpret_cast<CCSBot *>(pPlayer); CCSBot *pBot = static_cast<CCSBot *>(pPlayer);
if (pBot->IsUsingVoice()) if (pBot->IsUsingVoice())
return true; return true;
@ -51,9 +51,9 @@ void SV_Continue_f(void)
WRITE_STRING("GOGOGO"); WRITE_STRING("GOGOGO");
MESSAGE_END(); MESSAGE_END();
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer && !pPlayer->IsBot()) if (pPlayer && !pPlayer->IsBot())
{ {
@ -99,9 +99,9 @@ void SV_Career_EndRound_f(void)
{ {
SERVER_COMMAND("kill\n"); SERVER_COMMAND("kill\n");
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!player || FNullEnt(player->pev)) if (!player || FNullEnt(player->pev))
continue; continue;
@ -804,9 +804,9 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(GiveC4)(void)
if (giveToHumans) if (giveToHumans)
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!player || FNullEnt(player->edict())) if (!player || FNullEnt(player->edict()))
continue; continue;
@ -1164,7 +1164,7 @@ bool CHalfLifeMultiplay::NeededPlayersCheck(bool &bNeededPlayers)
{ {
if (IsCareer()) if (IsCareer())
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(gpGlobals->maxClients)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(gpGlobals->maxClients));
if (!player || !player->IsBot()) if (!player || !player->IsBot())
{ {
@ -1410,7 +1410,7 @@ bool CHalfLifeMultiplay::TeamExterminationCheck(int NumAliveTerrorist, int NumAl
while ((temp = UTIL_FindEntityByClassname(temp, "grenade")) != NULL) while ((temp = UTIL_FindEntityByClassname(temp, "grenade")) != NULL)
{ {
CGrenade *C4 = reinterpret_cast<CGrenade *>(temp); CGrenade *C4 = static_cast<CGrenade *>(temp);
if (C4->m_bIsC4 && !C4->m_bJustBlew) if (C4->m_bIsC4 && !C4->m_bJustBlew)
{ {
@ -1632,7 +1632,7 @@ void CHalfLifeMultiplay::BalanceTeams(void)
int iHighestUserID = 0; int iHighestUserID = 0;
CBasePlayer *toSwap = NULL; CBasePlayer *toSwap = NULL;
for (int i = 1; i <= iNumToSwap; i++) for (int i = 1; i <= iNumToSwap; ++i)
{ {
iHighestUserID = 0; iHighestUserID = 0;
toSwap = NULL; toSwap = NULL;
@ -1808,9 +1808,9 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(RestartRound)(void)
UpdateTeamScores(); UpdateTeamScores();
// Reset the player stats // Reset the player stats
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *plr = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (plr && !FNullEnt(plr->pev)) if (plr && !FNullEnt(plr->pev))
plr->Reset(); plr->Reset();
@ -1908,7 +1908,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(RestartRound)(void)
if (acct_tmp >= 2000) if (acct_tmp >= 2000)
break; break;
CHostage *temp = reinterpret_cast<CHostage *>(hostage); CHostage *temp = static_cast<CHostage *>(hostage);
if (hostage->pev->solid != SOLID_NOT) if (hostage->pev->solid != SOLID_NOT)
{ {
@ -2208,7 +2208,7 @@ void CHalfLifeMultiplay::StackVIPQueue(void)
/* <114e63> ../cstrike/dlls/multiplay_gamerules.cpp:2232 */ /* <114e63> ../cstrike/dlls/multiplay_gamerules.cpp:2232 */
bool CHalfLifeMultiplay::IsVIPQueueEmpty(void) bool CHalfLifeMultiplay::IsVIPQueueEmpty(void)
{ {
for (int i = 0; i < MAX_VIP_QUEUES; i++) for (int i = 0; i < MAX_VIP_QUEUES; ++i)
{ {
CBasePlayer *toCheck = VIPQueue[i]; CBasePlayer *toCheck = VIPQueue[i];
@ -2225,7 +2225,7 @@ bool CHalfLifeMultiplay::IsVIPQueueEmpty(void)
/* <114eea> ../cstrike/dlls/multiplay_gamerules.cpp:2257 */ /* <114eea> ../cstrike/dlls/multiplay_gamerules.cpp:2257 */
bool CHalfLifeMultiplay::AddToVIPQueue(CBasePlayer *toAdd) bool CHalfLifeMultiplay::AddToVIPQueue(CBasePlayer *toAdd)
{ {
for (int i = 0; i < MAX_VIP_QUEUES; i++) for (int i = 0; i < MAX_VIP_QUEUES; ++i)
{ {
CBasePlayer *toCheck = VIPQueue[i]; CBasePlayer *toCheck = VIPQueue[i];
@ -2317,7 +2317,7 @@ void CHalfLifeMultiplay::PickNextVIP(void)
ResetCurrentVIP(); ResetCurrentVIP();
} }
for (int i = 0; i < MAX_VIP_QUEUES; i++) for (int i = 0; i < MAX_VIP_QUEUES; ++i)
{ {
if (VIPQueue[i] != NULL) if (VIPQueue[i] != NULL)
{ {
@ -2528,9 +2528,9 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(Think)(void)
m_bFreezePeriod = TRUE; m_bFreezePeriod = TRUE;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer != NULL && !pPlayer->IsBot()) if (pPlayer != NULL && !pPlayer->IsBot())
{ {
@ -2780,9 +2780,9 @@ void CHalfLifeMultiplay::CheckFreezePeriodExpired(void)
TheCareerTasks->HandleEvent(EVENT_ROUND_START); TheCareerTasks->HandleEvent(EVENT_ROUND_START);
} }
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *plr = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!plr || plr->pev->flags == FL_DORMANT) if (!plr || plr->pev->flags == FL_DORMANT)
{ {
@ -3031,7 +3031,7 @@ void CHalfLifeMultiplay::MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound(int
{ {
for (int i = 1; i <= gpGlobals->maxClients; ++i) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!player || FNullEnt(player->pev)) if (!player || FNullEnt(player->pev))
continue; continue;
@ -3068,9 +3068,9 @@ void CHalfLifeMultiplay::CareerRestart(void)
m_bSkipSpawn = false; m_bSkipSpawn = false;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!player || FNullEnt(player->pev)) if (!player || FNullEnt(player->pev))
continue; continue;
@ -3138,7 +3138,7 @@ BOOL CHalfLifeMultiplay::__MAKE_VHOOK(GetNextBestWeapon)(CBasePlayer *pPlayer, C
iBestWeight = -1; // no weapon lower than -1 can be autoswitched to iBestWeight = -1; // no weapon lower than -1 can be autoswitched to
pBest = NULL; pBest = NULL;
for (i = 0; i < MAX_ITEM_TYPES; i++) for (i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
pCheck = pPlayer->m_rgpPlayerItems[i]; pCheck = pPlayer->m_rgpPlayerItems[i];
@ -3252,10 +3252,10 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(InitHUD)(CBasePlayer *pl)
SendMOTDToClient(pl->edict()); SendMOTDToClient(pl->edict());
// loop through all active players and send their score info to the new client // loop through all active players and send their score info to the new client
for (i = 1; i <= gpGlobals->maxClients; i++) for (i = 1; i <= gpGlobals->maxClients; ++i)
{ {
// FIXME: Probably don't need to cast this just to read m_iDeaths // FIXME: Probably don't need to cast this just to read m_iDeaths
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *plr = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (plr != NULL) if (plr != NULL)
{ {
@ -3295,9 +3295,9 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(InitHUD)(CBasePlayer *pl)
MESSAGE_END(); MESSAGE_END();
} }
for (i = 1; i <= gpGlobals->maxClients; i++) for (i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *plr = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (plr != NULL) if (plr != NULL)
{ {
@ -3361,7 +3361,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(ClientDisconnected)(edict_t *pClient)
{ {
if (pClient != NULL) if (pClient != NULL)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBaseEntity::Instance(pClient)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(CBaseEntity::Instance(pClient));
if (pPlayer != NULL) if (pPlayer != NULL)
{ {
@ -3505,7 +3505,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerThink)(CBasePlayer *pPlayer)
if (pPlayer->m_pActiveItem && pPlayer->m_pActiveItem->IsWeapon()) if (pPlayer->m_pActiveItem && pPlayer->m_pActiveItem->IsWeapon())
{ {
CBasePlayerWeapon *pWeapon = reinterpret_cast<CBasePlayerWeapon *>(pPlayer->m_pActiveItem->GetWeaponPtr()); CBasePlayerWeapon *pWeapon = static_cast<CBasePlayerWeapon *>(pPlayer->m_pActiveItem->GetWeaponPtr());
if (pWeapon->m_iWeaponState & WPNSTATE_SHIELD_DRAWN) if (pWeapon->m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
{ {
@ -3660,16 +3660,16 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvar
if (ktmp && ktmp->Classify() == CLASS_PLAYER) if (ktmp && ktmp->Classify() == CLASS_PLAYER)
{ {
peKiller = reinterpret_cast<CBasePlayer *>(ktmp); peKiller = static_cast<CBasePlayer *>(ktmp);
} }
else if (ktmp && ktmp->Classify() == CLASS_VEHICLE) else if (ktmp && ktmp->Classify() == CLASS_VEHICLE)
{ {
CBasePlayer *pDriver = reinterpret_cast<CBasePlayer *>(((CFuncVehicle *)ktmp)->m_pDriver); CBasePlayer *pDriver = static_cast<CBasePlayer *>(((CFuncVehicle *)ktmp)->m_pDriver);
if (pDriver != NULL) if (pDriver != NULL)
{ {
pKiller = pDriver->pev; pKiller = pDriver->pev;
peKiller = reinterpret_cast<CBasePlayer *>(pDriver); peKiller = static_cast<CBasePlayer *>(pDriver);
} }
} }
@ -3781,7 +3781,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvar
if (ep && ep->Classify() == CLASS_PLAYER) if (ep && ep->Classify() == CLASS_PLAYER)
{ {
CBasePlayer *PK = reinterpret_cast<CBasePlayer *>(ep); CBasePlayer *PK = static_cast<CBasePlayer *>(ep);
MESSAGE_BEGIN(MSG_ALL, gmsgScoreInfo); MESSAGE_BEGIN(MSG_ALL, gmsgScoreInfo);
WRITE_BYTE(ENTINDEX(PK->edict())); WRITE_BYTE(ENTINDEX(PK->edict()));
@ -3820,7 +3820,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(DeathNotice)(CBasePlayer *pVictim, entvars
if (pevInflictor == pKiller) if (pevInflictor == pKiller)
{ {
// If the inflictor is the killer, then it must be their current weapon doing the damage // If the inflictor is the killer, then it must be their current weapon doing the damage
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer*>(CBaseEntity::Instance(pKiller)); CBasePlayer *pPlayer = static_cast<CBasePlayer*>(CBaseEntity::Instance(pKiller));
if (pPlayer && pPlayer->m_pActiveItem) if (pPlayer && pPlayer->m_pActiveItem)
{ {
@ -3887,7 +3887,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(DeathNotice)(CBasePlayer *pVictim, entvars
} }
else if (pKiller->flags & FL_CLIENT) else if (pKiller->flags & FL_CLIENT)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBaseEntity::Instance(pKiller)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(CBaseEntity::Instance(pKiller));
char *VictimTeam = GetTeam(pVictim->m_iTeam); char *VictimTeam = GetTeam(pVictim->m_iTeam);
char *KillerTeam = GetTeam(pPlayer->m_iTeam); char *KillerTeam = GetTeam(pPlayer->m_iTeam);
@ -4470,7 +4470,7 @@ int CountPlayers(void)
{ {
int num = 0; int num = 0;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *pEnt = UTIL_PlayerByIndex(i); CBaseEntity *pEnt = UTIL_PlayerByIndex(i);

View File

@ -393,7 +393,7 @@ void LinkUserMessages(void)
/* <1535a5> ../cstrike/dlls/player.cpp:380 */ /* <1535a5> ../cstrike/dlls/player.cpp:380 */
void WriteSigonMessages(void) void WriteSigonMessages(void)
{ {
for (int i = 0; i < MAX_WEAPONS; i++) for (int i = 0; i < MAX_WEAPONS; ++i)
{ {
ItemInfo &II = IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[i]; ItemInfo &II = IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[i];
@ -1135,7 +1135,7 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
if (friendlyfire.string[0] == '2') if (friendlyfire.string[0] == '2')
teamAttack = FALSE; teamAttack = FALSE;
#endif // REGAMEDLL_ADD #endif // REGAMEDLL_ADD
pAttack = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pevAttacker)); pAttack = static_cast<CBasePlayer *>(CBasePlayer::Instance(pevAttacker));
} }
else if (pGrenade->m_iTeam == m_iTeam && (&edict()->v != pevAttacker)) else if (pGrenade->m_iTeam == m_iTeam && (&edict()->v != pevAttacker))
{ {
@ -1210,9 +1210,9 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
if (mp->IsCareer()) if (mp->IsCareer())
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!pPlayer) if (!pPlayer)
continue; continue;
@ -1232,7 +1232,7 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
{ {
// reset damage time countdown for each type of time based damage player just sustained // reset damage time countdown for each type of time based damage player just sustained
for (int i = 0; i < CDMG_TIMEBASED; i++) for (int i = 0; i < CDMG_TIMEBASED; ++i)
{ {
if (bitsDamageType & (DMG_PARALYZE << i)) if (bitsDamageType & (DMG_PARALYZE << i))
m_rgbTimeBasedDamage[i] = 0; m_rgbTimeBasedDamage[i] = 0;
@ -1253,9 +1253,9 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
WRITE_BYTE((int)Q_max(pev->health, 0.0f) | DRC_FLAG_FACEPLAYER); WRITE_BYTE((int)Q_max(pev->health, 0.0f) | DRC_FLAG_FACEPLAYER);
MESSAGE_END(); MESSAGE_END();
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!pPlayer || pPlayer->m_hObserverTarget != this) if (!pPlayer || pPlayer->m_hObserverTarget != this)
continue; continue;
@ -1453,9 +1453,9 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
if (mp->IsCareer()) if (mp->IsCareer())
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!pPlayer) if (!pPlayer)
continue; continue;
@ -1475,7 +1475,7 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
{ {
// reset damage time countdown for each type of time based damage player just sustained // reset damage time countdown for each type of time based damage player just sustained
for (int i = 0; i < CDMG_TIMEBASED; i++) for (int i = 0; i < CDMG_TIMEBASED; ++i)
{ {
if (bitsDamageType & (DMG_PARALYZE << i)) if (bitsDamageType & (DMG_PARALYZE << i))
m_rgbTimeBasedDamage[i] = 0; m_rgbTimeBasedDamage[i] = 0;
@ -1496,9 +1496,9 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
WRITE_BYTE((int)Q_max(pev->health, 0.0f) | DRC_FLAG_FACEPLAYER); WRITE_BYTE((int)Q_max(pev->health, 0.0f) | DRC_FLAG_FACEPLAYER);
MESSAGE_END(); MESSAGE_END();
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!pPlayer) if (!pPlayer)
continue; continue;
@ -1665,7 +1665,7 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
} }
m_pLastItem = NULL; m_pLastItem = NULL;
for (i = 0; i < MAX_ITEM_TYPES; i++) for (i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
m_pActiveItem = m_rgpPlayerItems[i]; m_pActiveItem = m_rgpPlayerItems[i];
@ -1691,7 +1691,7 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
else else
pev->weapons &= ~WEAPON_ALLWEAPONS; pev->weapons &= ~WEAPON_ALLWEAPONS;
for (i = 0; i < MAX_AMMO_SLOTS; i++) for (i = 0; i < MAX_AMMO_SLOTS; ++i)
m_rgAmmo[i] = 0; m_rgAmmo[i] = 0;
UpdateClientData(); UpdateClientData();
@ -2043,9 +2043,9 @@ void CBasePlayer::__MAKE_VHOOK(Killed)(entvars_t *pevAttacker, int iGib)
wasBlind = true; wasBlind = true;
} }
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!pPlayer) if (!pPlayer)
continue; continue;
@ -2076,7 +2076,7 @@ void CBasePlayer::__MAKE_VHOOK(Killed)(entvars_t *pevAttacker, int iGib)
for (int i = 1; i <= gpGlobals->maxClients; ++i) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pObserver = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!pObserver) if (!pObserver)
continue; continue;
@ -3016,7 +3016,7 @@ BOOL CBasePlayer::IsOnLadder(void)
/* <160720> ../cstrike/dlls/player.cpp:3387 */ /* <160720> ../cstrike/dlls/player.cpp:3387 */
NOXREF void CBasePlayer::ThrowWeapon(char *pszItemName) NOXREF void CBasePlayer::ThrowWeapon(char *pszItemName)
{ {
for (int i = 0; i < MAX_WEAPON_SLOTS; i++) for (int i = 0; i < MAX_WEAPON_SLOTS; ++i)
{ {
CBasePlayerItem *pWeapon = m_rgpPlayerItems[i]; CBasePlayerItem *pWeapon = m_rgpPlayerItems[i];
@ -4006,7 +4006,7 @@ void CBasePlayer::PlayerUse(void)
if (!pClosest) if (!pClosest)
{ {
while ((pObject = UTIL_FindEntityInSphere(pObject, pev->origin, PLAYER_SEARCH_RADIUS)) != NULL) while ((pObject = UTIL_FindEntityInSphere(pObject, pev->origin, PLAYER_USE_RADIUS)) != NULL)
{ {
if (pObject->ObjectCaps() & (FCAP_IMPULSE_USE | FCAP_CONTINUOUS_USE | FCAP_ONOFF_USE)) if (pObject->ObjectCaps() & (FCAP_IMPULSE_USE | FCAP_CONTINUOUS_USE | FCAP_ONOFF_USE))
{ {
@ -4141,7 +4141,7 @@ NOXREF void FixPlayerCrouchStuck(edict_t *pPlayer)
TraceResult trace; TraceResult trace;
// Move up as many as 18 pixels if the player is stuck. // Move up as many as 18 pixels if the player is stuck.
for (int i = 0; i < 18; i++) for (int i = 0; i < 18; ++i)
{ {
UTIL_TraceHull(pPlayer->v.origin, pPlayer->v.origin, dont_ignore_monsters, head_hull, pPlayer, &trace); UTIL_TraceHull(pPlayer->v.origin, pPlayer->v.origin, dont_ignore_monsters, head_hull, pPlayer, &trace);
@ -4200,9 +4200,9 @@ void CBasePlayer::__MAKE_VHOOK(AddPointsToTeam)(int score, BOOL bAllowNegativeSc
{ {
int index = entindex(); int index = entindex();
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer != NULL && i != index) if (pPlayer != NULL && i != index)
{ {
@ -4571,7 +4571,7 @@ void CBasePlayer::CheckTimeBasedDamage(void)
m_tbdPrev = gpGlobals->time; m_tbdPrev = gpGlobals->time;
for (i = 0; i < CDMG_TIMEBASED; i++) for (i = 0; i < CDMG_TIMEBASED; ++i)
{ {
// make sure bit is set for damage type // make sure bit is set for damage type
if (m_bitsDamageType & (DMG_PARALYZE << i)) if (m_bitsDamageType & (DMG_PARALYZE << i))
@ -4704,7 +4704,7 @@ void CBasePlayer::CheckSuitUpdate(void)
if (gpGlobals->time >= m_flSuitUpdate && m_flSuitUpdate > 0) if (gpGlobals->time >= m_flSuitUpdate && m_flSuitUpdate > 0)
{ {
// play a sentence off of the end of the queue // play a sentence off of the end of the queue
for (i = 0; i < CSUITPLAYLIST; i++) for (i = 0; i < CSUITPLAYLIST; ++i)
{ {
if (isentence = m_rgSuitPlayList[ isearch ]) if (isentence = m_rgSuitPlayList[ isearch ])
break; break;
@ -4978,7 +4978,7 @@ pt_end:
#ifdef CLIENT_WEAPONS #ifdef CLIENT_WEAPONS
// Decay timers on weapons // Decay timers on weapons
// go through all of the weapons and make a list of the ones to pack // go through all of the weapons and make a list of the ones to pack
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
if (m_rgpPlayerItems[i]) if (m_rgpPlayerItems[i])
{ {
@ -5370,7 +5370,7 @@ void CBasePlayer::__MAKE_VHOOK(Spawn)(void)
m_iNumSpawns++; m_iNumSpawns++;
InitStatusBar(); InitStatusBar();
for (i = 0; i < MAX_RECENT_PATH; i++) for (i = 0; i < MAX_RECENT_PATH; ++i)
m_vRecentPath[ i ] = Vector(0, 0, 0); m_vRecentPath[ i ] = Vector(0, 0, 0);
if (m_pActiveItem != NULL && !pev->viewmodel) if (m_pActiveItem != NULL && !pev->viewmodel)
@ -5461,7 +5461,7 @@ void CBasePlayer::__MAKE_VHOOK(Spawn)(void)
{ {
m_iClientHideHUD = -1; m_iClientHideHUD = -1;
for (i = 0; i < MAX_AMMO_SLOTS; i++) for (i = 0; i < MAX_AMMO_SLOTS; ++i)
m_rgAmmo[i] = 0; m_rgAmmo[i] = 0;
m_bHasPrimary = false; m_bHasPrimary = false;
@ -5471,7 +5471,7 @@ void CBasePlayer::__MAKE_VHOOK(Spawn)(void)
} }
else else
{ {
for (i = 0; i < MAX_AMMO_SLOTS; i++) for (i = 0; i < MAX_AMMO_SLOTS; ++i)
m_rgAmmoLast[i] = -1; m_rgAmmoLast[i] = -1;
} }
@ -5481,9 +5481,9 @@ void CBasePlayer::__MAKE_VHOOK(Spawn)(void)
m_bNightVisionOn = false; m_bNightVisionOn = false;
for (i = 1; i <= gpGlobals->maxClients; i++) for (i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pObserver = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pObserver = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pObserver && pObserver->IsObservingPlayer(this)) if (pObserver && pObserver->IsObservingPlayer(this))
{ {
@ -5571,7 +5571,7 @@ void CBasePlayer::__MAKE_VHOOK(Spawn)(void)
sv_aim = CVAR_GET_POINTER("sv_aim"); sv_aim = CVAR_GET_POINTER("sv_aim");
for (i = 0; i < ARRAYSIZE(m_flLastCommandTime); i++) for (i = 0; i < ARRAYSIZE(m_flLastCommandTime); ++i)
m_flLastCommandTime[i] = -1; m_flLastCommandTime[i] = -1;
} }
@ -5635,9 +5635,9 @@ void CBasePlayer::SetScoreboardAttributes(CBasePlayer *destination)
return; return;
} }
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (player != NULL && !FNullEnt(player->edict())) if (player != NULL && !FNullEnt(player->edict()))
SetScoreboardAttributes(player); SetScoreboardAttributes(player);
@ -5789,7 +5789,7 @@ void CBasePlayer::SelectItem(const char *pstr)
CBasePlayerItem *pItem = NULL; CBasePlayerItem *pItem = NULL;
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
pItem = m_rgpPlayerItems[ i ]; pItem = m_rgpPlayerItems[ i ];
@ -5849,7 +5849,7 @@ void CBasePlayer::SelectLastItem(void)
if (!m_pLastItem || m_pLastItem == m_pActiveItem) if (!m_pLastItem || m_pLastItem == m_pActiveItem)
{ {
for (int i = 1; i < MAX_ITEMS; i++) for (int i = 1; i < MAX_ITEMS; ++i)
{ {
CBasePlayerItem *pItem = m_rgpPlayerItems[i]; CBasePlayerItem *pItem = m_rgpPlayerItems[i];
if (pItem != NULL && pItem != m_pActiveItem) if (pItem != NULL && pItem != m_pActiveItem)
@ -5896,7 +5896,7 @@ void CBasePlayer::SelectLastItem(void)
/* <15733a> ../cstrike/dlls/player.cpp:6967 */ /* <15733a> ../cstrike/dlls/player.cpp:6967 */
BOOL CBasePlayer::HasWeapons(void) BOOL CBasePlayer::HasWeapons(void)
{ {
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
if (m_rgpPlayerItems[i] != NULL) if (m_rgpPlayerItems[i] != NULL)
return TRUE; return TRUE;
@ -6319,7 +6319,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse)
{ {
float bloodRange = r * 50.0f; float bloodRange = r * 50.0f;
for (int i = 0; i < 50; i++) for (int i = 0; i < 50; ++i)
{ {
dir.x = RANDOM_FLOAT(-1, 1); dir.x = RANDOM_FLOAT(-1, 1);
dir.y = RANDOM_FLOAT(-1, 1); dir.y = RANDOM_FLOAT(-1, 1);
@ -6656,7 +6656,7 @@ int CBasePlayer::GetAmmoIndex(const char *psz)
if (!psz) if (!psz)
return -1; return -1;
for (int i = 1; i < MAX_AMMO_SLOTS; i++) for (int i = 1; i < MAX_AMMO_SLOTS; ++i)
{ {
if (!IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName) if (!IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName)
continue; continue;
@ -6670,7 +6670,7 @@ int CBasePlayer::GetAmmoIndex(const char *psz)
/* <158bf7> ../cstrike/dlls/player.cpp:7865 */ /* <158bf7> ../cstrike/dlls/player.cpp:7865 */
void CBasePlayer::SendAmmoUpdate(void) void CBasePlayer::SendAmmoUpdate(void)
{ {
for (int i = 0; i < MAX_AMMO_SLOTS; i++) for (int i = 0; i < MAX_AMMO_SLOTS; ++i)
{ {
if (m_rgAmmo[i] != m_rgAmmoLast[i]) if (m_rgAmmo[i] != m_rgAmmoLast[i])
{ {
@ -7020,7 +7020,7 @@ void CBasePlayer::__MAKE_VHOOK(UpdateClientData)(void)
SendAmmoUpdate(); SendAmmoUpdate();
// Update all the items // Update all the items
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
if (m_rgpPlayerItems[i]) if (m_rgpPlayerItems[i])
{ {
@ -7069,7 +7069,7 @@ void CBasePlayer::__MAKE_VHOOK(UpdateClientData)(void)
if ((pev->origin - m_vLastOrigin).Length() >= 64) if ((pev->origin - m_vLastOrigin).Length() >= 64)
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *pEntity = UTIL_PlayerByIndex(i); CBaseEntity *pEntity = UTIL_PlayerByIndex(i);
@ -7428,7 +7428,7 @@ void CBasePlayer::UpdateStatusBar(void)
} }
// Check values and send if they don't match // Check values and send if they don't match
for (int i = 1; i < SBAR_END; i++) for (int i = 1; i < SBAR_END; ++i)
{ {
if (newSBarState[ i ] != m_izSBarState[ i ] || bForceResend) if (newSBarState[ i ] != m_izSBarState[ i ] || bForceResend)
{ {
@ -7464,7 +7464,7 @@ void CBasePlayer::DropPlayerItem(const char *pszItemName)
return; return;
} }
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
CBasePlayerItem *pWeapon = m_rgpPlayerItems[i]; CBasePlayerItem *pWeapon = m_rgpPlayerItems[i];
@ -7611,7 +7611,7 @@ BOOL CBasePlayer::HasNamedPlayerItem(const char *pszItemName)
CBasePlayerItem *pItem; CBasePlayerItem *pItem;
int i; int i;
for (i = 0; i < MAX_ITEM_TYPES; i++) for (i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
pItem = m_rgpPlayerItems[ i ]; pItem = m_rgpPlayerItems[ i ];
@ -7765,7 +7765,7 @@ void CBasePlayer::SwitchTeam(void)
SendItemStatus(this); SendItemStatus(this);
SetProgressBarTime(0); SetProgressBarTime(0);
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
m_pActiveItem = m_rgpPlayerItems[ i ]; m_pActiveItem = m_rgpPlayerItems[ i ];
@ -7790,7 +7790,7 @@ void CBasePlayer::SwitchTeam(void)
szNewTeam szNewTeam
); );
CCSBot *pBot = reinterpret_cast<CCSBot *>(this); CCSBot *pBot = static_cast<CCSBot *>(this);
if (pBot->IsBot()) if (pBot->IsBot())
{ {
@ -8257,7 +8257,7 @@ void CBasePlayer::ResetStamina(void)
float_precision GetPlayerPitch(const edict_t *pEdict) float_precision GetPlayerPitch(const edict_t *pEdict)
{ {
entvars_t *pev = VARS((edict_t *)pEdict); entvars_t *pev = VARS((edict_t *)pEdict);
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
if (!pPlayer) if (!pPlayer)
return 0.0f; return 0.0f;
@ -8269,7 +8269,7 @@ float_precision GetPlayerPitch(const edict_t *pEdict)
float_precision GetPlayerYaw(const edict_t *pEdict) float_precision GetPlayerYaw(const edict_t *pEdict)
{ {
entvars_t *pev = VARS((edict_t *)pEdict); entvars_t *pev = VARS((edict_t *)pEdict);
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
if (!pPlayer) if (!pPlayer)
return 0.0f; return 0.0f;
@ -8281,7 +8281,7 @@ float_precision GetPlayerYaw(const edict_t *pEdict)
int GetPlayerGaitsequence(const edict_t *pEdict) int GetPlayerGaitsequence(const edict_t *pEdict)
{ {
entvars_t *pev = VARS((edict_t *)pEdict); entvars_t *pev = VARS((edict_t *)pEdict);
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
if (!pPlayer) if (!pPlayer)
return 1; return 1;
@ -8424,7 +8424,7 @@ bool CBasePlayer::CanAffordPrimary(void)
if (m_iTeam == CT) if (m_iTeam == CT)
{ {
WeaponStruct *temp; WeaponStruct *temp;
for (int i = 0; i < MAX_WEAPONS; i++) for (int i = 0; i < MAX_WEAPONS; ++i)
{ {
temp = &g_weaponStruct[ i ]; temp = &g_weaponStruct[ i ];
@ -8435,7 +8435,7 @@ bool CBasePlayer::CanAffordPrimary(void)
else if (m_iTeam == TERRORIST) else if (m_iTeam == TERRORIST)
{ {
WeaponStruct *temp; WeaponStruct *temp;
for (int i = 0; i < MAX_WEAPONS; i++) for (int i = 0; i < MAX_WEAPONS; ++i)
{ {
temp = &g_weaponStruct[ i ]; temp = &g_weaponStruct[ i ];
@ -8452,7 +8452,7 @@ bool CBasePlayer::CanAffordPrimaryAmmo(void)
{ {
CBasePlayerWeapon *primary = (CBasePlayerWeapon *)&m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]; CBasePlayerWeapon *primary = (CBasePlayerWeapon *)&m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ];
for (int i = 0; i < MAX_WEAPONS; i++) for (int i = 0; i < MAX_WEAPONS; ++i)
{ {
WeaponStruct *temp = &g_weaponStruct[ i ]; WeaponStruct *temp = &g_weaponStruct[ i ];
@ -8468,7 +8468,7 @@ bool CBasePlayer::CanAffordSecondaryAmmo(void)
{ {
CBasePlayerWeapon *secondary = (CBasePlayerWeapon *)&m_rgpPlayerItems[ PISTOL_SLOT ]; CBasePlayerWeapon *secondary = (CBasePlayerWeapon *)&m_rgpPlayerItems[ PISTOL_SLOT ];
for (int i = 0; i < MAX_WEAPONS; i++) for (int i = 0; i < MAX_WEAPONS; ++i)
{ {
WeaponStruct *temp = &g_weaponStruct[ i ]; WeaponStruct *temp = &g_weaponStruct[ i ];
@ -8778,7 +8778,7 @@ const char *CBasePlayer::PickPrimaryCareerTaskWeapon(void)
} }
buf[0] = '\0'; buf[0] = '\0';
primary = reinterpret_cast<CBasePlayerWeapon *>(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); primary = static_cast<CBasePlayerWeapon *>(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]);
for (CareerTaskListIt it = TheCareerTasks->GetTasks()->begin(); it != TheCareerTasks->GetTasks()->end(); ++it) for (CareerTaskListIt it = TheCareerTasks->GetTasks()->begin(); it != TheCareerTasks->GetTasks()->end(); ++it)
{ {
@ -8831,7 +8831,7 @@ const char *CBasePlayer::PickPrimaryCareerTaskWeapon(void)
return NULL; return NULL;
} }
for (int i = 0; i < taskNum; i++) for (int i = 0; i < taskNum; ++i)
{ {
CCareerTask *pTask = taskVector[i]; CCareerTask *pTask = taskVector[i];
@ -8859,7 +8859,7 @@ const char *CBasePlayer::PickSecondaryCareerTaskWeapon(void)
return NULL; return NULL;
} }
secondary = reinterpret_cast<CBasePlayerWeapon *>(m_rgpPlayerItems[PISTOL_SLOT]); secondary = static_cast<CBasePlayerWeapon *>(m_rgpPlayerItems[PISTOL_SLOT]);
for (CareerTaskListIt it = TheCareerTasks->GetTasks()->begin(); it != TheCareerTasks->GetTasks()->end(); ++it) for (CareerTaskListIt it = TheCareerTasks->GetTasks()->begin(); it != TheCareerTasks->GetTasks()->end(); ++it)
{ {
@ -8914,7 +8914,7 @@ const char *CBasePlayer::PickSecondaryCareerTaskWeapon(void)
buf[0] = '\0'; buf[0] = '\0';
for (int i = 0; i < taskNum; i++) for (int i = 0; i < taskNum; ++i)
{ {
CCareerTask *pTask = taskVector[i]; CCareerTask *pTask = taskVector[i];
@ -9000,7 +9000,7 @@ void CBasePlayer::PrioritizeAutoBuyString(char *autobuyString, const char *prior
// get the next token from the priority string. // get the next token from the priority string.
while (*priorityChar != '\0' && *priorityChar != ' ') while (*priorityChar != '\0' && *priorityChar != ' ')
{ {
priorityToken[ i++ ] = *priorityChar; priorityToken[i++] = *priorityChar;
++priorityChar; ++priorityChar;
} }
@ -9159,7 +9159,7 @@ AutoBuyInfoStruct *CBasePlayer::GetAutoBuyCommandInfo(const char *command)
if (Q_stricmp(temp->m_command, command) == 0) if (Q_stricmp(temp->m_command, command) == 0)
ret = temp; ret = temp;
i++; ++i;
} }
return ret; return ret;
@ -9377,7 +9377,7 @@ void CBasePlayer::RebuyHEGrenade(void)
int numToBuy = m_rebuyStruct.m_heGrenade - m_rgAmmo[ iAmmoIndex ]; int numToBuy = m_rebuyStruct.m_heGrenade - m_rgAmmo[ iAmmoIndex ];
for (int i = 0; i < numToBuy; i++) for (int i = 0; i < numToBuy; ++i)
ClientCommand("hegren"); ClientCommand("hegren");
} }
@ -9391,7 +9391,7 @@ void CBasePlayer::RebuyFlashbang(void)
int numToBuy = m_rebuyStruct.m_flashbang - m_rgAmmo[ iAmmoIndex ]; int numToBuy = m_rebuyStruct.m_flashbang - m_rgAmmo[ iAmmoIndex ];
for (int i = 0; i < numToBuy; i++) for (int i = 0; i < numToBuy; ++i)
ClientCommand("flash"); ClientCommand("flash");
} }
@ -9405,7 +9405,7 @@ void CBasePlayer::RebuySmokeGrenade(void)
int numToBuy = m_rebuyStruct.m_smokeGrenade - m_rgAmmo[ iAmmoIndex ]; int numToBuy = m_rebuyStruct.m_smokeGrenade - m_rgAmmo[ iAmmoIndex ];
for (int i = 0; i < numToBuy; i++) for (int i = 0; i < numToBuy; ++i)
ClientCommand("sgren"); ClientCommand("sgren");
} }
@ -9488,9 +9488,9 @@ void CBasePlayer::UpdateLocation(bool forceUpdate)
m_flLastUpdateTime = gpGlobals->time; m_flLastUpdateTime = gpGlobals->time;
Q_snprintf(m_lastLocation, sizeof(m_lastLocation), "#%s", placeName); Q_snprintf(m_lastLocation, sizeof(m_lastLocation), "#%s", placeName);
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (!player) if (!player)
continue; continue;

View File

@ -50,7 +50,7 @@
#define PLAYER_FATAL_FALL_SPEED 1100.0f #define PLAYER_FATAL_FALL_SPEED 1100.0f
#define PLAYER_MAX_SAFE_FALL_SPEED 500.0f #define PLAYER_MAX_SAFE_FALL_SPEED 500.0f
#define PLAYER_SEARCH_RADIUS 64.0f #define PLAYER_USE_RADIUS 64.0f
#define ARMOR_RATIO 0.5 // Armor Takes 50% of the damage #define ARMOR_RATIO 0.5 // Armor Takes 50% of the damage
#define ARMOR_BONUS 0.5 // Each Point of Armor is work 1/x points of health #define ARMOR_BONUS 0.5 // Each Point of Armor is work 1/x points of health

View File

@ -1058,11 +1058,11 @@ void USENTENCEG_InitLRU(unsigned char *plru, int count)
if (count > CSENTENCE_LRU_MAX) if (count > CSENTENCE_LRU_MAX)
count = CSENTENCE_LRU_MAX; count = CSENTENCE_LRU_MAX;
for (i = 0; i < count; i++) for (i = 0; i < count; ++i)
plru[i] = (unsigned char)i; plru[i] = (unsigned char)i;
// randomize array // randomize array
for (i = 0; i < (count * 4); i++) for (i = 0; i < (count * 4); ++i)
{ {
j = RANDOM_LONG(0, count - 1); j = RANDOM_LONG(0, count - 1);
k = RANDOM_LONG(0, count - 1); k = RANDOM_LONG(0, count - 1);
@ -1148,7 +1148,7 @@ int USENTENCEG_Pick(int isentenceg, char *szfound)
while (!ffound) while (!ffound)
{ {
for (i = 0; i < count; i++) for (i = 0; i < count; ++i)
{ {
if (plru[i] != 0xFF) if (plru[i] != 0xFF)
{ {
@ -1194,7 +1194,7 @@ int SENTENCEG_GetIndex(const char *szgroupname)
if (!Q_strcmp(szgroupname, rgsentenceg[i].szgroupname)) if (!Q_strcmp(szgroupname, rgsentenceg[i].szgroupname))
return i; return i;
i++; ++i;
} }
return -1; return -1;
@ -1339,7 +1339,7 @@ void SENTENCEG_Init(void)
// skip whitespace // skip whitespace
i = 0; i = 0;
while (buffer[i] && buffer[i] == ' ') while (buffer[i] && buffer[i] == ' ')
i++; ++i;
if (!buffer[i]) if (!buffer[i])
continue; continue;
@ -1428,7 +1428,7 @@ void SENTENCEG_Init(void)
while (rgsentenceg[i].count && i < CSENTENCEG_MAX) while (rgsentenceg[i].count && i < CSENTENCEG_MAX)
{ {
USENTENCEG_InitLRU(&(rgsentenceg[i].rgblru[0]), rgsentenceg[i].count); USENTENCEG_InitLRU(&(rgsentenceg[i].rgblru[0]), rgsentenceg[i].count);
i++; ++i;
} }
} }
@ -1442,7 +1442,7 @@ int SENTENCEG_Lookup(const char *sample, char *sentencenum)
// this is a sentence name; lookup sentence number // this is a sentence name; lookup sentence number
// and give to engine as string. // and give to engine as string.
for (i = 0; i < gcallsentences; i++) for (i = 0; i < gcallsentences; ++i)
{ {
if (!Q_stricmp(gszallsentencenames[i], sample + 1)) if (!Q_stricmp(gszallsentencenames[i], sample + 1))
{ {
@ -1552,7 +1552,7 @@ char *memfgets(byte *pMemFile, int fileSize, int &filePos, char *pBuffer, int bu
{ {
if (pMemFile[i] == '\n') if (pMemFile[i] == '\n')
stop = 1; stop = 1;
i++; ++i;
} }
// If we actually advanced the pointer, copy it over // If we actually advanced the pointer, copy it over
@ -1604,7 +1604,7 @@ void TEXTURETYPE_Init(void)
// skip whitespace // skip whitespace
i = 0; i = 0;
while (buffer[i] && isspace(buffer[i])) while (buffer[i] && isspace(buffer[i]))
i++; ++i;
if (!buffer[i]) if (!buffer[i])
continue; continue;
@ -1618,7 +1618,7 @@ void TEXTURETYPE_Init(void)
// skip whitespace // skip whitespace
while (buffer[i] && isspace(buffer[i])) while (buffer[i] && isspace(buffer[i]))
i++; ++i;
if (!buffer[i]) if (!buffer[i])
continue; continue;
@ -1653,7 +1653,7 @@ char TEXTURETYPE_Find(char *name)
{ {
// CONSIDER: pre-sort texture names and perform faster binary search here // CONSIDER: pre-sort texture names and perform faster binary search here
for (int i = 0; i < gcTextures; i++) for (int i = 0; i < gcTextures; ++i)
{ {
if (!Q_strnicmp(name, &(grgszTextureName[ i ][0]), CBTEXTURENAMEMAX - 1)) if (!Q_strnicmp(name, &(grgszTextureName[ i ][0]), CBTEXTURENAMEMAX - 1))
return (grgchTextureType[ i ]); return (grgchTextureType[ i ]);

View File

@ -220,7 +220,7 @@ void CSoundEnt::Initialize(void)
m_iActiveSound = SOUNDLIST_EMPTY; m_iActiveSound = SOUNDLIST_EMPTY;
// clear all sounds, and link them into the free sound list. // clear all sounds, and link them into the free sound list.
for (i = 0; i < MAX_WORLD_SOUNDS; i++) for (i = 0; i < MAX_WORLD_SOUNDS; ++i)
{ {
m_SoundPool[ i ].Clear(); m_SoundPool[ i ].Clear();
m_SoundPool[ i ].m_iNext = i + 1; m_SoundPool[ i ].m_iNext = i + 1;
@ -230,7 +230,7 @@ void CSoundEnt::Initialize(void)
m_SoundPool[ i - 1 ].m_iNext = SOUNDLIST_EMPTY; m_SoundPool[ i - 1 ].m_iNext = SOUNDLIST_EMPTY;
// now reserve enough sounds for each client // now reserve enough sounds for each client
for (i = 0; i < gpGlobals->maxClients; i++) for (i = 0; i < gpGlobals->maxClients; ++i)
{ {
iSound = pSoundEnt->IAllocSound(); iSound = pSoundEnt->IAllocSound();
@ -284,8 +284,7 @@ int CSoundEnt::ISoundsInList(int iListType)
while (iThisSound != SOUNDLIST_EMPTY) while (iThisSound != SOUNDLIST_EMPTY)
{ {
i++; ++i;
iThisSound = m_SoundPool[ iThisSound ].m_iNext; iThisSound = m_SoundPool[ iThisSound ].m_iNext;
} }

View File

@ -113,7 +113,7 @@ void CBaseEntity::UpdateOnRemove(void)
{ {
// this entity was a LinkEnt in the world node graph, so we must remove it from // this entity was a LinkEnt in the world node graph, so we must remove it from
// the graph since we are removing it from the world. // the graph since we are removing it from the world.
for (i = 0; i < WorldGraph.m_cLinks; i++) for (i = 0; i < WorldGraph.m_cLinks; ++i)
{ {
if (WorldGraph.m_pLinkPool[i].m_pLinkEnt == pev) if (WorldGraph.m_pLinkPool[i].m_pLinkEnt == pev)
{ {

View File

@ -501,7 +501,7 @@ void CFuncWeaponCheck::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
return; return;
CBasePlayer *pPlayer = (CBasePlayer *)pOther; CBasePlayer *pPlayer = (CBasePlayer *)pOther;
for (int i = 1; i <= iItemCount; i++) for (int i = 1; i <= iItemCount; ++i)
{ {
if (iAnyWeapon) if (iAnyWeapon)
{ {

View File

@ -276,7 +276,7 @@ void CMultiManager::__MAKE_VHOOK(Spawn)(void)
while (swapped) while (swapped)
{ {
swapped = 0; swapped = 0;
for (int i = 1; i < m_cTargets; i++) for (int i = 1; i < m_cTargets; ++i)
{ {
if (m_flTargetDelay[i] < m_flTargetDelay[i - 1]) if (m_flTargetDelay[i] < m_flTargetDelay[i - 1])
{ {
@ -299,7 +299,7 @@ void CMultiManager::__MAKE_VHOOK(Restart)(void)
{ {
edict_t *pentTarget = NULL; edict_t *pentTarget = NULL;
for (int i = 0; i < m_cTargets; i++) for (int i = 0; i < m_cTargets; ++i)
{ {
const char *name = STRING(m_iTargetName[i]); const char *name = STRING(m_iTargetName[i]);
@ -334,7 +334,7 @@ void CMultiManager::__MAKE_VHOOK(Restart)(void)
/* <1a1402> ../cstrike/dlls/triggers.cpp:420 */ /* <1a1402> ../cstrike/dlls/triggers.cpp:420 */
BOOL CMultiManager::__MAKE_VHOOK(HasTarget)(string_t targetname) BOOL CMultiManager::__MAKE_VHOOK(HasTarget)(string_t targetname)
{ {
for (int i = 0; i < m_cTargets; i++) for (int i = 0; i < m_cTargets; ++i)
{ {
if (FStrEq(STRING(targetname), STRING(m_iTargetName[i]))) if (FStrEq(STRING(targetname), STRING(m_iTargetName[i])))
{ {
@ -1363,7 +1363,7 @@ int CChangeLevel::AddTransitionToList(LEVELLIST *pLevelList, int listCount, cons
return 0; return 0;
} }
for (i = 0; i < listCount; i++) for (i = 0; i < listCount; ++i)
{ {
if (pLevelList[i].pentLandmark == pentLandmark && Q_strcmp(pLevelList[i].mapName, pMapName) == 0) if (pLevelList[i].pentLandmark == pentLandmark && Q_strcmp(pLevelList[i].mapName, pMapName) == 0)
{ {
@ -1477,7 +1477,7 @@ int CChangeLevel::ChangeList(LEVELLIST *pLevelList, int maxList)
{ {
CSave saveHelper((SAVERESTOREDATA *)gpGlobals->pSaveData); CSave saveHelper((SAVERESTOREDATA *)gpGlobals->pSaveData);
for (i = 0; i < count; i++) for (i = 0; i < count; ++i)
{ {
int j, entityCount = 0; int j, entityCount = 0;
CBaseEntity *pEntList[ MAX_ENTITY ]; CBaseEntity *pEntList[ MAX_ENTITY ];
@ -1788,7 +1788,7 @@ void CBuyZone::BuyTouch(CBaseEntity *pOther)
if (!pOther->IsPlayer()) if (!pOther->IsPlayer())
return; return;
CBasePlayer *p = reinterpret_cast<CBasePlayer *>(pOther); CBasePlayer *p = static_cast<CBasePlayer *>(pOther);
if (pev->team == UNASSIGNED || pev->team == p->m_iTeam) if (pev->team == UNASSIGNED || pev->team == p->m_iTeam)
{ {
@ -1814,7 +1814,7 @@ void CBombTarget::BombTargetTouch(CBaseEntity *pOther)
if (!pOther->IsPlayer()) if (!pOther->IsPlayer())
return; return;
CBasePlayer *p = reinterpret_cast<CBasePlayer *>(pOther); CBasePlayer *p = static_cast<CBasePlayer *>(pOther);
if (p->m_bHasC4) if (p->m_bHasC4)
{ {
@ -1869,7 +1869,7 @@ void CEscapeZone::EscapeTouch(CBaseEntity *pOther)
if (!pOther->IsPlayer()) if (!pOther->IsPlayer())
return; return;
CBasePlayer *p = reinterpret_cast<CBasePlayer *>(pOther); CBasePlayer *p = static_cast<CBasePlayer *>(pOther);
switch (p->m_iTeam) switch (p->m_iTeam)
{ {
@ -1887,9 +1887,9 @@ void CEscapeZone::EscapeTouch(CBaseEntity *pOther)
GETPLAYERAUTHID(p->edict()) GETPLAYERAUTHID(p->edict())
); );
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer == NULL || FNullEnt(pPlayer->pev)) if (pPlayer == NULL || FNullEnt(pPlayer->pev))
continue; continue;
@ -1923,7 +1923,7 @@ void CVIP_SafetyZone::VIP_SafetyTouch(CBaseEntity *pOther)
if (!pOther->IsPlayer()) if (!pOther->IsPlayer())
return; return;
CBasePlayer *p = reinterpret_cast<CBasePlayer *>(pOther); CBasePlayer *p = static_cast<CBasePlayer *>(pOther);
p->m_signals.Signal(SIGNAL_VIPSAFETY); p->m_signals.Signal(SIGNAL_VIPSAFETY);
if (p->m_bIsVIP) if (p->m_bIsVIP)

View File

@ -91,9 +91,9 @@ void MonitorTutorStatus(void)
else else
tutor_enableCvarExists = false; tutor_enableCvarExists = false;
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
if (pPlayer && !pPlayer->IsBot()) if (pPlayer && !pPlayer->IsBot())
{ {

View File

@ -3075,105 +3075,90 @@ void CCSTutor::CheckExamineMessages(float time)
CBasePlayer *localPlayer = UTIL_GetLocalPlayer(); CBasePlayer *localPlayer = UTIL_GetLocalPlayer();
if (localPlayer == NULL) if (localPlayer == NULL)
{
return; return;
}
for (int i = 0; i < TUTOR_NUM_MESSAGES; ++i) for (int i = 0; i < TUTOR_NUM_MESSAGES; ++i)
{ {
//bool sawOne = false;
TutorMessage *message = GetTutorMessageDefinition(i); TutorMessage *message = GetTutorMessageDefinition(i);
if (message == NULL || message->m_class != TUTORMESSAGECLASS_EXAMINE) if (message == NULL || message->m_class != TUTORMESSAGECLASS_EXAMINE)
{
continue; continue;
}
CBaseEntity *entity = GetEntityForMessageID(i);
if (entity == NULL)
{
message->m_examineStartTime = -1.0f;
continue;
}
CBaseEntity *entity = NULL;
bool isPlayerLooking = false; bool isPlayerLooking = false;
if (i == YOU_SEE_FRIEND_CORPSE || i == YOU_SEE_ENEMY_CORPSE) while ((entity = GetEntityForMessageID(i, entity)) != NULL)
{ {
if (IsPlayerLookingAtPosition((Vector *)entity, localPlayer)) if (i == YOU_SEE_FRIEND_CORPSE || i == YOU_SEE_ENEMY_CORPSE)
{
if (IsPlayerLookingAtPosition((Vector *)entity, localPlayer))
{
isPlayerLooking = true;
break;
}
}
else if (i == YOU_SEE_HOSTAGE_CT_EXAMINE || i == YOU_SEE_FRIEND || i == YOU_SEE_ENEMY)
{
if (IsPlayerLookingAtEntity(entity, localPlayer))
{
isPlayerLooking = true;
break;
}
}
else if (IsPlayerLookingAtPosition(&entity->pev->origin, localPlayer))
{ {
isPlayerLooking = true; isPlayerLooking = true;
break;
} }
} }
else if (i == YOU_SEE_HOSTAGE_CT_EXAMINE || i == YOU_SEE_FRIEND || i == YOU_SEE_ENEMY)
if (isPlayerLooking)
{ {
if (IsPlayerLookingAtEntity(entity, localPlayer)) if (message->m_examineStartTime == -1.0f)
continue;
if (time - message->m_examineStartTime <= cv_tutor_examine_time.value)
continue;
bool validEntity = false;
if (i == YOU_SEE_FRIEND)
{ {
isPlayerLooking = true; CBasePlayer *player = static_cast<CBasePlayer *>(entity);
if (player->IsPlayer() && player->IsAlive() && player->m_iTeam == localPlayer->m_iTeam)
validEntity = true;
}
else if (i == YOU_SEE_ENEMY)
{
CBasePlayer *player = static_cast<CBasePlayer *>(entity);
if (player->IsPlayer() && player->IsAlive() && player->m_iTeam == localPlayer->m_iTeam)
{
if ((player->m_iTeam != CT || localPlayer->m_iTeam == TERRORIST) && (player->m_iTeam != TERRORIST || localPlayer->m_iTeam == CT))
validEntity = true;
}
}
else if (i == YOU_SEE_HOSTAGE_CT_EXAMINE)
{
CHostage *hostage = static_cast<CHostage *>(entity);
if (entity->pev->takedamage == DAMAGE_YES)
{
if (!hostage->IsFollowingSomeone())
validEntity = true;
}
if (!hostage->IsValid() || !validEntity)
continue;
}
if (validEntity)
{
CreateAndAddEventToList((TutorMessageID)i, entity);
} }
}
else if (IsPlayerLookingAtPosition(&entity->pev->origin, localPlayer))
{
isPlayerLooking = true;
} }
else else
isPlayerLooking = false; message->m_examineStartTime = -1.0f;
entity = GetEntityForMessageID(i, entity);
if (!isPlayerLooking)
{
if (entity == NULL)
{
message->m_examineStartTime = -1.0f;
continue;
}
}
if (message->m_examineStartTime == -1.0f || (time - message->m_examineStartTime <= cv_tutor_examine_time.value))
{
continue;
}
bool validEntity = false;
if (i == YOU_SEE_FRIEND)
{
CBasePlayer *player = static_cast<CBasePlayer *>(entity);
if (player->IsPlayer() && player->IsAlive() && player->m_iTeam == localPlayer->m_iTeam)
validEntity = true;
}
else if (i == YOU_SEE_ENEMY)
{
CBasePlayer *player = static_cast<CBasePlayer *>(entity);
if (player->IsPlayer() && player->IsAlive() && player->m_iTeam == localPlayer->m_iTeam)
{
if ((player->m_iTeam != CT || localPlayer->m_iTeam == TERRORIST) && (player->m_iTeam != TERRORIST || localPlayer->m_iTeam == CT))
validEntity = true;
}
}
else if (i == YOU_SEE_HOSTAGE_CT_EXAMINE)
{
CHostage *hostage = static_cast<CHostage *>(entity);
if (entity->pev->takedamage == DAMAGE_YES)
{
if (!hostage->IsFollowingSomeone())
validEntity = true;
}
if (!hostage->IsValid() || !validEntity)
continue;
}
if (validEntity)
{
CreateAndAddEventToList((TutorMessageID)i, entity);
}
} }
} }

View File

@ -123,7 +123,7 @@ int g_groupop = 0;
const int gSizes[18] = { 4, 4, 4, 4, 4, 4, 4, 12, 12, 4, 4, 4, 4, 2, 1, 4, 4, 4 }; const int gSizes[18] = { 4, 4, 4, 4, 4, 4, 4, 12, 12, 4, 4, 4, 4, 2, 1, 4, 4, 4 };
#else //HOOK_GAMEDLL #else // HOOK_GAMEDLL
unsigned int seed_table[256]; unsigned int seed_table[256];
TYPEDESCRIPTION gEntvarsDescription[86]; TYPEDESCRIPTION gEntvarsDescription[86];
@ -133,7 +133,7 @@ int g_groupmask;
const int gSizes[18]; const int gSizes[18];
#endif //HOOK_GAMEDLL #endif // HOOK_GAMEDLL
float UTIL_WeaponTimeBase(void) float UTIL_WeaponTimeBase(void)
{ {
@ -283,6 +283,7 @@ NOXREF float UTIL_AngleDiff(float destAngle, float srcAngle)
if (delta <= -180.0f) if (delta <= -180.0f)
delta += 360.0f; delta += 360.0f;
} }
return delta; return delta;
} }
@ -312,7 +313,7 @@ int UTIL_EntitiesInBox(CBaseEntity **pList, int listMax, const Vector &mins, con
if (!pEdict) if (!pEdict)
return 0; return 0;
for (int i = 1; i < gpGlobals->maxEntities; i++, pEdict++) for (int i = 1; i < gpGlobals->maxEntities; ++i, ++pEdict)
{ {
if (pEdict->free) if (pEdict->free)
continue; continue;
@ -356,12 +357,12 @@ NOXREF int UTIL_MonstersInSphere(CBaseEntity ** pList, int listMax, const Vector
if (!pEdict) if (!pEdict)
return count; return count;
for (int i = 1; i < gpGlobals->maxEntities; i++, pEdict++) for (int i = 1; i < gpGlobals->maxEntities; ++i, ++pEdict)
{ {
if (pEdict->free) if (pEdict->free)
continue; continue;
if (!(pEdict->v.flags & (FL_CLIENT|FL_MONSTER))) if (!(pEdict->v.flags & (FL_CLIENT | FL_MONSTER)))
continue; continue;
delta = center.x - pEdict->v.origin.x; delta = center.x - pEdict->v.origin.x;
@ -404,7 +405,7 @@ NOXREF int UTIL_MonstersInSphere(CBaseEntity ** pList, int listMax, const Vector
CBaseEntity *UTIL_FindEntityInSphere(CBaseEntity *pStartEntity, const Vector &vecCenter, float flRadius) CBaseEntity *UTIL_FindEntityInSphere(CBaseEntity *pStartEntity, const Vector &vecCenter, float flRadius)
{ {
edict_t *pentEntity; edict_t *pentEntity;
if (pStartEntity) if (pStartEntity != NULL)
pentEntity = pStartEntity->edict(); pentEntity = pStartEntity->edict();
else else
pentEntity = NULL; pentEntity = NULL;
@ -422,7 +423,7 @@ CBaseEntity *UTIL_FindEntityInSphere(CBaseEntity *pStartEntity, const Vector &ve
CBaseEntity *UTIL_FindEntityByString_Old(CBaseEntity *pStartEntity, const char *szKeyword, const char *szValue) CBaseEntity *UTIL_FindEntityByString_Old(CBaseEntity *pStartEntity, const char *szKeyword, const char *szValue)
{ {
edict_t *pentEntity; edict_t *pentEntity;
if (pStartEntity) if (pStartEntity != NULL)
pentEntity = pStartEntity->edict(); pentEntity = pStartEntity->edict();
else else
pentEntity = NULL; pentEntity = NULL;
@ -535,7 +536,7 @@ CBaseEntity *UTIL_FindEntityGeneric(const char *szWhatever, const Vector &vecSrc
{ {
CBaseEntity *pSearch = NULL; CBaseEntity *pSearch = NULL;
CBaseEntity *pEntity = UTIL_FindEntityByTargetname(NULL, szWhatever); CBaseEntity *pEntity = UTIL_FindEntityByTargetname(NULL, szWhatever);
if (pEntity) if (pEntity != NULL)
return pEntity; return pEntity;
float flMaxDist2 = flRadius * flRadius; float flMaxDist2 = flRadius * flRadius;
@ -549,6 +550,7 @@ CBaseEntity *UTIL_FindEntityGeneric(const char *szWhatever, const Vector &vecSrc
flMaxDist2 = flDist2; flMaxDist2 = flDist2;
} }
} }
return pEntity; return pEntity;
} }
@ -645,7 +647,7 @@ void UTIL_ScreenShake(const Vector &center, float amplitude, float frequency, fl
shake.duration = FixedUnsigned16(duration, 1<<12); shake.duration = FixedUnsigned16(duration, 1<<12);
shake.frequency = FixedUnsigned16(frequency, 1<<8); shake.frequency = FixedUnsigned16(frequency, 1<<8);
for (i = 1; i <= gpGlobals->maxClients; i++) for (i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *pPlayer = UTIL_PlayerByIndex(i); CBaseEntity *pPlayer = UTIL_PlayerByIndex(i);
if (!pPlayer || !(pPlayer->pev->flags & FL_ONGROUND)) if (!pPlayer || !(pPlayer->pev->flags & FL_ONGROUND))
@ -717,7 +719,7 @@ void UTIL_ScreenFadeAll(const Vector &color, float fadeTime, float fadeHold, int
int i; int i;
ScreenFade fade; ScreenFade fade;
UTIL_ScreenFadeBuild(fade, color, fadeTime, fadeHold, alpha, flags); UTIL_ScreenFadeBuild(fade, color, fadeTime, fadeHold, alpha, flags);
for (i = 1; i <= gpGlobals->maxClients; i++) for (i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *pPlayer = UTIL_PlayerByIndex(i); CBaseEntity *pPlayer = UTIL_PlayerByIndex(i);
UTIL_ScreenFadeWrite(fade, pPlayer); UTIL_ScreenFadeWrite(fade, pPlayer);
@ -779,10 +781,10 @@ void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, cons
/* <1ae1bf> ../cstrike/dlls/util.cpp:963 */ /* <1ae1bf> ../cstrike/dlls/util.cpp:963 */
void UTIL_HudMessageAll(const hudtextparms_t &textparms, const char *pMessage) void UTIL_HudMessageAll(const hudtextparms_t &textparms, const char *pMessage)
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *pPlayer = UTIL_PlayerByIndex(i); CBaseEntity *pPlayer = UTIL_PlayerByIndex(i);
if (pPlayer) if (pPlayer != NULL)
UTIL_HudMessage(pPlayer, textparms, pMessage); UTIL_HudMessage(pPlayer, textparms, pMessage);
} }
} }
@ -877,14 +879,14 @@ NOXREF char *UTIL_dtos4(int d)
/* <1ae6c6> ../cstrike/dlls/util.cpp:1061 */ /* <1ae6c6> ../cstrike/dlls/util.cpp:1061 */
void UTIL_ShowMessageArgs(const char *pString, CBaseEntity *pPlayer, CUtlVector<char *> *args, bool isHint) void UTIL_ShowMessageArgs(const char *pString, CBaseEntity *pPlayer, CUtlVector<char *> *args, bool isHint)
{ {
if (pPlayer && pPlayer->IsNetClient()) if (pPlayer != NULL && pPlayer->IsNetClient())
{ {
MESSAGE_BEGIN(MSG_ONE, gmsgHudTextArgs, NULL, pPlayer->pev); MESSAGE_BEGIN(MSG_ONE, gmsgHudTextArgs, NULL, pPlayer->pev);
WRITE_STRING(pString); WRITE_STRING(pString);
WRITE_BYTE(isHint); WRITE_BYTE(isHint);
WRITE_BYTE(args->Count()); WRITE_BYTE(args->Count());
for (int i = 0; i < args->Count(); i++) for (int i = 0; i < args->Count(); ++i)
WRITE_STRING(args->Element(i)); WRITE_STRING(args->Element(i));
MESSAGE_END(); MESSAGE_END();
@ -913,10 +915,10 @@ void UTIL_ShowMessage(const char *pString, CBaseEntity *pEntity, bool isHint)
/* <1ae8ac> ../cstrike/dlls/util.cpp:1095 */ /* <1ae8ac> ../cstrike/dlls/util.cpp:1095 */
void UTIL_ShowMessageAll(const char *pString, bool isHint) void UTIL_ShowMessageAll(const char *pString, bool isHint)
{ {
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBaseEntity *pPlayer = UTIL_PlayerByIndex(i); CBaseEntity *pPlayer = UTIL_PlayerByIndex(i);
if (pPlayer) if (pPlayer != NULL)
UTIL_ShowMessage(pString, pPlayer, isHint); UTIL_ShowMessage(pString, pPlayer, isHint);
} }
} }
@ -980,7 +982,8 @@ float UTIL_VecToYaw(const Vector &vec)
void UTIL_SetOrigin(entvars_t *pev, const Vector &vecOrigin) void UTIL_SetOrigin(entvars_t *pev, const Vector &vecOrigin)
{ {
edict_t *ent = ENT(pev); edict_t *ent = ENT(pev);
if (ent)
if (ent != NULL)
SET_ORIGIN(ent, vecOrigin); SET_ORIGIN(ent, vecOrigin);
} }
@ -1000,6 +1003,7 @@ float UTIL_Approach(float target, float value, float speed)
value -= speed; value -= speed;
else else
value = target; value = target;
return value; return value;
} }
@ -1024,6 +1028,7 @@ float_precision UTIL_ApproachAngle(float target, float value, float speed)
value -= speed; value -= speed;
else else
value = target; value = target;
return value; return value;
} }
@ -1105,6 +1110,7 @@ BOOL UTIL_ShouldShowBlood(int color)
return TRUE; return TRUE;
} }
} }
return FALSE; return FALSE;
} }
@ -1231,6 +1237,7 @@ void UTIL_DecalTrace(TraceResult *pTrace, int decalNumber)
index -= 256; index -= 256;
} }
} }
MESSAGE_BEGIN(MSG_BROADCAST, SVC_TEMPENTITY); MESSAGE_BEGIN(MSG_BROADCAST, SVC_TEMPENTITY);
WRITE_BYTE(message); WRITE_BYTE(message);
WRITE_COORD(pTrace->vecEndPos.x); WRITE_COORD(pTrace->vecEndPos.x);
@ -1330,6 +1337,7 @@ BOOL UTIL_TeamsMatch(const char *pTeamName1, const char *pTeamName2)
if (!Q_stricmp(pTeamName1, pTeamName2)) if (!Q_stricmp(pTeamName1, pTeamName2))
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
@ -1506,7 +1514,7 @@ void UTIL_BubbleTrail(Vector from, Vector to, int count)
/* <1afcfe> ../cstrike/dlls/util.cpp:1731 */ /* <1afcfe> ../cstrike/dlls/util.cpp:1731 */
void UTIL_Remove(CBaseEntity *pEntity) void UTIL_Remove(CBaseEntity *pEntity)
{ {
if (pEntity) if (pEntity != NULL)
{ {
pEntity->UpdateOnRemove(); pEntity->UpdateOnRemove();
pEntity->pev->flags |= FL_KILLME; pEntity->pev->flags |= FL_KILLME;
@ -1570,9 +1578,9 @@ void UTIL_StripToken(const char *pKey, char *pDest)
while (pKey[i] && pKey[i] != '#') while (pKey[i] && pKey[i] != '#')
{ {
pDest[i] = pKey[i]; pDest[i] = pKey[i];
i++; ++i;
} }
pDest[i] = 0; pDest[i] = '\0';
} }
/* <1b003a> ../cstrike/dlls/util.cpp:1847 */ /* <1b003a> ../cstrike/dlls/util.cpp:1847 */
@ -1623,12 +1631,13 @@ int CSaveRestoreBuffer::EntityIndex(edict_t *pentLookup)
if (!m_pdata || !pentLookup) if (!m_pdata || !pentLookup)
return -1; return -1;
for (int i = 0; i < m_pdata->tableCount; i++) for (int i = 0; i < m_pdata->tableCount; ++i)
{ {
ENTITYTABLE *pTable = &m_pdata->pTable[i]; ENTITYTABLE *pTable = &m_pdata->pTable[i];
if (pTable->pent == pentLookup) if (pTable->pent == pentLookup)
return i; return i;
} }
return -1; return -1;
} }
@ -1638,12 +1647,13 @@ edict_t *CSaveRestoreBuffer::EntityFromIndex(int entityIndex)
if (!m_pdata || entityIndex < 0) if (!m_pdata || entityIndex < 0)
return NULL; return NULL;
for (int i = 0; i < m_pdata->tableCount; i++) for (int i = 0; i < m_pdata->tableCount; ++i)
{ {
ENTITYTABLE *pTable = &m_pdata->pTable[i]; ENTITYTABLE *pTable = &m_pdata->pTable[i];
if (pTable->id == entityIndex) if (pTable->id == entityIndex)
return pTable->pent; return pTable->pent;
} }
return NULL; return NULL;
} }
@ -1691,6 +1701,7 @@ extern "C"
if (lobit) if (lobit)
num |= 0x80000000; num |= 0x80000000;
} }
return num; return num;
} }
} }
@ -1710,7 +1721,7 @@ unsigned int CSaveRestoreBuffer::HashString(const char *pszToken)
unsigned short CSaveRestoreBuffer::TokenHash(const char *pszToken) unsigned short CSaveRestoreBuffer::TokenHash(const char *pszToken)
{ {
unsigned short hash = (unsigned short)(HashString(pszToken) % (unsigned)m_pdata->tokenCount); unsigned short hash = (unsigned short)(HashString(pszToken) % (unsigned)m_pdata->tokenCount);
for (int i = 0; i < m_pdata->tokenCount; i++) for (int i = 0; i < m_pdata->tokenCount; ++i)
{ {
int index = hash + i; int index = hash + i;
if (index >= m_pdata->tokenCount) if (index >= m_pdata->tokenCount)
@ -1757,7 +1768,7 @@ void CSave::WriteTime(const char *pname, const float *data, int count)
int i; int i;
BufferHeader(pname, sizeof(float) * count); BufferHeader(pname, sizeof(float) * count);
for (i = 0; i < count; i++) for (i = 0; i < count; ++i)
{ {
float tmp = data[0]; float tmp = data[0];
@ -1781,11 +1792,11 @@ void CSave::WriteString(const char *pname, const int *stringId, int count)
int i; int i;
int size = 0; int size = 0;
for (i = 0; i < count; i++) for (i = 0; i < count; ++i)
size += Q_strlen(STRING(stringId[i])) + 1; size += Q_strlen(STRING(stringId[i])) + 1;
BufferHeader(pname, size); BufferHeader(pname, size);
for (i = 0; i < count; i++) for (i = 0; i < count; ++i)
{ {
const char *pString = STRING(stringId[i]); const char *pString = STRING(stringId[i]);
BufferData(pString, Q_strlen(pString) + 1); BufferData(pString, Q_strlen(pString) + 1);
@ -1820,7 +1831,7 @@ NOXREF void CSave::WritePositionVector(const char *pname, const Vector &value)
void CSave::WritePositionVector(const char *pname, const float *value, int count) void CSave::WritePositionVector(const char *pname, const float *value, int count)
{ {
BufferHeader(pname, sizeof(float) * 3 * count); BufferHeader(pname, sizeof(float) * 3 * count);
for (int i = 0; i < count; i++) for (int i = 0; i < count; ++i)
{ {
Vector tmp(value[0], value[1], value[2]); Vector tmp(value[0], value[1], value[2]);
@ -1846,7 +1857,7 @@ void CSave::WriteFunction(const char *pname, void **data, int count)
/* <1b2e7a> ../cstrike/dlls/util.cpp:2157 */ /* <1b2e7a> ../cstrike/dlls/util.cpp:2157 */
void EntvarsKeyvalue(entvars_t *pev, KeyValueData *pkvd) void EntvarsKeyvalue(entvars_t *pev, KeyValueData *pkvd)
{ {
for (int i = 0; i < ARRAYSIZE(gEntvarsDescription); i++) for (int i = 0; i < ARRAYSIZE(gEntvarsDescription); ++i)
{ {
TYPEDESCRIPTION *pField = &gEntvarsDescription[i]; TYPEDESCRIPTION *pField = &gEntvarsDescription[i];
@ -1898,7 +1909,7 @@ int CSave::WriteFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFie
int i; int i;
int emptyCount = 0; int emptyCount = 0;
for (i = 0; i < fieldCount; i++) for (i = 0; i < fieldCount; ++i)
{ {
void *pOutputData = ((char *)pBaseData + pFields[i].fieldOffset); void *pOutputData = ((char *)pBaseData + pFields[i].fieldOffset);
if (DataEmpty((const char *)pOutputData, pFields[i].fieldSize * gSizes[pFields[i].fieldType])) if (DataEmpty((const char *)pOutputData, pFields[i].fieldSize * gSizes[pFields[i].fieldType]))
@ -1909,7 +1920,7 @@ int CSave::WriteFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFie
int actualCount = fieldCount - emptyCount; int actualCount = fieldCount - emptyCount;
WriteInt(pname, &actualCount, 1); WriteInt(pname, &actualCount, 1);
for (i = 0; i < fieldCount; i++) for (i = 0; i < fieldCount; ++i)
{ {
TYPEDESCRIPTION *pTest = &pFields[i]; TYPEDESCRIPTION *pTest = &pFields[i];
void *pOutputData = ((char *)pBaseData + pTest->fieldOffset); void *pOutputData = ((char *)pBaseData + pTest->fieldOffset);
@ -1994,6 +2005,7 @@ int CSave::WriteFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFie
default: ALERT(at_error, "Bad field type\n"); default: ALERT(at_error, "Bad field type\n");
} }
} }
return 1; return 1;
} }
@ -2008,11 +2020,12 @@ NOXREF void CSave::BufferString(char *pdata, int len)
/* <1b3f5d> ../cstrike/dlls/util.cpp:2333 */ /* <1b3f5d> ../cstrike/dlls/util.cpp:2333 */
int CSave::DataEmpty(const char *pdata, int size) int CSave::DataEmpty(const char *pdata, int size)
{ {
for (int i = 0; i < size; i++) for (int i = 0; i < size; ++i)
{ {
if (pdata[i]) if (pdata[i])
return 0; return 0;
} }
return 1; return 1;
} }
@ -2064,7 +2077,7 @@ int CRestore::ReadField(void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCoun
if (m_pdata->fUseLandmark) if (m_pdata->fUseLandmark)
position = m_pdata->vecLandmarkOffset; position = m_pdata->vecLandmarkOffset;
} }
for (int i = 0; i < fieldCount; i++) for (int i = 0; i < fieldCount; ++i)
{ {
int fieldNumber = (i + startField) % fieldCount; int fieldNumber = (i + startField) % fieldCount;
TYPEDESCRIPTION *pTest = &pFields[fieldNumber]; TYPEDESCRIPTION *pTest = &pFields[fieldNumber];
@ -2244,12 +2257,12 @@ int CRestore::ReadFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pF
int fileCount = ReadInt(); int fileCount = ReadInt();
int lastField = 0; int lastField = 0;
for (i = 0; i < fieldCount; i++) for (i = 0; i < fieldCount; ++i)
{ {
if (!m_global || !(pFields[i].flags & FTYPEDESC_GLOBAL)) if (!m_global || !(pFields[i].flags & FTYPEDESC_GLOBAL))
Q_memset(((char *)pBaseData + pFields[i].fieldOffset), 0, pFields[i].fieldSize * gSizes[pFields[i].fieldType]); Q_memset(((char *)pBaseData + pFields[i].fieldOffset), 0, pFields[i].fieldSize * gSizes[pFields[i].fieldType]);
} }
for (i = 0; i < fileCount; i++) for (i = 0; i < fileCount; ++i)
{ {
HEADER header; HEADER header;
BufferReadHeader(&header); BufferReadHeader(&header);
@ -2369,6 +2382,7 @@ NOXREF int CRestore::BufferCheckZString(const char *string)
if (!strncmp(string, m_pdata->pCurrentData, len)) if (!strncmp(string, m_pdata->pCurrentData, len))
return 1; return 1;
} }
return 0; return 0;
} }
@ -2402,18 +2416,19 @@ char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd)
pTextureName++; pTextureName++;
Q_strcpy(szbuffer, pTextureName); Q_strcpy(szbuffer, pTextureName);
szbuffer[16] = 0; szbuffer[16] = '\0';
chTextureType = TEXTURETYPE_Find(szbuffer); chTextureType = TEXTURETYPE_Find(szbuffer);
} }
else else
chTextureType = 0; chTextureType = '\0';
return chTextureType; return chTextureType;
} }
/* <1b5330> ../cstrike/dlls/util.cpp:2767 */ /* <1b5330> ../cstrike/dlls/util.cpp:2767 */
NOXREF int GetPlayerTeam(int index) NOXREF int GetPlayerTeam(int index)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(index)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(index));
if (pPlayer != NULL) if (pPlayer != NULL)
{ {
return pPlayer->m_iTeam; return pPlayer->m_iTeam;
@ -2440,7 +2455,7 @@ bool UTIL_IsGame(const char *gameName)
/* <1b5470> ../cstrike/dlls/util.cpp:2802 */ /* <1b5470> ../cstrike/dlls/util.cpp:2802 */
float_precision UTIL_GetPlayerGaitYaw(int playerIndex) float_precision UTIL_GetPlayerGaitYaw(int playerIndex)
{ {
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(playerIndex)); CBasePlayer *pPlayer = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(playerIndex));
if (pPlayer != NULL) if (pPlayer != NULL)
{ {
return pPlayer->m_flGaityaw; return pPlayer->m_flGaityaw;

View File

@ -78,7 +78,7 @@ MULTIDAMAGE gMultiDamage;
/* <1d018e> ../cstrike/dlls/weapons.cpp:82 */ /* <1d018e> ../cstrike/dlls/weapons.cpp:82 */
int MaxAmmoCarry(int iszName) int MaxAmmoCarry(int iszName)
{ {
for (int i = 0; i < MAX_WEAPONS; i++) for (int i = 0; i < MAX_WEAPONS; ++i)
{ {
ItemInfo *info = &IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[ i ]; ItemInfo *info = &IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[ i ];
@ -229,7 +229,7 @@ NOXREF void EjectBrass2(const Vector &vecOrigin, const Vector &vecVelocity, floa
void AddAmmoNameToAmmoRegistry(const char *szAmmoname) void AddAmmoNameToAmmoRegistry(const char *szAmmoname)
{ {
// make sure it's not already in the registry // make sure it's not already in the registry
for (int i = 0; i < MAX_AMMO_SLOTS; i++) for (int i = 0; i < MAX_AMMO_SLOTS; ++i)
{ {
if (!IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName) if (!IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName)
continue; continue;
@ -1716,7 +1716,7 @@ void CWeaponBox::Kill(void)
int i; int i;
// destroy the weapons // destroy the weapons
for (i = 0; i < MAX_ITEM_TYPES; i++) for (i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
pWeapon = m_rgpPlayerItems[i]; pWeapon = m_rgpPlayerItems[i];
@ -1768,7 +1768,7 @@ void CWeaponBox::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
// go through my weapons and try to give the usable ones to the player. // go through my weapons and try to give the usable ones to the player.
// it's important the the player be given ammo first, so the weapons code doesn't refuse // it's important the the player be given ammo first, so the weapons code doesn't refuse
// to deploy a better weapon that the player may pick up because he has no ammo for it. // to deploy a better weapon that the player may pick up because he has no ammo for it.
for (int i = 0; i < MAX_ITEM_TYPES; i++) for (int i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
if (!m_rgpPlayerItems[i]) if (!m_rgpPlayerItems[i])
{ {
@ -2035,7 +2035,7 @@ int CWeaponBox::GiveAmmo(int iCount, char *szName, int iMax, int *pIndex)
{ {
int i; int i;
for (i = 1; i < MAX_AMMO_SLOTS && !FStringNull(m_rgiszAmmo[i]); i++) for (i = 1; i < MAX_AMMO_SLOTS && !FStringNull(m_rgiszAmmo[i]); ++i)
{ {
if (!Q_stricmp(szName, STRING(m_rgiszAmmo[i]))) if (!Q_stricmp(szName, STRING(m_rgiszAmmo[i])))
{ {
@ -2096,7 +2096,7 @@ BOOL CWeaponBox::IsEmpty(void)
{ {
int i; int i;
for (i = 0; i < MAX_ITEM_TYPES; i++) for (i = 0; i < MAX_ITEM_TYPES; ++i)
{ {
if (m_rgpPlayerItems[i]) if (m_rgpPlayerItems[i])
{ {
@ -2104,7 +2104,7 @@ BOOL CWeaponBox::IsEmpty(void)
} }
} }
for (i = 0; i < MAX_AMMO_SLOTS; i++) for (i = 0; i < MAX_AMMO_SLOTS; ++i)
{ {
if (m_rgiszAmmo[i]) if (m_rgiszAmmo[i])
{ {

View File

@ -95,14 +95,6 @@ enum ArmouryItemPack
ARMOURY_SMOKEGRENADE, ARMOURY_SMOKEGRENADE,
}; };
struct BuyInfo
{
WeaponType type;
bool preferred;
char *buyAlias;
};/* size: 12, cachelines: 1, members: 3 */
struct ItemInfo struct ItemInfo
{ {
int iSlot; int iSlot;

View File

@ -247,7 +247,7 @@ const char *BuyAliasToWeaponID(const char *alias, WeaponIdType &id)
{ {
if (alias) if (alias)
{ {
for (int i = 0; weaponBuyAliasInfo[i].alias != NULL; i++) for (int i = 0; weaponBuyAliasInfo[i].alias != NULL; ++i)
{ {
if (!Q_stricmp(weaponBuyAliasInfo[i].alias, alias)) if (!Q_stricmp(weaponBuyAliasInfo[i].alias, alias))
{ {
@ -266,7 +266,7 @@ const char *BuyAliasToWeaponID(const char *alias, WeaponIdType &id)
/* <22cd03> ../cstrike/dlls/weapontype.cpp:246 */ /* <22cd03> ../cstrike/dlls/weapontype.cpp:246 */
const char *WeaponIDToAlias(int id) const char *WeaponIDToAlias(int id)
{ {
for (int i = 0; weaponAliasInfo[i].alias != NULL; i++) for (int i = 0; weaponAliasInfo[i].alias != NULL; ++i)
{ {
if (weaponAliasInfo[i].id == id) if (weaponAliasInfo[i].id == id)
return weaponAliasInfo[i].alias; return weaponAliasInfo[i].alias;
@ -280,7 +280,7 @@ WeaponClassType AliasToWeaponClass(const char *alias)
{ {
if (alias != NULL) if (alias != NULL)
{ {
for (int i = 0; weaponClassAliasInfo[i].alias != NULL; i++) for (int i = 0; weaponClassAliasInfo[i].alias != NULL; ++i)
{ {
if (!Q_stricmp(weaponClassAliasInfo[i].alias, alias)) if (!Q_stricmp(weaponClassAliasInfo[i].alias, alias))
return weaponClassAliasInfo[i].id; return weaponClassAliasInfo[i].id;
@ -354,7 +354,7 @@ NOXREF bool IsSecondaryWeapon(int id)
/* <22cf48> ../cstrike/dlls/weapontype.cpp:426 */ /* <22cf48> ../cstrike/dlls/weapontype.cpp:426 */
WeaponInfoStruct *GetWeaponInfo(int weaponID) WeaponInfoStruct *GetWeaponInfo(int weaponID)
{ {
for (int i = 0; weaponInfo[i].id != 0; i++) for (int i = 0; weaponInfo[i].id != 0; ++i)
{ {
if (weaponInfo[i].id == weaponID) if (weaponInfo[i].id == weaponID)
return &weaponInfo[i]; return &weaponInfo[i];
@ -372,63 +372,7 @@ bool CanBuyWeaponByMaptype(int playerTeam, WeaponIdType weaponID, bool useAssasi
{ {
switch (weaponID) switch (weaponID)
{ {
case WEAPON_P228:
case WEAPON_XM1014:
case WEAPON_AUG:
case WEAPON_FIVESEVEN:
case WEAPON_UMP45:
case WEAPON_SG550:
case WEAPON_FAMAS:
case WEAPON_USP:
case WEAPON_GLOCK18:
case WEAPON_MP5N:
case WEAPON_M249:
case WEAPON_M3:
case WEAPON_M4A1:
case WEAPON_TMP:
case WEAPON_DEAGLE:
case WEAPON_P90:
case WEAPON_SHIELDGUN:
{
return true;
}
default:
{
return false;
}
}
}
else if (playerTeam == TERRORIST)
{
switch (weaponID)
{
case WEAPON_P228:
case WEAPON_MAC10:
case WEAPON_ELITE:
case WEAPON_UMP45:
case WEAPON_GALIL:
case WEAPON_USP:
case WEAPON_GLOCK18:
case WEAPON_AWP:
case WEAPON_DEAGLE:
case WEAPON_AK47:
{
return true;
}
default:
{
return false;
}
}
}
return false;
}
if (playerTeam == CT)
{
switch (weaponID)
{
case WEAPON_P228: case WEAPON_P228:
case WEAPON_SCOUT:
case WEAPON_XM1014: case WEAPON_XM1014:
case WEAPON_AUG: case WEAPON_AUG:
case WEAPON_FIVESEVEN: case WEAPON_FIVESEVEN:
@ -437,7 +381,6 @@ bool CanBuyWeaponByMaptype(int playerTeam, WeaponIdType weaponID, bool useAssasi
case WEAPON_FAMAS: case WEAPON_FAMAS:
case WEAPON_USP: case WEAPON_USP:
case WEAPON_GLOCK18: case WEAPON_GLOCK18:
case WEAPON_AWP:
case WEAPON_MP5N: case WEAPON_MP5N:
case WEAPON_M249: case WEAPON_M249:
case WEAPON_M3: case WEAPON_M3:
@ -446,22 +389,16 @@ bool CanBuyWeaponByMaptype(int playerTeam, WeaponIdType weaponID, bool useAssasi
case WEAPON_DEAGLE: case WEAPON_DEAGLE:
case WEAPON_P90: case WEAPON_P90:
case WEAPON_SHIELDGUN: case WEAPON_SHIELDGUN:
{
return true; return true;
}
default: default:
{
return false; return false;
} }
} }
} else if (playerTeam == TERRORIST)
else if (playerTeam == TERRORIST)
{
switch (weaponID)
{ {
switch (weaponID)
{
case WEAPON_P228: case WEAPON_P228:
case WEAPON_SCOUT:
case WEAPON_XM1014:
case WEAPON_MAC10: case WEAPON_MAC10:
case WEAPON_ELITE: case WEAPON_ELITE:
case WEAPON_UMP45: case WEAPON_UMP45:
@ -469,22 +406,70 @@ bool CanBuyWeaponByMaptype(int playerTeam, WeaponIdType weaponID, bool useAssasi
case WEAPON_USP: case WEAPON_USP:
case WEAPON_GLOCK18: case WEAPON_GLOCK18:
case WEAPON_AWP: case WEAPON_AWP:
case WEAPON_MP5N:
case WEAPON_M249:
case WEAPON_M3:
case WEAPON_G3SG1:
case WEAPON_DEAGLE: case WEAPON_DEAGLE:
case WEAPON_SG552:
case WEAPON_AK47: case WEAPON_AK47:
case WEAPON_P90:
{
return true; return true;
}
default: default:
{
return false; return false;
} }
} }
return false;
}
if (playerTeam == CT)
{
switch (weaponID)
{
case WEAPON_P228:
case WEAPON_SCOUT:
case WEAPON_XM1014:
case WEAPON_AUG:
case WEAPON_FIVESEVEN:
case WEAPON_UMP45:
case WEAPON_SG550:
case WEAPON_FAMAS:
case WEAPON_USP:
case WEAPON_GLOCK18:
case WEAPON_AWP:
case WEAPON_MP5N:
case WEAPON_M249:
case WEAPON_M3:
case WEAPON_M4A1:
case WEAPON_TMP:
case WEAPON_DEAGLE:
case WEAPON_P90:
case WEAPON_SHIELDGUN:
return true;
default:
return false;
}
}
else if (playerTeam == TERRORIST)
{
switch (weaponID)
{
case WEAPON_P228:
case WEAPON_SCOUT:
case WEAPON_XM1014:
case WEAPON_MAC10:
case WEAPON_ELITE:
case WEAPON_UMP45:
case WEAPON_GALIL:
case WEAPON_USP:
case WEAPON_GLOCK18:
case WEAPON_AWP:
case WEAPON_MP5N:
case WEAPON_M249:
case WEAPON_M3:
case WEAPON_G3SG1:
case WEAPON_DEAGLE:
case WEAPON_SG552:
case WEAPON_AK47:
case WEAPON_P90:
return true;
default:
return false;
}
} }
return false; return false;

View File

@ -338,22 +338,10 @@ enum InventorySlotType
GRENADE_SLOT, GRENADE_SLOT,
C4_SLOT, C4_SLOT,
}; };
enum WeaponType
{
PISTOL = 0,
SHOTGUN,
SUB_MACHINE_GUN,
RIFLE,
MACHINE_GUN,
SNIPER_RIFLE,
GRENADE,
NUM_WEAPON_TYPES,
};
enum Bullet enum Bullet
{ {
BULLET_NONE = 0, BULLET_NONE,
BULLET_PLAYER_9MM, BULLET_PLAYER_9MM,
BULLET_PLAYER_MP5, BULLET_PLAYER_MP5,
BULLET_PLAYER_357, BULLET_PLAYER_357,
@ -376,26 +364,26 @@ struct AutoBuyInfoStruct
AutoBuyClassType m_class; AutoBuyClassType m_class;
char *m_command; char *m_command;
char *m_classname; char *m_classname;
};/* size: 12, cachelines: 1, members: 3 */ };
struct WeaponAliasInfo struct WeaponAliasInfo
{ {
char *alias; char *alias;
WeaponIdType id; WeaponIdType id;
};/* size: 8, cachelines: 1, members: 2 */ };
struct WeaponBuyAliasInfo struct WeaponBuyAliasInfo
{ {
char *alias; char *alias;
WeaponIdType id; WeaponIdType id;
char *failName; char *failName;
};/* size: 12, cachelines: 1, members: 3 */ };
struct WeaponClassAliasInfo struct WeaponClassAliasInfo
{ {
char *alias; char *alias;
WeaponClassType id; WeaponClassType id;
};/* size: 8, cachelines: 1, members: 2 */ };
struct WeaponInfoStruct struct WeaponInfoStruct
{ {

View File

@ -330,7 +330,7 @@ int CGlobalState::Save(CSave &save)
} }
pEntity = m_pList; pEntity = m_pList;
for (i = 0; i < m_listCount && pEntity != NULL; i++) for (i = 0; i < m_listCount && pEntity != NULL; ++i)
{ {
if (!save.WriteFields("GENT", pEntity, gGlobalEntitySaveData, ARRAYSIZE(gGlobalEntitySaveData))) if (!save.WriteFields("GENT", pEntity, gGlobalEntitySaveData, ARRAYSIZE(gGlobalEntitySaveData)))
{ {
@ -362,7 +362,7 @@ int CGlobalState::Restore(CRestore &restore)
// Clear loaded data // Clear loaded data
m_listCount = 0; m_listCount = 0;
for (i = 0; i < listCount; i++) for (i = 0; i < listCount; ++i)
{ {
if (!restore.ReadFields("GENT", &tmpEntity, gGlobalEntitySaveData, ARRAYSIZE(gGlobalEntitySaveData))) if (!restore.ReadFields("GENT", &tmpEntity, gGlobalEntitySaveData, ARRAYSIZE(gGlobalEntitySaveData)))
{ {
@ -605,7 +605,7 @@ void CWorld::__MAKE_VHOOK(Precache)(void)
// 63 testing // 63 testing
LIGHT_STYLE(63, "a"); LIGHT_STYLE(63, "a");
for (int i = 0; i < ARRAYSIZE(gDecals); i++) for (int i = 0; i < ARRAYSIZE(gDecals); ++i)
gDecals[i].index = DECAL_INDEX(gDecals[i].name); gDecals[i].index = DECAL_INDEX(gDecals[i].name);
// init the WorldGraph. // init the WorldGraph.

View File

@ -235,7 +235,7 @@ const char *CBotManager::GetNavMapFilename(void) const
void CBotManager::__MAKE_VHOOK(OnEvent)(GameEventType event, CBaseEntity *entity, CBaseEntity *other) void CBotManager::__MAKE_VHOOK(OnEvent)(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
{ {
// propogate event to all bots // propogate event to all bots
for (int i = 1; i <= gpGlobals->maxClients; i++) for (int i = 1; i <= gpGlobals->maxClients; ++i)
{ {
CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i)); CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));

View File

@ -150,7 +150,7 @@ inline void BotProfile::Inherit(const BotProfile *parent, const BotProfile *base
if (parent->m_weaponPreferenceCount != baseline->m_weaponPreferenceCount) if (parent->m_weaponPreferenceCount != baseline->m_weaponPreferenceCount)
{ {
m_weaponPreferenceCount = parent->m_weaponPreferenceCount; m_weaponPreferenceCount = parent->m_weaponPreferenceCount;
for (int i = 0; i<parent->m_weaponPreferenceCount; i++) for (int i = 0; i < parent->m_weaponPreferenceCount; ++i)
m_weaponPreference[i] = parent->m_weaponPreference[i]; m_weaponPreference[i] = parent->m_weaponPreference[i];
} }

View File

@ -318,10 +318,10 @@ inline void SnapToGrid(float *value)
} }
// custom // custom
inline float SnapToGrid(float v) inline float SnapToGrid(float value)
{ {
int c = v / GenerationStepSize; int c = value / GenerationStepSize;
return c; return c * GenerationStepSize;
} }
/* <14ea2f> ../game_shared/bot/nav.h:251 */ /* <14ea2f> ../game_shared/bot/nav.h:251 */

View File

@ -1053,7 +1053,7 @@ inline CNavArea *FindFirstAreaInDirection(const Vector *start, NavDirType dir, f
Vector pos = *start; Vector pos = *start;
int end = (int)((range / GenerationStepSize) + 0.5f); int end = (int)((range / GenerationStepSize) + 0.5f);
for (int i = 1; i <= end; i++) for (int i = 1; i <= end; ++i)
{ {
AddDirectionVector(&pos, dir, GenerationStepSize); AddDirectionVector(&pos, dir, GenerationStepSize);
@ -1872,7 +1872,7 @@ void GenerateNavigationAreaMesh(void)
while (uncoveredNodes > 0) while (uncoveredNodes > 0)
{ {
for (CNavNode *node = CNavNode::GetFirst(); node; node = node->GetNext()) for (CNavNode *node = CNavNode::GetFirst(); node != NULL; node = node->GetNext())
{ {
if (node->IsCovered()) if (node->IsCovered())
continue; continue;
@ -2260,7 +2260,7 @@ CNavArea *CNavArea::GetRandomAdjacentArea(NavDirType dir) const
if (i == which) if (i == which)
return (*iter).area; return (*iter).area;
i++; ++i;
} }
return NULL; return NULL;
@ -2556,7 +2556,7 @@ void CNavArea::DrawMarkedCorner(NavCornerType corner, byte red, byte green, byte
se.x -= border; se.x -= border;
se.y -= border; se.y -= border;
switch(corner) switch (corner)
{ {
case NORTH_WEST: case NORTH_WEST:
UTIL_DrawBeamPoints(nw + Vector(0, 0, 10), nw, duration, red, green, blue); UTIL_DrawBeamPoints(nw + Vector(0, 0, 10), nw, duration, red, green, blue);
@ -2684,7 +2684,7 @@ const Vector *CNavArea::GetCorner(NavCornerType corner) const
{ {
static Vector pos; static Vector pos;
switch(corner) switch (corner)
{ {
case NORTH_WEST: case NORTH_WEST:
return &m_extent.lo; return &m_extent.lo;
@ -2824,7 +2824,7 @@ void CNavArea::ComputeHidingSpots(void)
} }
} }
switch(d) switch (d)
{ {
case NORTH: case NORTH:
if (extent.lo - m_extent.lo.x >= cornerSize) if (extent.lo - m_extent.lo.x >= cornerSize)
@ -3742,7 +3742,6 @@ void CNavArea::DrawConnectedAreas(void)
NavDirType dir = (NavDirType)dirSet[i]; NavDirType dir = (NavDirType)dirSet[i];
int count = GetAdjacentCount(dir); int count = GetAdjacentCount(dir);
for (int a = 0; a < count; ++a) for (int a = 0; a < count; ++a)
{ {
CNavArea *adj = GetAdjacentArea(dir, a); CNavArea *adj = GetAdjacentArea(dir, a);
@ -3787,7 +3786,7 @@ void CNavArea::DrawConnectedAreas(void)
float size = 5.0f; float size = 5.0f;
ComputePortal(adj, dir, &hookPos, &halfWidth); ComputePortal(adj, dir, &hookPos, &halfWidth);
switch(dir) switch (dir)
{ {
case NORTH: case NORTH:
from = hookPos + Vector(0.0f, size, 0.0f); from = hookPos + Vector(0.0f, size, 0.0f);
@ -4086,7 +4085,7 @@ void EditNavAreas(NavEditCmdType cmd)
{ {
area->DrawConnectedAreas(); area->DrawConnectedAreas();
switch(cmd) switch (cmd)
{ {
case EDIT_TOGGLE_PLACE_MODE: case EDIT_TOGGLE_PLACE_MODE:
EMIT_SOUND_DYN(ENT(UTIL_GetLocalPlayer()->pev), CHAN_ITEM, "buttons/blip1.wav", 1, ATTN_NORM, 0, 100); EMIT_SOUND_DYN(ENT(UTIL_GetLocalPlayer()->pev), CHAN_ITEM, "buttons/blip1.wav", 1, ATTN_NORM, 0, 100);
@ -4790,25 +4789,24 @@ CNavAreaGrid::CNavAreaGrid(void) : m_cellSize(300.0f)
/* <4c4a70> ../game_shared/bot/nav_area.cpp:4953 */ /* <4c4a70> ../game_shared/bot/nav_area.cpp:4953 */
CNavAreaGrid::~CNavAreaGrid(void) CNavAreaGrid::~CNavAreaGrid(void)
{ {
delete [] m_grid; delete[] m_grid;
m_grid = NULL; m_grid = NULL;
} }
// Clear the grid
/* <4cf837> ../game_shared/bot/nav_area.cpp:4962 */ /* <4cf837> ../game_shared/bot/nav_area.cpp:4962 */
void CNavAreaGrid::Reset(void) void CNavAreaGrid::Reset(void)
{ {
if (m_grid) if (m_grid)
{ delete[] m_grid;
// TODO: FIX ME
//delete[] m_grid;
}
m_grid = NULL; m_grid = NULL;
m_gridSizeX = 0; m_gridSizeX = 0;
m_gridSizeY = 0; m_gridSizeY = 0;
// clear the hash table // clear the hash table
for (int i = 0; i < HASH_TABLE_SIZE; i++) for (int i = 0; i < HASH_TABLE_SIZE; ++i)
m_hashTable[i] = NULL; m_hashTable[i] = NULL;
m_areaCount = 0; m_areaCount = 0;
@ -4817,6 +4815,8 @@ void CNavAreaGrid::Reset(void)
EditNavAreasReset(); EditNavAreasReset();
} }
// Allocate the grid and define its extents
/* <4cf984> ../game_shared/bot/nav_area.cpp:4983 */ /* <4cf984> ../game_shared/bot/nav_area.cpp:4983 */
void CNavAreaGrid::Initialize(float minX, float maxX, float minY, float maxY) void CNavAreaGrid::Initialize(float minX, float maxX, float minY, float maxY)
{ {
@ -4826,8 +4826,8 @@ void CNavAreaGrid::Initialize(float minX, float maxX, float minY, float maxY)
m_minX = minX; m_minX = minX;
m_minY = minY; m_minY = minY;
m_gridSizeX = ((maxX - minX) / m_cellSize) + 1; m_gridSizeX = (int)((maxX - minX) / m_cellSize + 1);
m_gridSizeY = ((maxY - minY) / m_cellSize) + 1; m_gridSizeY = (int)((maxY - minY) / m_cellSize + 1);
m_grid = new NavAreaList[ m_gridSizeX * m_gridSizeY ]; m_grid = new NavAreaList[ m_gridSizeX * m_gridSizeY ];
} }
@ -4846,8 +4846,10 @@ void CNavAreaGrid::AddNavArea(CNavArea *area)
int hiY = WorldToGridY(extent->hi.y); int hiY = WorldToGridY(extent->hi.y);
for (int y = loY; y <= hiY; ++y) for (int y = loY; y <= hiY; ++y)
{
for (int x = loX; x <= hiX; ++x) for (int x = loX; x <= hiX; ++x)
m_grid[ x + y*m_gridSizeX ].push_back(const_cast<CNavArea *>(area)); m_grid[ x + y*m_gridSizeX ].push_back(const_cast<CNavArea *>(area));
}
// add to hash table // add to hash table
int key = ComputeHashKey(area->GetID()); int key = ComputeHashKey(area->GetID());

View File

@ -129,7 +129,7 @@ void PlaceDirectory::Load(SteamFile *file)
// read each entry // read each entry
char placeName[256]; char placeName[256];
unsigned short len; unsigned short len;
for (int i = 0; i < count; i++) for (int i = 0; i < count; ++i)
{ {
file->Read(&len, sizeof(unsigned short)); file->Read(&len, sizeof(unsigned short));
file->Read(placeName, len); file->Read(placeName, len);
@ -190,7 +190,7 @@ void CNavArea::Save(int fd, unsigned int version)
// save connections to adjacent areas // save connections to adjacent areas
// in the enum order NORTH, EAST, SOUTH, WEST // in the enum order NORTH, EAST, SOUTH, WEST
for (int d = 0; d < NUM_DIRECTIONS; d++) for (int d = 0; d < NUM_DIRECTIONS; ++d)
{ {
// save number of connections for this direction // save number of connections for this direction
unsigned int count = m_connect[d].size(); unsigned int count = m_connect[d].size();
@ -360,13 +360,13 @@ void CNavArea::Load(SteamFile *file, unsigned int version)
// load connections (IDs) to adjacent areas // load connections (IDs) to adjacent areas
// in the enum order NORTH, EAST, SOUTH, WEST // in the enum order NORTH, EAST, SOUTH, WEST
for (int d = 0; d < NUM_DIRECTIONS; d++) for (int d = 0; d < NUM_DIRECTIONS; ++d)
{ {
// load number of connections for this direction // load number of connections for this direction
unsigned int count; unsigned int count;
file->Read(&count, sizeof(unsigned int)); file->Read(&count, sizeof(unsigned int));
for (unsigned int i = 0; i<count; ++i) for (unsigned int i = 0; i < count; ++i)
{ {
NavConnect connect; NavConnect connect;
file->Read(&connect.id, sizeof(unsigned int)); file->Read(&connect.id, sizeof(unsigned int));
@ -509,7 +509,7 @@ NavErrorType CNavArea::PostLoad(void)
NavErrorType error = NAV_OK; NavErrorType error = NAV_OK;
// connect areas together // connect areas together
for (int d = 0; d < NUM_DIRECTIONS; d++) for (int d = 0; d < NUM_DIRECTIONS; ++d)
{ {
NavConnectList::iterator iter; NavConnectList::iterator iter;
for (iter = m_connect[d].begin(); iter != m_connect[d].end(); ++iter) for (iter = m_connect[d].begin(); iter != m_connect[d].end(); ++iter)
@ -946,7 +946,7 @@ NavErrorType LoadNavigationMap(void)
extent.hi.y = -9999999999.9f; extent.hi.y = -9999999999.9f;
// load the areas and compute total extent // load the areas and compute total extent
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; ++i)
{ {
CNavArea *area = new CNavArea; CNavArea *area = new CNavArea;
area->Load(&navFile, version); area->Load(&navFile, version);

View File

@ -2514,7 +2514,7 @@ FunctionHook g_FunctionHooks[] =
#ifndef GameRules_Region #ifndef GameRules_Region
//{ 0x01D80C90, "_Z16InstallGameRulesv", (size_t)&InstallGameRules }, { 0x01D80C90, "_Z16InstallGameRulesv", (size_t)&InstallGameRules }, // HOOK: FIX ME
{ 0x01D80C00, "_ZN10CGameRules16RefreshSkillDataEv", mfunc_ptr_cast(&CGameRules::RefreshSkillData_) }, { 0x01D80C00, "_ZN10CGameRules16RefreshSkillDataEv", mfunc_ptr_cast(&CGameRules::RefreshSkillData_) },
//{ 0x01D8EBB0, "_ZN10CGameRules10IsTeamplayEv", mfunc_ptr_cast(&CGameRules::IsTeamplay_) }, // DEFAULT //{ 0x01D8EBB0, "_ZN10CGameRules10IsTeamplayEv", mfunc_ptr_cast(&CGameRules::IsTeamplay_) }, // DEFAULT
//{ 0x01D8EBC0, "_ZN10CGameRules18GetGameDescriptionEv", mfunc_ptr_cast(&CGameRules::GetGameDescription_) }, // DEFAULT //{ 0x01D8EBC0, "_ZN10CGameRules18GetGameDescriptionEv", mfunc_ptr_cast(&CGameRules::GetGameDescription_) }, // DEFAULT
@ -3746,7 +3746,7 @@ FunctionHook g_FunctionHooks[] =
//{ 0x01D24D10, "_ZN13CCSBotManager15MonitorBotCVarsEv", mfunc_ptr_cast(&CCSBotManager::MonitorBotCVars) }, //{ 0x01D24D10, "_ZN13CCSBotManager15MonitorBotCVarsEv", mfunc_ptr_cast(&CCSBotManager::MonitorBotCVars) },
{ 0x01D24AE0, "_ZN13CCSBotManager16MaintainBotQuotaEv", mfunc_ptr_cast(&CCSBotManager::MaintainBotQuota) }, { 0x01D24AE0, "_ZN13CCSBotManager16MaintainBotQuotaEv", mfunc_ptr_cast(&CCSBotManager::MaintainBotQuota) },
//{ 0x0, "_ZN13CCSBotManager16GetRandomBotNameENS_9SkillTypeE", mfunc_ptr_cast(&CCSBotManager::GetRandomBotName) }, //{ 0x0, "_ZN13CCSBotManager16GetRandomBotNameENS_9SkillTypeE", mfunc_ptr_cast(&CCSBotManager::GetRandomBotName) },
//{ 0x01D25270, "_ZN13CCSBotManager6AddBotEPK10BotProfile18BotProfileTeamType", mfunc_ptr_cast(&CCSBotManager::AddBot) }, //{ 0x01D25270, "_ZN13CCSBotManager6AddBotEPK10BotProfile18BotProfileTeamType", mfunc_ptr_cast(&CCSBotManager::AddBot) }, // HOOK: FIX ME
{ 0x01D248B0, "_ZN13CCSBotManager13BotAddCommandE18BotProfileTeamTypeb", mfunc_ptr_cast(&CCSBotManager::BotAddCommand) }, { 0x01D248B0, "_ZN13CCSBotManager13BotAddCommandE18BotProfileTeamTypeb", mfunc_ptr_cast(&CCSBotManager::BotAddCommand) },
//{ 0x01D238A0, "_Z16PrintAllEntitiesv", (size_t)&PrintAllEntities }, // NOXREF //{ 0x01D238A0, "_Z16PrintAllEntitiesv", (size_t)&PrintAllEntities }, // NOXREF
//{ 0x01D23020, "_Z12UTIL_DrawBoxP6Extentiiii", (size_t)&UTIL_DrawBox }, //{ 0x01D23020, "_Z12UTIL_DrawBoxP6Extentiiii", (size_t)&UTIL_DrawBox },
@ -3761,7 +3761,7 @@ FunctionHook g_FunctionHooks[] =
{ 0x01D20A60, "_ZN6CCSBot10InitializeEPK10BotProfile", mfunc_ptr_cast(&CCSBot::Initialize_) }, { 0x01D20A60, "_ZN6CCSBot10InitializeEPK10BotProfile", mfunc_ptr_cast(&CCSBot::Initialize_) },
{ 0x01D20E40, "_ZN6CCSBot8SpawnBotEv", mfunc_ptr_cast(&CCSBot::SpawnBot_) }, { 0x01D20E40, "_ZN6CCSBot8SpawnBotEv", mfunc_ptr_cast(&CCSBot::SpawnBot_) },
{ 0x01D2D370, "_ZN6CCSBot6UpkeepEv", mfunc_ptr_cast(&CCSBot::Upkeep_) }, { 0x01D2D370, "_ZN6CCSBot6UpkeepEv", mfunc_ptr_cast(&CCSBot::Upkeep_) },
//{ 0x01D2D9B0, "_ZN6CCSBot6UpdateEv", mfunc_ptr_cast(&CCSBot::Update_) }, // using refs //{ 0x01D2D9B0, "_ZN6CCSBot6UpdateEv", mfunc_ptr_cast(&CCSBot::Update_) }, // using refs HOOK: FIX ME
{ 0x01D17370, "_ZN6CCSBot4WalkEv", mfunc_ptr_cast(&CCSBot::Walk_) }, { 0x01D17370, "_ZN6CCSBot4WalkEv", mfunc_ptr_cast(&CCSBot::Walk_) },
{ 0x01D173A0, "_ZN6CCSBot4JumpEb", mfunc_ptr_cast(&CCSBot::Jump_) }, { 0x01D173A0, "_ZN6CCSBot4JumpEb", mfunc_ptr_cast(&CCSBot::Jump_) },
//{ 0x01D1F990, "_ZN6CCSBot7OnEventE13GameEventTypeP11CBaseEntityS2_", mfunc_ptr_cast(&CCSBot::OnEvent_) }, //{ 0x01D1F990, "_ZN6CCSBot7OnEventE13GameEventTypeP11CBaseEntityS2_", mfunc_ptr_cast(&CCSBot::OnEvent_) },
@ -4046,6 +4046,9 @@ FunctionHook g_FunctionHooks[] =
//{ 0x0, "_ZNK11CSGameState17GetNearestHostageEv", mfunc_ptr_cast(&CSGameState::GetNearestHostage) }, // NOXREF //{ 0x0, "_ZNK11CSGameState17GetNearestHostageEv", mfunc_ptr_cast(&CSGameState::GetNearestHostage) }, // NOXREF
{ 0x01D32BE0, "_ZN11CSGameState21InitializeHostageInfoEv", mfunc_ptr_cast(&CSGameState::InitializeHostageInfo) }, { 0x01D32BE0, "_ZN11CSGameState21InitializeHostageInfoEv", mfunc_ptr_cast(&CSGameState::InitializeHostageInfo) },
//{ 0x01D15EA0, "_Z16NavAreaBuildPathI8PathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", (size_t)&NavAreaBuildPath__PathCost__wrapper }, //{ 0x01D15EA0, "_Z16NavAreaBuildPathI8PathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", (size_t)&NavAreaBuildPath__PathCost__wrapper },
#ifdef _WIN32
{ 0x01D15A30, "", (size_t)&NavAreaTravelDistance__PathCost__wrapper },
#endif // _WIN32
{ 0x01D2B2E0, "_ZN8PathCostclEP8CNavAreaS1_PK10CNavLadder", mfunc_ptr_cast(&PathCost::operator()) }, { 0x01D2B2E0, "_ZN8PathCostclEP8CNavAreaS1_PK10CNavLadder", mfunc_ptr_cast(&PathCost::operator()) },
{ 0x01D172A0, "_Z17GetBotFollowCountP11CBasePlayer", (size_t)&GetBotFollowCount }, { 0x01D172A0, "_Z17GetBotFollowCountP11CBasePlayer", (size_t)&GetBotFollowCount },
{ 0x01D187B0, "_Z21FindNearbyRetreatSpotP6CCSBotf", mfunc_ptr_cast<FIND_SPOT_CSSBOT>(&FindNearbyRetreatSpot) }, { 0x01D187B0, "_Z21FindNearbyRetreatSpotP6CCSBotf", mfunc_ptr_cast<FIND_SPOT_CSSBOT>(&FindNearbyRetreatSpot) },
@ -4065,53 +4068,53 @@ FunctionHook g_FunctionHooks[] =
//{ 0x0, "_ZNK8BotState7GetNameEv", mfunc_ptr_cast(&BotState::GetName) }, // NOXREF //{ 0x0, "_ZNK8BotState7GetNameEv", mfunc_ptr_cast(&BotState::GetName) }, // NOXREF
//IdleState //IdleState
//virtual func //virtual func
//{ 0x01D142A0, "_ZN9IdleState7OnEnterEP6CCSBot", mfunc_ptr_cast(&IdleState::OnEnter_) }, { 0x01D142A0, "_ZN9IdleState7OnEnterEP6CCSBot", mfunc_ptr_cast(&IdleState::OnEnter_) },
//{ 0x01D14320, "_ZN9IdleState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&IdleState::OnUpdate_) }, { 0x01D14320, "_ZN9IdleState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&IdleState::OnUpdate_) },
//{ 0x01D212C0, "_ZNK9IdleState7GetNameEv", mfunc_ptr_cast(&IdleState::GetName_) }, //{ 0x01D212C0, "_ZNK9IdleState7GetNameEv", mfunc_ptr_cast(&IdleState::GetName_) },
//HuntState //HuntState
//virtual func //virtual func
//{ 0x01D13E20, "_ZN9HuntState7OnEnterEP6CCSBot", mfunc_ptr_cast(&HuntState::OnEnter_) }, { 0x01D13E20, "_ZN9HuntState7OnEnterEP6CCSBot", mfunc_ptr_cast(&HuntState::OnEnter_) },
//{ 0x01D13EA0, "_ZN9HuntState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&HuntState::OnUpdate_) }, { 0x01D13EA0, "_ZN9HuntState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&HuntState::OnUpdate_) },
//{ 0x01D14290, "_ZN9HuntState6OnExitEP6CCSBot", mfunc_ptr_cast(&HuntState::OnExit_) }, //{ 0x01D14290, "_ZN9HuntState6OnExitEP6CCSBot", mfunc_ptr_cast(&HuntState::OnExit_) }, // PURE
//{ 0x01D212D0, "_ZNK9HuntState7GetNameEv", mfunc_ptr_cast(&HuntState::GetName_) }, //{ 0x01D212D0, "_ZNK9HuntState7GetNameEv", mfunc_ptr_cast(&HuntState::GetName_) },
//non-virtual func //non-virtual func
//{ 0x0, "_ZN9HuntState13ClearHuntAreaEv", mfunc_ptr_cast(&HuntState::ClearHuntArea) }, // NOXREF //{ 0x0, "_ZN9HuntState13ClearHuntAreaEv", mfunc_ptr_cast(&HuntState::ClearHuntArea) }, // NOXREF
//AttackState //AttackState
//virtual func //virtual func
//{ 0x01D10960, "_ZN11AttackState7OnEnterEP6CCSBot", mfunc_ptr_cast(&AttackState::OnEnter_) }, { 0x01D10960, "_ZN11AttackState7OnEnterEP6CCSBot", mfunc_ptr_cast(&AttackState::OnEnter_) },
//{ 0x01D10CF0, "_ZN11AttackState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&AttackState::OnUpdate_) }, { 0x01D10CF0, "_ZN11AttackState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&AttackState::OnUpdate_) },
//{ 0x01D11860, "_ZN11AttackState6OnExitEP6CCSBot", mfunc_ptr_cast(&AttackState::OnExit_) }, { 0x01D11860, "_ZN11AttackState6OnExitEP6CCSBot", mfunc_ptr_cast(&AttackState::OnExit_) },
//{ 0x01D212E0, "_ZNK11AttackState7GetNameEv", mfunc_ptr_cast(&AttackState::GetName_) }, //{ 0x01D212E0, "_ZNK11AttackState7GetNameEv", mfunc_ptr_cast(&AttackState::GetName_) },
//non-virtual func //non-virtual func
//{ 0x0, "_ZN11AttackState16SetCrouchAndHoldEb", mfunc_ptr_cast(&AttackState::SetCrouchAndHold) }, // NOXREF //{ 0x0, "_ZN11AttackState16SetCrouchAndHoldEb", mfunc_ptr_cast(&AttackState::SetCrouchAndHold) }, // NOXREF
//{ 0x01D10CC0, "_ZN11AttackState13StopAttackingEP6CCSBot", mfunc_ptr_cast(&AttackState::StopAttacking) }, // NOXREF //{ 0x01D10CC0, "_ZN11AttackState13StopAttackingEP6CCSBot", mfunc_ptr_cast(&AttackState::StopAttacking) }, // NOXREF
//InvestigateNoiseState //InvestigateNoiseState
//virtual func //virtual func
//{ 0x01D165C0, "_ZN21InvestigateNoiseState7OnEnterEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::OnEnter_) }, { 0x01D165C0, "_ZN21InvestigateNoiseState7OnEnterEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::OnEnter_) },
//{ 0x01D166B0, "_ZN21InvestigateNoiseState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::OnUpdate_) }, { 0x01D166B0, "_ZN21InvestigateNoiseState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::OnUpdate_) },
//{ 0x01D16920, "_ZN21InvestigateNoiseState6OnExitEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::OnExit_) }, { 0x01D16920, "_ZN21InvestigateNoiseState6OnExitEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::OnExit_) },
//{ 0x01D212F0, "_ZNK21InvestigateNoiseState7GetNameEv", mfunc_ptr_cast(&InvestigateNoiseState::GetName_) }, //{ 0x01D212F0, "_ZNK21InvestigateNoiseState7GetNameEv", mfunc_ptr_cast(&InvestigateNoiseState::GetName_) },
//non-virtual func //non-virtual func
//{ 0x0, "_ZN21InvestigateNoiseState18AttendCurrentNoiseEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::AttendCurrentNoise) }, // NOXREF //{ 0x01D164D0, "_ZN21InvestigateNoiseState18AttendCurrentNoiseEP6CCSBot", mfunc_ptr_cast(&InvestigateNoiseState::AttendCurrentNoise) }, // NOXREF
//BuyState //BuyState
//virtual func //virtual func
//{ 0x01D11910, "_ZN8BuyState7OnEnterEP6CCSBot", mfunc_ptr_cast(&BuyState::OnEnter_) }, { 0x01D11910, "_ZN8BuyState7OnEnterEP6CCSBot", mfunc_ptr_cast(&BuyState::OnEnter_) },
//{ 0x01D11B60, "_ZN8BuyState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&BuyState::OnUpdate_) }, { 0x01D11B60, "_ZN8BuyState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&BuyState::OnUpdate_) },
//{ 0x01D121E0, "_ZN8BuyState6OnExitEP6CCSBot", mfunc_ptr_cast(&BuyState::OnExit_) }, { 0x01D121E0, "_ZN8BuyState6OnExitEP6CCSBot", mfunc_ptr_cast(&BuyState::OnExit_) },
//{ 0x01D21300, "_ZNK8BuyState7GetNameEv", mfunc_ptr_cast(&BuyState::GetName_) }, // DEFAULT //{ 0x01D21300, "_ZNK8BuyState7GetNameEv", mfunc_ptr_cast(&BuyState::GetName_) }, // DEFAULT
//MoveToState //MoveToState
//virtual func //virtual func
//{ 0x01D16930, "_ZN11MoveToState7OnEnterEP6CCSBot", mfunc_ptr_cast(&MoveToState::OnEnter_) }, { 0x01D16930, "_ZN11MoveToState7OnEnterEP6CCSBot", mfunc_ptr_cast(&MoveToState::OnEnter_) },
//{ 0x01D169C0, "_ZN11MoveToState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&MoveToState::OnUpdate_) }, //{ 0x01D169C0, "_ZN11MoveToState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&MoveToState::OnUpdate_) }, // HOOK: FIX ME
//{ 0x01D16FE0, "_ZN11MoveToState6OnExitEP6CCSBot", mfunc_ptr_cast(&MoveToState::OnExit_) }, { 0x01D16FE0, "_ZN11MoveToState6OnExitEP6CCSBot", mfunc_ptr_cast(&MoveToState::OnExit_) },
//{ 0x01D21310, "_ZNK11MoveToState7GetNameEv", mfunc_ptr_cast(&MoveToState::GetName_) }, // DEFAULT //{ 0x01D21310, "_ZNK11MoveToState7GetNameEv", mfunc_ptr_cast(&MoveToState::GetName_) }, // DEFAULT
//non-virtual func //non-virtual func
//{ 0x0, "_ZN11MoveToState15SetGoalPositionEPK6Vector", mfunc_ptr_cast(&MoveToState::SetGoalPosition) }, // NOXREF //{ 0x0, "_ZN11MoveToState15SetGoalPositionEPK6Vector", mfunc_ptr_cast(&MoveToState::SetGoalPosition) }, // NOXREF
//{ 0x0, "_ZN11MoveToState12SetRouteTypeE9RouteType", mfunc_ptr_cast(&MoveToState::SetRouteType) }, // NOXREF //{ 0x0, "_ZN11MoveToState12SetRouteTypeE9RouteType", mfunc_ptr_cast(&MoveToState::SetRouteType) }, // NOXREF
//FetchBombState //FetchBombState
//virtual func //virtual func
//{ 0x01D125A0, "_ZN14FetchBombState7OnEnterEP6CCSBot", mfunc_ptr_cast(&FetchBombState::OnEnter_) }, { 0x01D125A0, "_ZN14FetchBombState7OnEnterEP6CCSBot", mfunc_ptr_cast(&FetchBombState::OnEnter_) },
//{ 0x01D125C0, "_ZN14FetchBombState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&FetchBombState::OnUpdate_) }, { 0x01D125C0, "_ZN14FetchBombState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&FetchBombState::OnUpdate_) },
//{ 0x01D21320, "_ZNK14FetchBombState7GetNameEv", mfunc_ptr_cast(&FetchBombState::GetName_) }, // DEFAULT //{ 0x01D21320, "_ZNK14FetchBombState7GetNameEv", mfunc_ptr_cast(&FetchBombState::GetName_) }, // DEFAULT
//PlantBombState //PlantBombState
//virtual func //virtual func
@ -4121,15 +4124,15 @@ FunctionHook g_FunctionHooks[] =
//{ 0x01D21330, "_ZNK14PlantBombState7GetNameEv", mfunc_ptr_cast(&PlantBombState::GetName_) }, // DEFAULT //{ 0x01D21330, "_ZNK14PlantBombState7GetNameEv", mfunc_ptr_cast(&PlantBombState::GetName_) }, // DEFAULT
//DefuseBombState //DefuseBombState
//virtual func //virtual func
//{ 0x01D12200, "_ZN15DefuseBombState7OnEnterEP6CCSBot", mfunc_ptr_cast(&DefuseBombState::OnEnter_) }, { 0x01D12200, "_ZN15DefuseBombState7OnEnterEP6CCSBot", mfunc_ptr_cast(&DefuseBombState::OnEnter_) },
//{ 0x01D12270, "_ZN15DefuseBombState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&DefuseBombState::OnUpdate_) }, { 0x01D12270, "_ZN15DefuseBombState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&DefuseBombState::OnUpdate_) },
//{ 0x01D12340, "_ZN15DefuseBombState6OnExitEP6CCSBot", mfunc_ptr_cast(&DefuseBombState::OnExit_) }, { 0x01D12340, "_ZN15DefuseBombState6OnExitEP6CCSBot", mfunc_ptr_cast(&DefuseBombState::OnExit_) },
//{ 0x01D21340, "_ZNK15DefuseBombState7GetNameEv", mfunc_ptr_cast(&DefuseBombState::GetName_) }, // DEFAULT //{ 0x01D21340, "_ZNK15DefuseBombState7GetNameEv", mfunc_ptr_cast(&DefuseBombState::GetName_) }, // DEFAULT
//HideState //HideState
//virtual func //virtual func
//{ 0x01D13250, "_ZN9HideState7OnEnterEP6CCSBot", mfunc_ptr_cast(&HideState::OnEnter_) }, { 0x01D13250, "_ZN9HideState7OnEnterEP6CCSBot", mfunc_ptr_cast(&HideState::OnEnter_) },
//{ 0x01D13300, "_ZN9HideState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&HideState::OnUpdate_) }, { 0x01D13300, "_ZN9HideState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&HideState::OnUpdate_) },
//{ 0x01D13D90, "_ZN9HideState6OnExitEP6CCSBot", mfunc_ptr_cast(&HideState::OnExit_) }, { 0x01D13D90, "_ZN9HideState6OnExitEP6CCSBot", mfunc_ptr_cast(&HideState::OnExit_) },
//{ 0x01D21350, "_ZNK9HideState7GetNameEv", mfunc_ptr_cast(&HideState::GetName_) }, // DEFAULT //{ 0x01D21350, "_ZNK9HideState7GetNameEv", mfunc_ptr_cast(&HideState::GetName_) }, // DEFAULT
//non-virtual func //non-virtual func
//{ 0x0, "_ZN9HideState13SetHidingSpotEPK6Vector", mfunc_ptr_cast(&HideState::SetHidingSpot) }, // NOXREF //{ 0x0, "_ZN9HideState13SetHidingSpotEPK6Vector", mfunc_ptr_cast(&HideState::SetHidingSpot) }, // NOXREF
@ -4141,19 +4144,19 @@ FunctionHook g_FunctionHooks[] =
//{ 0x0, "_ZNK9HideState8IsAtSpotEv", mfunc_ptr_cast(&HideState::IsAtSpot) }, // NOXREF //{ 0x0, "_ZNK9HideState8IsAtSpotEv", mfunc_ptr_cast(&HideState::IsAtSpot) }, // NOXREF
//EscapeFromBombState //EscapeFromBombState
//virtual func //virtual func
//{ 0x01D12390, "_ZN19EscapeFromBombState7OnEnterEP6CCSBot", mfunc_ptr_cast(&EscapeFromBombState::OnEnter_) }, { 0x01D12390, "_ZN19EscapeFromBombState7OnEnterEP6CCSBot", mfunc_ptr_cast(&EscapeFromBombState::OnEnter_) },
//{ 0x01D123D0, "_ZN19EscapeFromBombState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&EscapeFromBombState::OnUpdate_) }, { 0x01D123D0, "_ZN19EscapeFromBombState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&EscapeFromBombState::OnUpdate_) },
//{ 0x01D12560, "_ZN19EscapeFromBombState6OnExitEP6CCSBot", mfunc_ptr_cast(&EscapeFromBombState::OnExit_) }, { 0x01D12560, "_ZN19EscapeFromBombState6OnExitEP6CCSBot", mfunc_ptr_cast(&EscapeFromBombState::OnExit_) },
//{ 0x01D21360, "_ZNK19EscapeFromBombState7GetNameEv", mfunc_ptr_cast(&EscapeFromBombState::GetName_) }, // DEFAULT //{ 0x01D21360, "_ZNK19EscapeFromBombState7GetNameEv", mfunc_ptr_cast(&EscapeFromBombState::GetName_) }, // DEFAULT
//FollowState //FollowState
//virtual func //virtual func
//{ 0x01D12660, "_ZN11FollowState7OnEnterEP6CCSBot", mfunc_ptr_cast(&FollowState::OnEnter_) }, { 0x01D12660, "_ZN11FollowState7OnEnterEP6CCSBot", mfunc_ptr_cast(&FollowState::OnEnter_) },
//{ 0x01D127A0, "_ZN11FollowState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&FollowState::OnUpdate_) }, { 0x01D127A0, "_ZN11FollowState8OnUpdateEP6CCSBot", mfunc_ptr_cast(&FollowState::OnUpdate_) },
//{ 0x01D130C0, "_ZN11FollowState6OnExitEP6CCSBot", mfunc_ptr_cast(&FollowState::OnExit_) }, // PURE //{ 0x01D130C0, "_ZN11FollowState6OnExitEP6CCSBot", mfunc_ptr_cast(&FollowState::OnExit_) }, // PURE
//{ 0x01D21370, "_ZNK11FollowState7GetNameEv", mfunc_ptr_cast(&FollowState::GetName_) }, // DEFAULT //{ 0x01D21370, "_ZNK11FollowState7GetNameEv", mfunc_ptr_cast(&FollowState::GetName_) }, // DEFAULT
//non-virtual func //non-virtual func
//{ 0x0, "_ZN11FollowState9SetLeaderEP11CBasePlayer", mfunc_ptr_cast(&FollowState::SetLeader) }, // NOXREF //{ 0x0, "_ZN11FollowState9SetLeaderEP11CBasePlayer", mfunc_ptr_cast(&FollowState::SetLeader) }, // NOXREF
//{ 0x0, "_ZN11FollowState24ComputeLeaderMotionStateEf", mfunc_ptr_cast(&FollowState::ComputeLeaderMotionState) }, //{ 0x01D126E0, "_ZN11FollowState24ComputeLeaderMotionStateEf", mfunc_ptr_cast(&FollowState::ComputeLeaderMotionState) },
//UseEntityState //UseEntityState
//virtual func //virtual func
{ 0x01D171A0, "_ZN14UseEntityState7OnEnterEP6CCSBot", mfunc_ptr_cast(&UseEntityState::OnEnter_) }, { 0x01D171A0, "_ZN14UseEntityState7OnEnterEP6CCSBot", mfunc_ptr_cast(&UseEntityState::OnEnter_) },
@ -4164,7 +4167,7 @@ FunctionHook g_FunctionHooks[] =
//{ 0x0, "_ZN14UseEntityState9SetEntityEP11CBaseEntity", mfunc_ptr_cast(&UseEntityState::SetEntity) }, // NOXREF //{ 0x0, "_ZN14UseEntityState9SetEntityEP11CBaseEntity", mfunc_ptr_cast(&UseEntityState::SetEntity) }, // NOXREF
#ifdef _WIN32 #ifdef _WIN32
//{ 0x01D12F90, "_ZN21FollowTargetCollectorclEP8CNavArea", mfunc_ptr_cast(&FollowTargetCollector::operator()) }, { 0x01D12F90, "_ZN21FollowTargetCollectorclEP8CNavArea", mfunc_ptr_cast(&FollowTargetCollector::operator()) },
#endif // _WIN32 #endif // _WIN32
#endif // CS_BotState_Region #endif // CS_BotState_Region
@ -5000,7 +5003,7 @@ FunctionHook g_FunctionHooks[] =
//{ 0x01D43000, "", mfunc_ptr_cast(&CNavAreaGrid::CNavAreaGrid) }, // NOXREF //{ 0x01D43000, "", mfunc_ptr_cast(&CNavAreaGrid::CNavAreaGrid) }, // NOXREF
//{ 0x01D43090, "", mfunc_ptr_cast(&CNavAreaGrid::~CNavAreaGrid) }, // NOXREF //{ 0x01D43090, "", mfunc_ptr_cast(&CNavAreaGrid::~CNavAreaGrid) }, // NOXREF
//{ 0x01D43180, "_ZN12CNavAreaGrid5ResetEv", mfunc_ptr_cast(&CNavAreaGrid::Reset) }, // NOXREF //{ 0x01D43180, "_ZN12CNavAreaGrid5ResetEv", mfunc_ptr_cast(&CNavAreaGrid::Reset) }, // NOXREF
{ 0x01D43360, "_ZN12CNavAreaGrid10InitializeEffff", mfunc_ptr_cast(&CNavAreaGrid::Initialize) }, { 0x01D43230, "_ZN12CNavAreaGrid10InitializeEffff", mfunc_ptr_cast(&CNavAreaGrid::Initialize) },
{ 0x01D43390, "_ZN12CNavAreaGrid10AddNavAreaEP8CNavArea", mfunc_ptr_cast(&CNavAreaGrid::AddNavArea) }, { 0x01D43390, "_ZN12CNavAreaGrid10AddNavAreaEP8CNavArea", mfunc_ptr_cast(&CNavAreaGrid::AddNavArea) },
{ 0x01D43560, "_ZN12CNavAreaGrid13RemoveNavAreaEP8CNavArea", mfunc_ptr_cast(&CNavAreaGrid::RemoveNavArea) }, { 0x01D43560, "_ZN12CNavAreaGrid13RemoveNavAreaEP8CNavArea", mfunc_ptr_cast(&CNavAreaGrid::RemoveNavArea) },
{ 0x01D43710, "_ZNK12CNavAreaGrid10GetNavAreaEPK6Vectorf", mfunc_ptr_cast(&CNavAreaGrid::GetNavArea) }, { 0x01D43710, "_ZNK12CNavAreaGrid10GetNavAreaEPK6Vectorf", mfunc_ptr_cast(&CNavAreaGrid::GetNavArea) },
@ -5639,10 +5642,8 @@ AddressRef g_FunctionRefs[] =
#ifndef Function_References_Region #ifndef Function_References_Region
{ 0x01D2EDD0, "_ZN6CCSBot16UpdateLookAnglesEv", (size_t)&pCCSBot__UpdateLookAngles }, { 0x01D2EDD0, "_ZN6CCSBot16UpdateLookAnglesEv", (size_t)&pCCSBot__UpdateLookAngles },
{ 0x01D2D9B0, "_ZN6CCSBot6UpdateEv", (size_t)&pCCSBot__Update },
{ 0x01D19C70, "_ZN9BotPhrase9RandomizeEv", (size_t)&pBotPhrase__Randomize }, { 0x01D19C70, "_ZN9BotPhrase9RandomizeEv", (size_t)&pBotPhrase__Randomize },
{ 0x01D25270, "_ZN13CCSBotManager6AddBotEPK10BotProfile18BotProfileTeamType", (size_t)&pCCSBotManager__AddBot }, { 0x01D25270, "_ZN13CCSBotManager6AddBotEPK10BotProfile18BotProfileTeamType", (size_t)&pCCSBotManager__AddBot },
{ 0x01D80C90, "_Z16InstallGameRulesv", (size_t)&pInstallGameRules },
{ 0x01D4C450, "_ZN8CHostage9IdleThinkEv", (size_t)&pCHostage__IdleThink }, { 0x01D4C450, "_ZN8CHostage9IdleThinkEv", (size_t)&pCHostage__IdleThink },
#endif // Function_References_Region #endif // Function_References_Region
@ -6165,6 +6166,12 @@ AddressRef g_DataRefs[] =
{ 0x01E2F8B4, "sclp", (size_t)&psclp }, { 0x01E2F8B4, "sclp", (size_t)&psclp },
{ 0x01E2F8B8, "sclq", (size_t)&psclq }, { 0x01E2F8B8, "sclq", (size_t)&psclq },
{ 0x01E0DF70, "primaryWeaponBuyInfoCT", (size_t)&pprimaryWeaponBuyInfoCT },
{ 0x01E0E00C, "secondaryWeaponBuyInfoCT", (size_t)&psecondaryWeaponBuyInfoCT },
{ 0x01E0E030, "primaryWeaponBuyInfoT", (size_t)&pprimaryWeaponBuyInfoT },
{ 0x01E0E0CC, "secondaryWeaponBuyInfoT", (size_t)&psecondaryWeaponBuyInfoT },
{ 0x01E287E8, "_ZN19BotChatterInterface16m_encourageTimerE", mfunc_ptr_cast(&BotChatterInterface::pm_encourageTimer) }, { 0x01E287E8, "_ZN19BotChatterInterface16m_encourageTimerE", mfunc_ptr_cast(&BotChatterInterface::pm_encourageTimer) },
{ 0x01E287E0, "_ZN19BotChatterInterface22m_radioSilenceIntervalE", mfunc_ptr_cast(&BotChatterInterface::pm_radioSilenceInterval) }, { 0x01E287E0, "_ZN19BotChatterInterface22m_radioSilenceIntervalE", mfunc_ptr_cast(&BotChatterInterface::pm_radioSilenceInterval) },

View File

@ -17,6 +17,10 @@
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release MP|Win32">
<Configuration>Release MP</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Play|Win32"> <ProjectConfiguration Include="Release Play|Win32">
<Configuration>Release Play</Configuration> <Configuration>Release Play</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -40,6 +44,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -49,6 +54,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
@ -56,6 +63,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -65,6 +73,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
@ -74,6 +84,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
@ -83,6 +95,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -92,6 +105,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
@ -99,6 +114,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -107,6 +123,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -117,6 +134,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
@ -128,6 +147,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
@ -138,18 +159,22 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\bot\cs_bot_vision.cpp"> <ClCompile Include="..\dlls\bot\cs_bot_vision.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\bot\cs_bot_weapon.cpp"> <ClCompile Include="..\dlls\bot\cs_bot_weapon.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -157,12 +182,14 @@
<ClCompile Include="..\dlls\bot\cs_gamestate.cpp"> <ClCompile Include="..\dlls\bot\cs_gamestate.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\bot\states\cs_bot_attack.cpp"> <ClCompile Include="..\dlls\bot\states\cs_bot_attack.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -171,6 +198,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -179,6 +207,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -187,6 +216,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -195,6 +225,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -203,6 +234,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -211,6 +243,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -219,6 +252,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -227,6 +261,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -235,6 +270,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -243,6 +279,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -251,6 +288,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -259,6 +297,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -284,48 +323,56 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\hostage_improv.cpp"> <ClCompile Include="..\dlls\hostage\hostage_improv.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\hostage_localnav.cpp"> <ClCompile Include="..\dlls\hostage\hostage_localnav.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\states\hostage_animate.cpp"> <ClCompile Include="..\dlls\hostage\states\hostage_animate.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\states\hostage_escape.cpp"> <ClCompile Include="..\dlls\hostage\states\hostage_escape.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\states\hostage_follow.cpp"> <ClCompile Include="..\dlls\hostage\states\hostage_follow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\states\hostage_idle.cpp"> <ClCompile Include="..\dlls\hostage\states\hostage_idle.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\hostage\states\hostage_retreat.cpp"> <ClCompile Include="..\dlls\hostage\states\hostage_retreat.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\dlls\h_ai.cpp" /> <ClCompile Include="..\dlls\h_ai.cpp" />
@ -369,6 +416,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -377,6 +425,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -385,6 +434,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -393,6 +443,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -401,6 +452,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -409,6 +461,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -417,6 +470,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -425,6 +479,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -433,6 +488,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -441,6 +497,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -449,6 +506,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -457,6 +515,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -465,6 +524,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -473,6 +533,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -481,6 +542,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -489,6 +551,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -497,6 +560,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -505,6 +569,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -513,6 +578,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -521,6 +587,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -529,6 +596,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -537,6 +605,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -545,6 +614,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -553,6 +623,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -561,6 +632,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -569,6 +641,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -577,6 +650,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -584,6 +658,7 @@
<ClCompile Include="..\dlls\wpn_shared\wpn_usp.cpp"> <ClCompile Include="..\dlls\wpn_shared\wpn_usp.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
@ -593,6 +668,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">false</ExcludedFromBuild>
@ -610,15 +686,18 @@
<ClCompile Include="..\game_shared\voice_gamemgr.cpp" /> <ClCompile Include="..\game_shared\voice_gamemgr.cpp" />
<ClCompile Include="..\hookers\6153_hooker.cpp"> <ClCompile Include="..\hookers\6153_hooker.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\hookers\hooker.cpp"> <ClCompile Include="..\hookers\hooker.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\hookers\main.cpp"> <ClCompile Include="..\hookers\main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\hookers\main_mp.cpp"> <ClCompile Include="..\hookers\main_mp.cpp">
@ -626,6 +705,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -633,6 +713,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\hookers\memory.cpp"> <ClCompile Include="..\hookers\memory.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
@ -656,9 +737,11 @@
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">precompiled.h</PrecompiledHeaderFile> <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">precompiled.h</PrecompiledHeaderFile> <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">precompiled.h</PrecompiledHeaderFile> <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">precompiled.h</PrecompiledHeaderFile> <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">precompiled.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">precompiled.h</PrecompiledHeaderFile> <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">precompiled.h</PrecompiledHeaderFile>
@ -669,38 +752,46 @@
<ClCompile Include="..\regamedll\sse_mathfun.cpp" /> <ClCompile Include="..\regamedll\sse_mathfun.cpp" />
<ClCompile Include="..\testsuite\demoplayer.cpp"> <ClCompile Include="..\testsuite\demoplayer.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\testsuite\funccalls.cpp"> <ClCompile Include="..\testsuite\funccalls.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\testsuite\recorder.cpp"> <ClCompile Include="..\testsuite\recorder.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\testsuite\testsuite.cpp"> <ClCompile Include="..\testsuite\testsuite.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\unittests\animation_tests.cpp"> <ClCompile Include="..\unittests\animation_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\unittests\mathfun_tests.cpp"> <ClCompile Include="..\unittests\mathfun_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\unittests\struct_offsets_tests.cpp"> <ClCompile Include="..\unittests\struct_offsets_tests.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\unittests\TestRunner.cpp"> <ClCompile Include="..\unittests\TestRunner.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\version\version.cpp" /> <ClCompile Include="..\version\version.cpp" />
@ -736,6 +827,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClInclude> </ClInclude>
@ -744,6 +837,8 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClInclude> </ClInclude>
@ -752,12 +847,15 @@
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
</ExcludedFromBuild> </ExcludedFromBuild>
</ClInclude> </ClInclude>
<ClInclude Include="..\dlls\bot\cs_gamestate.h"> <ClInclude Include="..\dlls\bot\cs_gamestate.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">false</ExcludedFromBuild>
</ClInclude> </ClInclude>
<ClInclude Include="..\dlls\buttons.h" /> <ClInclude Include="..\dlls\buttons.h" />
@ -935,6 +1033,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
</None> </None>
@ -942,6 +1041,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
</None> </None>
@ -982,6 +1082,13 @@
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
@ -1020,6 +1127,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|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 MP Play|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -1052,6 +1162,13 @@
<CodeAnalysisRules /> <CodeAnalysisRules />
<CodeAnalysisRuleAssemblies /> <CodeAnalysisRuleAssemblies />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|Win32'">
<TargetName>mp</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
<LinkIncremental />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
<TargetName>mp</TargetName> <TargetName>mp</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
@ -1169,7 +1286,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>CSTRIKE;REGAMEDLL_ADD;REGAMEDLL_FIXES;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>REGAMEDLL_ADD;REGAMEDLL_FIXES;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointModel>Precise</FloatingPointModel> <FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -1195,6 +1312,50 @@
<Inputs>subversion.always.run</Inputs> <Inputs>subversion.always.run</Inputs>
</CustomBuildStep> </CustomBuildStep>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release MP|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)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;NDEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<FunctionLevelLinking>true</FunctionLevelLinking>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion>
</MinimumRequiredVersion>
<ModuleDefinitionFile>mp.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PostBuildEvent>
<Command>IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.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>subversion.always.run</Outputs>
<Inputs>subversion.always.run</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">
<PreBuildEvent> <PreBuildEvent>
<Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command> <Command>IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\")</Command>
@ -1205,7 +1366,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>CSTRIKE;REGAMEDLL_SELF;PLAY_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>REGAMEDLL_SELF;PLAY_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointModel>Precise</FloatingPointModel> <FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

View File

@ -158,7 +158,7 @@ NOBODY void VectorTransform(const vec_t *in1, float *in2, vec_t *out)
int VectorCompare(const vec_t *v1, const vec_t *v2) int VectorCompare(const vec_t *v1, const vec_t *v2)
{ {
int i; int i;
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
if (v1[i] != v2[i]) if (v1[i] != v2[i])
return 0; return 0;
@ -218,7 +218,7 @@ float_precision Length(const vec_t *v)
int i; int i;
float_precision length = 0.0f; float_precision length = 0.0f;
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
length += v[i] * v[i]; length += v[i] * v[i];
return sqrt(length); return sqrt(length);

View File

@ -54,7 +54,7 @@ NOXREF int PM_IsThereGrassTexture(void)
{ {
int i; int i;
for (i = 0; i < pm_gcTextures; i++) for (i = 0; i < pm_gcTextures; ++i)
{ {
if (pm_grgchTextureType[i] == CHAR_TEX_GRASS) if (pm_grgchTextureType[i] == CHAR_TEX_GRASS)
return 1; return 1;
@ -69,7 +69,7 @@ void PM_SortTextures(void)
// Bubble sort, yuck, but this only occurs at startup and it's only 512 elements... // Bubble sort, yuck, but this only occurs at startup and it's only 512 elements...
int i, j; int i, j;
for (i = 0; i < pm_gcTextures; i++) for (i = 0; i < pm_gcTextures; ++i)
{ {
for (j = i + 1; j < pm_gcTextures; j++) for (j = i + 1; j < pm_gcTextures; j++)
{ {
@ -113,7 +113,7 @@ void PM_InitTextureTypes(void)
// skip whitespace // skip whitespace
i = 0; i = 0;
while (buffer[i] && isspace(buffer[i])) while (buffer[i] && isspace(buffer[i]))
i++; ++i;
if (!buffer[i]) if (!buffer[i])
continue; continue;
@ -127,7 +127,7 @@ void PM_InitTextureTypes(void)
// skip whitespace // skip whitespace
while (buffer[i] && isspace(buffer[i])) while (buffer[i] && isspace(buffer[i]))
i++; ++i;
if (!buffer[i]) if (!buffer[i])
continue; continue;
@ -528,7 +528,7 @@ void PM_UpdateStepSound(void)
qboolean PM_AddToTouched(pmtrace_t tr, vec_t *impactvelocity) qboolean PM_AddToTouched(pmtrace_t tr, vec_t *impactvelocity)
{ {
int i; int i;
for (i = 0; i < pmove->numtouch; i++) for (i = 0; i < pmove->numtouch; ++i)
{ {
if (pmove->touchindex[i].ent == tr.ent) if (pmove->touchindex[i].ent == tr.ent)
break; break;
@ -557,7 +557,7 @@ void PM_CheckVelocity(void)
int i; int i;
// bound velocity // bound velocity
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
// See if it's bogus. // See if it's bogus.
if (IS_NAN(pmove->velocity[i])) if (IS_NAN(pmove->velocity[i]))
@ -620,7 +620,7 @@ int PM_ClipVelocity(vec_t *in, vec_t *normal, vec_t *out, float overbounce)
// Scale by overbounce factor. // Scale by overbounce factor.
backoff = DotProduct(in, normal) * overbounce; backoff = DotProduct(in, normal) * overbounce;
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
change = in[i] - normal[i] * backoff; change = in[i] - normal[i] * backoff;
out[i] = change; out[i] = change;
@ -710,7 +710,7 @@ int PM_FlyMove(void)
// Assume we can move all the way from the current origin to the // Assume we can move all the way from the current origin to the
// end point. // end point.
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
float_precision flScale = time_left * pmove->velocity[i]; float_precision flScale = time_left * pmove->velocity[i];
@ -794,7 +794,7 @@ int PM_FlyMove(void)
// relfect player velocity // relfect player velocity
if (numplanes == 1 && pmove->movetype == MOVETYPE_WALK && (pmove->onground == -1 || pmove->friction != 1)) if (numplanes == 1 && pmove->movetype == MOVETYPE_WALK && (pmove->onground == -1 || pmove->friction != 1))
{ {
for (i = 0; i < numplanes; i++) for (i = 0; i < numplanes; ++i)
{ {
if (planes[i][2] > 0.7f) if (planes[i][2] > 0.7f)
{ {
@ -811,7 +811,7 @@ int PM_FlyMove(void)
} }
else else
{ {
for (i = 0; i < numplanes; i++) for (i = 0; i < numplanes; ++i)
{ {
PM_ClipVelocity(original_velocity, planes[i], pmove->velocity, 1); PM_ClipVelocity(original_velocity, planes[i], pmove->velocity, 1);
@ -891,7 +891,7 @@ void PM_Accelerate(vec_t *wishdir, float_precision wishspeed, float accel)
accelspeed = addspeed; accelspeed = addspeed;
// Adjust velocity. // Adjust velocity.
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
pmove->velocity[i] += accelspeed * wishdir[i]; pmove->velocity[i] += accelspeed * wishdir[i];
} }
@ -941,7 +941,7 @@ void PM_WalkMove(void)
VectorNormalize(pmove->right); VectorNormalize(pmove->right);
// Determine x and y parts of velocity // Determine x and y parts of velocity
for (i = 0; i < 2; i++) for (i = 0; i < 2; ++i)
{ {
wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove;
} }
@ -1208,7 +1208,7 @@ void PM_AirAccelerate(vec_t *wishdir, float wishspeed, float accel)
accelspeed = addspeed; accelspeed = addspeed;
// Adjust pmove vel. // Adjust pmove vel.
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
pmove->velocity[i] += accelspeed * wishdir[i]; pmove->velocity[i] += accelspeed * wishdir[i];
} }
@ -1228,7 +1228,7 @@ void PM_WaterMove(void)
float newspeed, addspeed; float newspeed, addspeed;
// user intentions // user intentions
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
wishvel[i] = (pmove->forward[i] * pmove->cmd.forwardmove) + (pmove->cmd.sidemove * pmove->right[i]); wishvel[i] = (pmove->forward[i] * pmove->cmd.forwardmove) + (pmove->cmd.sidemove * pmove->right[i]);
} }
@ -1296,7 +1296,7 @@ void PM_WaterMove(void)
accelspeed = addspeed; accelspeed = addspeed;
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
pmove->velocity[i] += accelspeed * wishvel[i]; pmove->velocity[i] += accelspeed * wishvel[i];
} }
@ -1344,7 +1344,7 @@ void PM_AirMove(void)
VectorNormalize(pmove->right); VectorNormalize(pmove->right);
// Determine x and y parts of velocity // Determine x and y parts of velocity
for (i = 0; i < 2; i++) for (i = 0; i < 2; ++i)
{ {
wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove;
} }
@ -1715,7 +1715,7 @@ void PM_SpectatorMove(void)
VectorNormalize(pmove->forward); VectorNormalize(pmove->forward);
VectorNormalize(pmove->right); VectorNormalize(pmove->right);
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove;
} }
@ -1746,7 +1746,7 @@ void PM_SpectatorMove(void)
accelspeed = addspeed; accelspeed = addspeed;
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
pmove->velocity[i] += accelspeed * wishdir[i]; pmove->velocity[i] += accelspeed * wishdir[i];
} }
@ -1823,7 +1823,7 @@ void PM_FixPlayerCrouchStuck(int direction)
VectorCopy(pmove->origin, test); VectorCopy(pmove->origin, test);
for (i = 0; i < 36; i++) for (i = 0; i < 36; ++i)
{ {
pmove->origin[2] += direction; pmove->origin[2] += direction;
hitent = pmove->PM_TestPlayerPosition(pmove->origin, NULL); hitent = pmove->PM_TestPlayerPosition(pmove->origin, NULL);
@ -2087,7 +2087,7 @@ physent_t *PM_Ladder(void)
int num; int num;
vec3_t test; vec3_t test;
for (i = 0; i < pmove->nummoveent; i++) for (i = 0; i < pmove->nummoveent; ++i)
{ {
pe = &pmove->moveents[i]; pe = &pmove->moveents[i];
@ -2298,7 +2298,7 @@ void PM_NoClip(void)
VectorNormalize(pmove->right); VectorNormalize(pmove->right);
// Determine x and y parts of velocity // Determine x and y parts of velocity
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove;
} }
@ -3096,7 +3096,7 @@ void PM_CreateStuckTable(void)
zi[1] = 1.0f; zi[1] = 1.0f;
zi[2] = 6.0f; zi[2] = 6.0f;
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
// Z moves // Z moves
z = zi[i]; z = zi[i];
@ -3135,7 +3135,7 @@ void PM_CreateStuckTable(void)
} }
// Remaining multi axis nudges. // Remaining multi axis nudges.
for (i = 0; i < 3; i++) for (i = 0; i < 3; ++i)
{ {
z = zi[i]; z = zi[i];