mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
Modified SDK for GCC 4.1
This commit is contained in:
parent
325306db96
commit
4c2b8fd6c4
@ -110,14 +110,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tier1", "tier1\tier1-2003.v
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "phonemeextractor", "utils\phonemeextractor\phonemeextractor-2003.vcproj", "{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "choreoobjects", "choreoobjects\choreoobjects-2003.vcproj", "{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hlmv", "utils\hlmv\hlmv-2003.vcproj", "{F3704DBF-8055-413C-B027-399E5DBCA4DD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hlmv", "utils\hlmv\hlmv-2003.vcproj", "{F3704DBF-8055-413C-B027-399E5DBCA4DD}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "phonemeextractor", "utils\phonemeextractor\phonemeextractor-2003.vcproj", "{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
@ -212,14 +218,18 @@ Global
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Debug.Build.0 = Debug|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Release.ActiveCfg = Release|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Release.Build.0 = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug.ActiveCfg = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug.Build.0 = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release.ActiveCfg = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release.Build.0 = Release|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Debug.ActiveCfg = Debug|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Debug.Build.0 = Debug|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Release.ActiveCfg = Release|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Release.Build.0 = Release|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Debug.ActiveCfg = Debug|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Debug.Build.0 = Debug|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Release.ActiveCfg = Release|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Release.Build.0 = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug.ActiveCfg = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug.Build.0 = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release.ActiveCfg = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
|
@ -2,38 +2,38 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glview", "utils\glview\glview-2005.vcproj", "{BD1604CA-F401-4C4B-821C-251F5AE157FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "height2normal", "utils\height2normal\height2normal-2005.vcproj", "{0FDD99E4-130F-493C-8202-4C0236CC47EA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serverplugin_empty", "utils\serverplugin_sample\serverplugin_empty-2005.vcproj", "{B6572CBE-7C7F-4FFF-94DE-AFBBBAB11C64}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "studiomdl", "utils\studiomdl\studiomdl-2005.vcproj", "{AE28536E-885A-41BF-99A4-41A7E424B869}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tgadiff", "utils\tgadiff\tgadiff-2005.vcproj", "{0CE0AF8A-A977-4538-9D63-BCB76DE1BAC6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vbsp", "utils\vbsp\vbsp-2005.vcproj", "{B78B6271-B19A-4CF6-926E-40B643548E23}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vice", "utils\vice\vice-2005.vcproj", "{3CE6E7A9-89EC-4304-8D72-5B602B4DBD09}"
|
||||
@ -48,8 +48,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vprojtomake", "utils\vprojt
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vrad", "utils\vrad\vrad-2005.vcproj", "{FC0F5DE3-F09F-4EF6-98F9-BA762FFF268D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vrad_launcher", "utils\vrad_launcher\vrad_launcher-2005.vcproj", "{914F19DF-64EC-4E7D-8B01-76477BF06479}"
|
||||
@ -59,20 +59,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vrad_launcher", "utils\vrad
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtf2tga", "utils\vtf2tga\vtf2tga-2005.vcproj", "{2A1F656C-053C-46A4-AE33-304C1D865E0C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtfdiff", "utils\vtfdiff\vtfdiff-2005.vcproj", "{0A368DE7-D34A-48D3-B517-996BFF2D0D5D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vvis", "utils\vvis\vvis-2005.vcproj", "{5B065E70-6EE0-4B47-BA64-113D2F81220D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vvis_launcher", "utils\vvis_launcher\vvis_launcher-2005.vcproj", "{4C0B9915-E8FF-4089-8927-FC934BFC1E4A}"
|
||||
@ -91,8 +91,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demoinfo", "utils\demoinfo\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "motionmapper", "utils\motionmapper\motionmapper-2005.vcproj", "{A882FC08-8B92-4D4F-89BF-75BCEC2BAE11}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QC_Eyes", "utils\qc_eyes\QC_Eyes-2005.vcproj", "{D373436F-7DBF-468B-A3E4-601FB8556544}"
|
||||
@ -101,14 +101,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mathlib", "mathlib\mathlib-
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tier1", "tier1\tier1-2005.vcproj", "{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "choreoobjects", "choreoobjects\choreoobjects-2005.vcproj", "{0A940BE3-0C70-4D6F-A9F8-C39B483E3796}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hlmv", "utils\hlmv\hlmv-2005.vcproj", "{F3704DBF-8055-413C-B027-399E5DBCA4DD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "phonemeextractor", "utils\phonemeextractor\phonemeextractor-2005.vcproj", "{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
{E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720} = {E1DA9FB8-FB4C-4B14-91A6-98BCED6B9720}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hlmv", "utils\hlmv\hlmv-2005.vcproj", "{F3704DBF-8055-413C-B027-399E5DBCA4DD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -199,14 +205,18 @@ Global
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}.Release|Win32.Build.0 = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A940BE3-0C70-4D6F-A9F8-C39B483E3796}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A940BE3-0C70-4D6F-A9F8-C39B483E3796}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A940BE3-0C70-4D6F-A9F8-C39B483E3796}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0A940BE3-0C70-4D6F-A9F8-C39B483E3796}.Release|Win32.Build.0 = Release|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F3704DBF-8055-413C-B027-399E5DBCA4DD}.Release|Win32.Build.0 = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8A35F55B-B5C2-47A0-8C4A-5857A8E20385}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
293
choreoobjects/choreoactor.cpp
Normal file
293
choreoobjects/choreoactor.cpp
Normal file
@ -0,0 +1,293 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "choreoactor.h"
|
||||
#include "choreochannel.h"
|
||||
#include "choreoscene.h"
|
||||
#include "tier1/utlbuffer.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoActor::CChoreoActor( void )
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *name -
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoActor::CChoreoActor( const char *name )
|
||||
{
|
||||
Init();
|
||||
SetName( name );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: // Assignment
|
||||
// Input : src -
|
||||
// Output : CChoreoActor&
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoActor& CChoreoActor::operator=( const CChoreoActor& src )
|
||||
{
|
||||
m_bActive = src.m_bActive;
|
||||
|
||||
Q_strncpy( m_szName, src.m_szName, sizeof( m_szName ) );
|
||||
Q_strncpy( m_szFacePoserModelName, src.m_szFacePoserModelName, sizeof( m_szFacePoserModelName ) );
|
||||
|
||||
for ( int i = 0; i < src.m_Channels.Size(); i++ )
|
||||
{
|
||||
CChoreoChannel *c = src.m_Channels[ i ];
|
||||
CChoreoChannel *newChannel = new CChoreoChannel();
|
||||
newChannel->SetActor( this );
|
||||
*newChannel = *c;
|
||||
AddChannel( newChannel );
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::Init( void )
|
||||
{
|
||||
m_szName[ 0 ] = 0;
|
||||
m_szFacePoserModelName[ 0 ] = 0;
|
||||
m_bActive = true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *name -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::SetName( const char *name )
|
||||
{
|
||||
assert( strlen( name ) < MAX_ACTOR_NAME );
|
||||
Q_strncpy( m_szName, name, sizeof( m_szName ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : const char
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *CChoreoActor::GetName( void )
|
||||
{
|
||||
return m_szName;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : int
|
||||
//-----------------------------------------------------------------------------
|
||||
int CChoreoActor::GetNumChannels( void )
|
||||
{
|
||||
return m_Channels.Size();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : channel -
|
||||
// Output : CChoreoChannel
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoChannel *CChoreoActor::GetChannel( int channel )
|
||||
{
|
||||
if ( channel < 0 || channel >= m_Channels.Size() )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return m_Channels[ channel ];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *channel -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::AddChannel( CChoreoChannel *channel )
|
||||
{
|
||||
m_Channels.AddToTail( channel );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *channel -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::RemoveChannel( CChoreoChannel *channel )
|
||||
{
|
||||
int idx = FindChannelIndex( channel );
|
||||
if ( idx == -1 )
|
||||
return;
|
||||
|
||||
m_Channels.Remove( idx );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::RemoveAllChannels()
|
||||
{
|
||||
m_Channels.RemoveAll();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : c1 -
|
||||
// c2 -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::SwapChannels( int c1, int c2 )
|
||||
{
|
||||
CChoreoChannel *temp;
|
||||
|
||||
temp = m_Channels[ c1 ];
|
||||
m_Channels[ c1 ] = m_Channels[ c2 ];
|
||||
m_Channels[ c2 ] = temp;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *channel -
|
||||
// Output : int
|
||||
//-----------------------------------------------------------------------------
|
||||
int CChoreoActor::FindChannelIndex( CChoreoChannel *channel )
|
||||
{
|
||||
for ( int i = 0; i < m_Channels.Size(); i++ )
|
||||
{
|
||||
if ( channel == m_Channels[ i ] )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *name -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::SetFacePoserModelName( const char *name )
|
||||
{
|
||||
Q_strncpy( m_szFacePoserModelName, name, sizeof( m_szFacePoserModelName ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : char const
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *CChoreoActor::GetFacePoserModelName( void ) const
|
||||
{
|
||||
return m_szFacePoserModelName;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : active -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::SetActive( bool active )
|
||||
{
|
||||
m_bActive = active;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : Returns true on success, false on failure.
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CChoreoActor::GetActive( void ) const
|
||||
{
|
||||
return m_bActive;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoActor::MarkForSaveAll( bool mark )
|
||||
{
|
||||
SetMarkedForSave( mark );
|
||||
|
||||
int c = GetNumChannels();
|
||||
for ( int i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoChannel *channel = GetChannel( i );
|
||||
channel->MarkForSaveAll( mark );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *name -
|
||||
// Output : CChoreoChannel
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoChannel *CChoreoActor::FindChannel( const char *name )
|
||||
{
|
||||
int c = GetNumChannels();
|
||||
for ( int i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoChannel *channel = GetChannel( i );
|
||||
if ( !Q_stricmp( channel->GetName(), name ) )
|
||||
return channel;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CChoreoActor::SaveToBuffer( CUtlBuffer& buf, CChoreoScene *pScene )
|
||||
{
|
||||
int i, c;
|
||||
buf.PutString( GetName() );
|
||||
|
||||
c = GetNumChannels();
|
||||
buf.PutShort( c );
|
||||
for ( i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoChannel *channel = GetChannel( i );
|
||||
Assert( channel );
|
||||
channel->SaveToBuffer( buf, pScene );
|
||||
}
|
||||
|
||||
/*
|
||||
if ( Q_strlen( a->GetFacePoserModelName() ) > 0 )
|
||||
{
|
||||
FilePrintf( buf, level + 1, "faceposermodel \"%s\"\n", a->GetFacePoserModelName() );
|
||||
}
|
||||
*/
|
||||
buf.PutChar( GetActive() ? 1 : 0 );
|
||||
}
|
||||
|
||||
bool CChoreoActor::RestoreFromBuffer( CUtlBuffer& buf, CChoreoScene *pScene )
|
||||
{
|
||||
char sz[ 256 ];
|
||||
buf.GetString( sz, sizeof( sz ) );
|
||||
|
||||
SetName( sz );
|
||||
|
||||
int i;
|
||||
int c = buf.GetShort();
|
||||
for ( i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoChannel *channel = pScene->AllocChannel();
|
||||
Assert( channel );
|
||||
if ( channel->RestoreFromBuffer( buf, pScene, this ) )
|
||||
{
|
||||
AddChannel( channel );
|
||||
channel->SetActor( this );
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SetActive( buf.GetChar() == 1 ? true : false );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
562
choreoobjects/choreochannel.cpp
Normal file
562
choreoobjects/choreochannel.cpp
Normal file
@ -0,0 +1,562 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "choreochannel.h"
|
||||
#include "choreoevent.h"
|
||||
#include "choreoscene.h"
|
||||
#include "utlrbtree.h"
|
||||
#include "tier1/utlbuffer.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoChannel::CChoreoChannel( void )
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *name -
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoChannel::CChoreoChannel(const char *name )
|
||||
{
|
||||
Init();
|
||||
SetName( name );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Assignment
|
||||
// Input : src -
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoChannel& CChoreoChannel::operator=( const CChoreoChannel& src )
|
||||
{
|
||||
m_bActive = src.m_bActive;
|
||||
Q_strncpy( m_szName, src.m_szName, sizeof( m_szName ) );
|
||||
for ( int i = 0; i < src.m_Events.Size(); i++ )
|
||||
{
|
||||
CChoreoEvent *e = src.m_Events[ i ];
|
||||
CChoreoEvent *newEvent = new CChoreoEvent( e->GetScene() );
|
||||
*newEvent = *e;
|
||||
AddEvent( newEvent );
|
||||
newEvent->SetChannel( this );
|
||||
newEvent->SetActor( m_pActor );
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *name -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::SetName( const char *name )
|
||||
{
|
||||
assert( Q_strlen( name ) < MAX_CHANNEL_NAME );
|
||||
Q_strncpy( m_szName, name, sizeof( m_szName ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : const char
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *CChoreoChannel::GetName( void )
|
||||
{
|
||||
return m_szName;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : int
|
||||
//-----------------------------------------------------------------------------
|
||||
int CChoreoChannel::GetNumEvents( void )
|
||||
{
|
||||
return m_Events.Size();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : event -
|
||||
// Output : CChoreoEvent
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoEvent *CChoreoChannel::GetEvent( int event )
|
||||
{
|
||||
if ( event < 0 || event >= m_Events.Size() )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return m_Events[ event ];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *event -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::AddEvent( CChoreoEvent *event )
|
||||
{
|
||||
m_Events.AddToTail( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *event -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::RemoveEvent( CChoreoEvent *event )
|
||||
{
|
||||
int idx = FindEventIndex( event );
|
||||
if ( idx == -1 )
|
||||
return;
|
||||
|
||||
m_Events.Remove( idx );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::RemoveAllEvents()
|
||||
{
|
||||
m_Events.RemoveAll();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *event -
|
||||
// Output : int
|
||||
//-----------------------------------------------------------------------------
|
||||
int CChoreoChannel::FindEventIndex( CChoreoEvent *event )
|
||||
{
|
||||
for ( int i = 0; i < m_Events.Size(); i++ )
|
||||
{
|
||||
if ( event == m_Events[ i ] )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::Init( void )
|
||||
{
|
||||
m_szName[ 0 ] = 0;
|
||||
SetActor( NULL );
|
||||
m_bActive = true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : CChoreoActor
|
||||
//-----------------------------------------------------------------------------
|
||||
CChoreoActor *CChoreoChannel::GetActor( void )
|
||||
{
|
||||
return m_pActor;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *actor -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::SetActor( CChoreoActor *actor )
|
||||
{
|
||||
m_pActor = actor;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : active -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::SetActive( bool active )
|
||||
{
|
||||
m_bActive = active;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Output : Returns true on success, false on failure.
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CChoreoChannel::GetActive( void ) const
|
||||
{
|
||||
return m_bActive;
|
||||
}
|
||||
|
||||
static bool ChoreEventStartTimeLessFunc( CChoreoEvent * const &p1, CChoreoEvent * const &p2 )
|
||||
{
|
||||
CChoreoEvent *e1;
|
||||
CChoreoEvent *e2;
|
||||
|
||||
e1 = const_cast< CChoreoEvent * >( p1 );
|
||||
e2 = const_cast< CChoreoEvent * >( p2 );
|
||||
|
||||
return e1->GetStartTime() < e2->GetStartTime();
|
||||
}
|
||||
|
||||
void CChoreoChannel::ReconcileGestureTimes()
|
||||
{
|
||||
// Sort gesture events within channel by starting time
|
||||
CUtlRBTree< CChoreoEvent * > sortedGestures( 0, 0, ChoreEventStartTimeLessFunc );
|
||||
int i;
|
||||
// Sort items
|
||||
int c = GetNumEvents();
|
||||
for ( i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoEvent *e = GetEvent( i );
|
||||
Assert( e );
|
||||
if ( e->GetType() != CChoreoEvent::GESTURE )
|
||||
continue;
|
||||
|
||||
sortedGestures.Insert( e );
|
||||
}
|
||||
|
||||
// Now walk list of gestures
|
||||
if ( !sortedGestures.Count() )
|
||||
return;
|
||||
|
||||
CChoreoEvent *previous = NULL;
|
||||
|
||||
for ( i = sortedGestures.FirstInorder(); i != sortedGestures.InvalidIndex(); i = sortedGestures.NextInorder( i ) )
|
||||
{
|
||||
CChoreoEvent *event = sortedGestures[ i ];
|
||||
|
||||
if ( !previous )
|
||||
{
|
||||
// event->SetStartTime( 0.0f );
|
||||
}
|
||||
else if ( previous->GetSyncToFollowingGesture() )
|
||||
{
|
||||
// TODO: ask the sequence for what tags to match
|
||||
|
||||
CEventAbsoluteTag *pEntryTag = event->FindEntryTag( CChoreoEvent::PLAYBACK );
|
||||
CEventAbsoluteTag *pExitTag = previous->FindExitTag( CChoreoEvent::PLAYBACK );
|
||||
|
||||
if (pEntryTag && pExitTag)
|
||||
{
|
||||
float entryTime = pEntryTag->GetAbsoluteTime( );
|
||||
|
||||
// get current decay rate of previous gesture
|
||||
float duration = previous->GetDuration();
|
||||
float decayTime = (1.0 - pExitTag->GetPercentage()) * duration;
|
||||
|
||||
// adjust the previous gestures end time to current apex + existing decay rate
|
||||
previous->RescaleGestureTimes( previous->GetStartTime(), entryTime + decayTime );
|
||||
previous->SetEndTime( entryTime + decayTime );
|
||||
|
||||
// set the previous gestures end tag to the current apex
|
||||
pExitTag->SetAbsoluteTime( entryTime );
|
||||
|
||||
event->PreventTagOverlap( );
|
||||
previous->PreventTagOverlap( );
|
||||
}
|
||||
// BUG: Tracker 3298: ywb 1/31/04
|
||||
// I think this fixes the issue with abutting past NULL gestures on paste:
|
||||
// Here's the bug report:
|
||||
// -------------------------
|
||||
// When copying and pasteing posture and gesture clips in face poser the beginings of the clips stretch
|
||||
// to the begining of the scene even if there is a null gesture in place at the begining.
|
||||
// -------------------------
|
||||
/*
|
||||
else if ( pEntryTag && !Q_stricmp( previous->GetName(), "NULL" ) )
|
||||
{
|
||||
// If the previous was a null event, then do a bit of fixup
|
||||
event->SetStartTime( previous->GetEndTime() );
|
||||
|
||||
event->PreventTagOverlap( );
|
||||
}
|
||||
*/
|
||||
|
||||
// The previous event decays from it's end dispaly end time to the current event's display start time
|
||||
// The next event starts just after the display end time of the previous event
|
||||
}
|
||||
|
||||
previous = event;
|
||||
}
|
||||
|
||||
if ( previous )
|
||||
{
|
||||
CChoreoScene *scene = previous->GetScene();
|
||||
if ( scene )
|
||||
{
|
||||
// HACK: Could probably do better by allowing user to drag the blue "end time" bar
|
||||
//float finish = scene->FindStopTime();
|
||||
//previous->RescaleGestureTimes( previous->GetStartTime(), finish );
|
||||
//previous->SetEndTime( finish );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
c = 0;
|
||||
for ( i = sortedGestures.FirstInorder(); i != sortedGestures.InvalidIndex(); i = sortedGestures.NextInorder( i ) )
|
||||
{
|
||||
CChoreoEvent *event = sortedGestures[ i ];
|
||||
|
||||
Msg( "event %i start %f disp %f dispend %f end %f\n",
|
||||
c + 1,
|
||||
event->GetStartTime( CChoreoEvent::SIMULATION ),
|
||||
event->GetStartTime( CChoreoEvent::DISPLAY ),
|
||||
event->GetEndTime( CChoreoEvent::DISPLAY ),
|
||||
event->GetEndTime( CChoreoEvent::SIMULATION )
|
||||
);
|
||||
c++;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::MarkForSaveAll( bool mark )
|
||||
{
|
||||
SetMarkedForSave( mark );
|
||||
|
||||
int c = GetNumEvents();
|
||||
for ( int i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoEvent *e = GetEvent( i );
|
||||
e->SetMarkedForSave( mark );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct EventGroup
|
||||
{
|
||||
EventGroup() :
|
||||
timeSortedEvents( 0, 0, ChoreEventStartTimeLessFunc )
|
||||
{
|
||||
}
|
||||
|
||||
EventGroup( const EventGroup& src )
|
||||
:
|
||||
timeSortedEvents( 0, 0, ChoreEventStartTimeLessFunc )
|
||||
{
|
||||
timeSortedEvents.RemoveAll();
|
||||
int i = src.timeSortedEvents.FirstInorder();
|
||||
while ( i != src.timeSortedEvents.InvalidIndex() )
|
||||
{
|
||||
timeSortedEvents.Insert( src.timeSortedEvents[ i ] );
|
||||
|
||||
i = src.timeSortedEvents.NextInorder( i );
|
||||
}
|
||||
}
|
||||
|
||||
EventGroup & operator=( const EventGroup& src )
|
||||
{
|
||||
if ( this == &src )
|
||||
return *this;
|
||||
|
||||
timeSortedEvents.RemoveAll();
|
||||
int i = src.timeSortedEvents.FirstInorder();
|
||||
while ( i != src.timeSortedEvents.InvalidIndex() )
|
||||
{
|
||||
timeSortedEvents.Insert( src.timeSortedEvents[ i ] );
|
||||
|
||||
i = src.timeSortedEvents.NextInorder( i );
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
CUtlRBTree< CChoreoEvent * > timeSortedEvents;
|
||||
};
|
||||
|
||||
// Compute master/slave, count, endtime info for close captioning data
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CChoreoChannel::ReconcileCloseCaption()
|
||||
{
|
||||
// Create a dictionary based on the combined token name
|
||||
CUtlDict< EventGroup, int > validSpeakEventsGroupedByName;
|
||||
|
||||
int i;
|
||||
// Sort items
|
||||
int c = GetNumEvents();
|
||||
for ( i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoEvent *e = GetEvent( i );
|
||||
Assert( e );
|
||||
if ( e->GetType() != CChoreoEvent::SPEAK )
|
||||
continue;
|
||||
|
||||
CChoreoEvent::CLOSECAPTION type;
|
||||
|
||||
type = e->GetCloseCaptionType();
|
||||
if ( type == CChoreoEvent::CC_DISABLED )
|
||||
{
|
||||
e->SetUsingCombinedFile( false );
|
||||
e->SetRequiredCombinedChecksum( 0 );
|
||||
e->SetNumSlaves( 0 );
|
||||
e->SetLastSlaveEndTime( 0.0f );
|
||||
continue;
|
||||
}
|
||||
|
||||
char const *name = e->GetCloseCaptionToken();
|
||||
if ( !name || !name[0] )
|
||||
{
|
||||
// Fixup invalid slave tag
|
||||
if ( type == CChoreoEvent::CC_SLAVE )
|
||||
{
|
||||
e->SetCloseCaptionType( CChoreoEvent::CC_MASTER );
|
||||
e->SetUsingCombinedFile( false );
|
||||
e->SetRequiredCombinedChecksum( 0 );
|
||||
e->SetNumSlaves( 0 );
|
||||
e->SetLastSlaveEndTime( 0.0f );
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
int idx = validSpeakEventsGroupedByName.Find( name );
|
||||
if ( idx == validSpeakEventsGroupedByName.InvalidIndex() )
|
||||
{
|
||||
EventGroup eg;
|
||||
eg.timeSortedEvents.Insert( e );
|
||||
validSpeakEventsGroupedByName.Insert( name, eg );
|
||||
}
|
||||
else
|
||||
{
|
||||
EventGroup & eg = validSpeakEventsGroupedByName[ idx ];
|
||||
eg.timeSortedEvents.Insert( e );
|
||||
}
|
||||
}
|
||||
|
||||
c = validSpeakEventsGroupedByName.Count();
|
||||
// Now walk list of events by group
|
||||
if ( !c )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; i < c; ++i )
|
||||
{
|
||||
EventGroup & eg = validSpeakEventsGroupedByName[ i ];
|
||||
int sortedEventInGroup = eg.timeSortedEvents.Count();
|
||||
// If there's only one, just mark it valid
|
||||
if ( sortedEventInGroup <= 1 )
|
||||
{
|
||||
CChoreoEvent *e = eg.timeSortedEvents[ 0 ];
|
||||
Assert( e );
|
||||
// Make sure it's the master
|
||||
e->SetCloseCaptionType( CChoreoEvent::CC_MASTER );
|
||||
// Since it's by itself, can't be using "combined" file
|
||||
e->SetUsingCombinedFile( false );
|
||||
e->SetRequiredCombinedChecksum( 0 );
|
||||
e->SetNumSlaves( 0 );
|
||||
e->SetLastSlaveEndTime( 0.0f );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Okay, read them back in of start time
|
||||
int j = eg.timeSortedEvents.FirstInorder();
|
||||
CChoreoEvent *master = NULL;
|
||||
while ( j != eg.timeSortedEvents.InvalidIndex() )
|
||||
{
|
||||
CChoreoEvent *e = eg.timeSortedEvents[ j ];
|
||||
if ( !master )
|
||||
{
|
||||
master = e;
|
||||
e->SetCloseCaptionType( CChoreoEvent::CC_MASTER );
|
||||
//e->SetUsingCombinedFile( true );
|
||||
e->SetRequiredCombinedChecksum( 0 );
|
||||
e->SetNumSlaves( sortedEventInGroup - 1 );
|
||||
e->SetLastSlaveEndTime( e->GetEndTime() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Keep bumping out the end time
|
||||
master->SetLastSlaveEndTime( e->GetEndTime() );
|
||||
e->SetCloseCaptionType( CChoreoEvent::CC_SLAVE );
|
||||
e->SetUsingCombinedFile( master->IsUsingCombinedFile() );
|
||||
e->SetRequiredCombinedChecksum( 0 );
|
||||
e->SetLastSlaveEndTime( 0.0f );
|
||||
}
|
||||
|
||||
j = eg.timeSortedEvents.NextInorder( j );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CChoreoChannel::GetSortedCombinedEventList( char const *cctoken, CUtlRBTree< CChoreoEvent * >& events )
|
||||
{
|
||||
events.RemoveAll();
|
||||
|
||||
int i;
|
||||
// Sort items
|
||||
int c = GetNumEvents();
|
||||
for ( i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoEvent *e = GetEvent( i );
|
||||
Assert( e );
|
||||
if ( e->GetType() != CChoreoEvent::SPEAK )
|
||||
continue;
|
||||
|
||||
if ( e->GetCloseCaptionType() == CChoreoEvent::CC_DISABLED )
|
||||
continue;
|
||||
|
||||
// A master with no slaves is not a combined event
|
||||
if ( e->GetCloseCaptionType() == CChoreoEvent::CC_MASTER &&
|
||||
e->GetNumSlaves() == 0 )
|
||||
continue;
|
||||
|
||||
char const *token = e->GetCloseCaptionToken();
|
||||
if ( Q_stricmp( token, cctoken ) )
|
||||
continue;
|
||||
|
||||
events.Insert( e );
|
||||
}
|
||||
|
||||
return ( events.Count() > 0 ) ? true : false;
|
||||
}
|
||||
|
||||
void CChoreoChannel::SaveToBuffer( CUtlBuffer& buf, CChoreoScene *pScene )
|
||||
{
|
||||
buf.PutString( GetName() );
|
||||
int c = GetNumEvents();
|
||||
Assert( c <= 65535 );
|
||||
|
||||
buf.PutShort( c );
|
||||
for ( int i = 0; i < c; i++ )
|
||||
{
|
||||
CChoreoEvent *e = GetEvent( i );
|
||||
Assert( e );
|
||||
e->SaveToBuffer( buf, pScene );
|
||||
}
|
||||
|
||||
buf.PutChar( GetActive() ? 1 : 0 );
|
||||
}
|
||||
|
||||
bool CChoreoChannel::RestoreFromBuffer( CUtlBuffer& buf, CChoreoScene *pScene, CChoreoActor *pActor )
|
||||
{
|
||||
char sz[ 256 ];
|
||||
buf.GetString( sz, sizeof( sz ) );
|
||||
SetName( sz );
|
||||
|
||||
int numEvents = (int)buf.GetShort();
|
||||
for ( int i = 0 ; i < numEvents; ++i )
|
||||
{
|
||||
CChoreoEvent *e = pScene->AllocEvent();
|
||||
if ( e->RestoreFromBuffer( buf, pScene ) )
|
||||
{
|
||||
AddEvent( e );
|
||||
e->SetChannel( this );
|
||||
e->SetActor( pActor );
|
||||
continue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
SetActive( buf.GetChar() == 1 ? true : false );
|
||||
|
||||
return true;
|
||||
}
|
4204
choreoobjects/choreoevent.cpp
Normal file
4204
choreoobjects/choreoevent.cpp
Normal file
File diff suppressed because it is too large
Load Diff
161
choreoobjects/choreoobjects-2003.vcproj
Normal file
161
choreoobjects/choreoobjects-2003.vcproj
Normal file
@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="choreoobjects"
|
||||
ProjectGUID="{E1DA8DB8-FB4C-4B14-91A6-98BCED6B9720}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
OptimizeForProcessor="3"
|
||||
AdditionalIncludeDirectories="..\common,..\public,..\public\tier1,..\game_shared"
|
||||
PreprocessorDefinitions="_WIN32;_DEBUG;_LIB;CHOREOOBJECTS_STATIC_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
ExceptionHandling="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib-vc7\public\choreoobjects.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
CommandLine="if exist ..\..\..\lib\public\msvc7\choreoobjects.lib attrib -r ..\..\..\lib\public\msvc7\choreoobjects.lib
|
||||
if exist ..\..\..\lib\public\msvc7\choreoobjects.pdb attrib -r ..\..\..\lib\public\msvc7\choreoobjects.pdb
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="2"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="FALSE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
AdditionalIncludeDirectories="..\common,..\public,..\public\tier1,..\game_shared"
|
||||
PreprocessorDefinitions="_WIN32;NDEBUG;_LIB;CHOREOOBJECTS_STATIC_LIB"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="2"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib-vc7\public\choreoobjects.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
CommandLine="if exist ..\..\..\lib\public\msvc7\choreoobjects.lib attrib -r ..\..\..\lib\public\msvc7\choreoobjects.lib
|
||||
if exist ..\..\..\lib\public\msvc7\choreoobjects.pdb attrib -r ..\..\..\lib\public\msvc7\choreoobjects.pdb
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\choreoactor.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\choreochannel.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\choreoevent.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\choreoscene.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
213
choreoobjects/choreoobjects-2005.vcproj
Normal file
213
choreoobjects/choreoobjects-2005.vcproj
Normal file
@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="choreoobjects"
|
||||
ProjectGUID="{0A940BE3-0C70-4D6F-A9F8-C39B483E3796}"
|
||||
RootNamespace="choreoobjects"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\common,..\public,..\public\tier1,..\game_shared"
|
||||
PreprocessorDefinitions="_WIN32;_DEBUG;_LIB;CHOREOOBJECTS_STATIC_LIB"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
CommandLine="if exist ..\..\..\lib\public\msvc7\choreoobjects.lib attrib -r ..\..\..\lib\public\msvc7\choreoobjects.lib
if exist ..\..\..\lib\public\msvc7\choreoobjects.pdb attrib -r ..\..\..\lib\public\msvc7\choreoobjects.pdb
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\public\choreoobjects.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="..\common,..\public,..\public\tier1,..\game_shared"
|
||||
PreprocessorDefinitions="_WIN32;NDEBUG;_LIB;CHOREOOBJECTS_STATIC_LIB;_SECURE_SCL=0"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
CommandLine="if exist ..\..\..\lib\public\msvc7\choreoobjects.lib attrib -r ..\..\..\lib\public\msvc7\choreoobjects.lib
if exist ..\..\..\lib\public\msvc7\choreoobjects.pdb attrib -r ..\..\..\lib\public\msvc7\choreoobjects.pdb
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\public\choreoobjects.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\choreoactor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\choreochannel.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\choreoevent.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\choreoscene.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
3987
choreoobjects/choreoscene.cpp
Normal file
3987
choreoobjects/choreoscene.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@ copy "$(TargetDir)"client.dll "..\..\game\hl2\bin"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\lib-vc7\public"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
@ -147,7 +147,7 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\lib-vc7\public"
|
||||
IgnoreDefaultLibraryNames="LIBCMTD,LIBCD,LIBC"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
@ -507,66 +507,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
<File
|
||||
RelativePath="cdll_util.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="cl_mat_stub.cpp">
|
||||
</File>
|
||||
@ -2721,10 +2661,10 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
RelativePath="..\public\vgui\IImage.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInput.h">
|
||||
RelativePath="iinput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iinput.h">
|
||||
RelativePath="..\public\vgui\IInput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInputInternal.h">
|
||||
@ -2964,10 +2904,10 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
RelativePath="..\public\tier1\mempool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="menu.h">
|
||||
RelativePath="..\public\vgui_controls\Menu.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\Menu.h">
|
||||
RelativePath="menu.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\MenuItem.h">
|
||||
@ -3531,27 +3471,34 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\bitmap.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\mathlib.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier0.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier1.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier2.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vgui_controls.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vstdlib.lib">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Link Libraries"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\bitmap.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\choreoobjects.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\mathlib.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier0.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier1.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier2.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vgui_controls.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vstdlib.lib">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@ -92,7 +92,7 @@
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\lib\public"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMT"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="true"
|
||||
@ -208,7 +208,7 @@
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\lib\public"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="true"
|
||||
@ -670,86 +670,6 @@
|
||||
RelativePath="cdll_util.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="cl_mat_stub.cpp"
|
||||
>
|
||||
@ -4684,34 +4604,42 @@
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib\public\bitmap.lib"
|
||||
<Filter
|
||||
Name="Link Libraries"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\mathlib.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier0.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier1.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier2.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vgui_controls.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vstdlib.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\bitmap.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\choreoobjects.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\mathlib.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier0.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier1.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier2.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vgui_controls.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vstdlib.lib"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@ -26,7 +26,7 @@
|
||||
AdditionalIncludeDirectories=".\hl2mp\UI,.\hl2mp,..\game_shared\hl2mp,.\hl2_hud,.\hl2_hud\elements,../game_shared/hl2,.,.\..\Public,.\..\Public\tier1,.\..\vgui2\include,.\..\vgui2\controls,../game_shared,.\game_controls"
|
||||
PreprocessorDefinitions="HL2_EPISODIC;HL2MP;HL2_CLIENT_DLL;_DEBUG;fopen=dont_use_fopen;NO_STRING_T;CLIENT_DLL;_WINDOWS;VECTOR;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead;_WIN32;PROTECTED_THINGS_ENABLE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="5"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
@ -55,7 +55,7 @@ copy "$(TargetDir)"client.dll "..\..\game\hl2mp\bin"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\lib-vc7\public"
|
||||
IgnoreDefaultLibraryNames="LIBCMTD,LIBC,LIBCMT"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMT"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
@ -114,7 +114,7 @@ copy "$(TargetDir)"client.dll "..\..\game\hl2mp\bin"
|
||||
PreprocessorDefinitions="HL2_EPISODIC;HL2MP;HL2_CLIENT_DLL;NDEBUG;NO_STRING_T;CLIENT_DLL;_WINDOWS;VECTOR;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead;_WIN32;PROTECTED_THINGS_ENABLE"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="4"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="FALSE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
@ -147,7 +147,7 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\lib-vc7\public"
|
||||
IgnoreDefaultLibraryNames="libcd.lib,LIBCD,LIBCMT,libcmtd"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
@ -507,66 +507,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
<File
|
||||
RelativePath="cdll_util.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="cl_mat_stub.cpp">
|
||||
</File>
|
||||
@ -2144,16 +2084,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_ar2.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_crossbow.cpp">
|
||||
@ -2169,80 +2099,30 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbase.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbase_machinegun.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbase_machinegun.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasebasebludgeon.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasebasebludgeon.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasehlmpcombatweapon.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasehlmpcombatweapon.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_physcannon.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_physcannon.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_pistol.cpp">
|
||||
@ -2252,47 +2132,15 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_rpg.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_shotgun.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_slam.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_slam.h">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_smg1.cpp">
|
||||
@ -2306,18 +2154,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\hl2mp\ui\backgroundpanel.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hl2mp\ui\backgroundpanel.h">
|
||||
@ -2348,18 +2184,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hl2mp\hud_deathnotice.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
@ -2990,10 +2814,10 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
RelativePath="..\public\vgui\IImage.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iinput.h">
|
||||
RelativePath="..\public\vgui\IInput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInput.h">
|
||||
RelativePath="iinput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInputInternal.h">
|
||||
@ -3236,10 +3060,10 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
RelativePath="..\public\tier1\mempool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="menu.h">
|
||||
RelativePath="..\public\vgui_controls\Menu.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\Menu.h">
|
||||
RelativePath="menu.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\MenuItem.h">
|
||||
@ -3793,27 +3617,34 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\bitmap.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\mathlib.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier0.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier1.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier2.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vgui_controls.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vstdlib.lib">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Link Libraries"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\bitmap.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\choreoobjects.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\mathlib.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier0.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier1.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier2.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vgui_controls.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vstdlib.lib">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@ -203,7 +203,7 @@
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\lib\public"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMT"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="true"
|
||||
@ -665,86 +665,6 @@
|
||||
RelativePath="cdll_util.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="cl_mat_stub.cpp"
|
||||
>
|
||||
@ -2836,20 +2756,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_ar2.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_crossbow.cpp"
|
||||
@ -2870,20 +2776,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbase.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbase_machinegun.cpp"
|
||||
@ -2892,20 +2784,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbase_machinegun.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasebasebludgeon.cpp"
|
||||
@ -2914,20 +2792,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasebasebludgeon.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasehlmpcombatweapon.cpp"
|
||||
@ -2936,20 +2800,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_hl2mpbasehlmpcombatweapon.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_physcannon.cpp"
|
||||
@ -2958,20 +2808,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_physcannon.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_pistol.cpp"
|
||||
@ -2984,40 +2820,10 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_rpg.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_shotgun.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_slam.cpp"
|
||||
@ -3026,20 +2832,6 @@
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_slam.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\hl2mp\weapon_smg1.cpp"
|
||||
@ -3056,22 +2848,6 @@
|
||||
<File
|
||||
RelativePath=".\hl2mp\ui\backgroundpanel.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hl2mp\ui\backgroundpanel.h"
|
||||
@ -3112,22 +2888,6 @@
|
||||
<File
|
||||
RelativePath=".\hl2mp\hud_deathnotice.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
@ -3965,11 +3725,11 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iinput.h"
|
||||
RelativePath="..\public\vgui\IInput.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInput.h"
|
||||
RelativePath="iinput.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
@ -4293,11 +4053,11 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="menu.h"
|
||||
RelativePath="..\public\vgui_controls\Menu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\Menu.h"
|
||||
RelativePath="menu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
@ -5033,70 +4793,42 @@
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib\public\bitmap.lib"
|
||||
<Filter
|
||||
Name="Link Libraries"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\mathlib.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier0.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
<File
|
||||
RelativePath="..\lib\public\bitmap.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\choreoobjects.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier1.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier2.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vgui_controls.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vstdlib.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug HL2MP|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\mathlib.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release HL2MP|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier0.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier1.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier2.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vgui_controls.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vstdlib.lib"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@ -56,7 +56,7 @@ copy "$(TargetDir)"client.dll "..\..\game\sdksample\bin"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\lib-vc7\public"
|
||||
IgnoreDefaultLibraryNames="LIBCMT,LIBC"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMT"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
@ -149,7 +149,7 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\lib-vc7\public"
|
||||
IgnoreDefaultLibraryNames="libcd.lib,LIBCD,LIBCMT,libcmtd"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
@ -506,66 +506,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
<File
|
||||
RelativePath="cdll_util.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="cl_mat_stub.cpp">
|
||||
</File>
|
||||
@ -1859,79 +1799,27 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\c_sdk_player.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\c_sdk_team.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\c_sdk_team.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sdk\c_te_firebullets.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\clientmode_sdk.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\clientmode_sdk.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_basegrenade_projectile.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_basegrenade_projectile.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sdk\sdk_fx_impacts.cpp">
|
||||
@ -1941,16 +1829,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_fx_shared.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sdk\sdk_fx_weaponfx.cpp">
|
||||
@ -1963,16 +1841,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_gamerules.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sdk\sdk_hud_ammo.cpp">
|
||||
@ -1982,16 +1850,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sdk\sdk_hud_chat.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sdk\sdk_hud_health.cpp">
|
||||
@ -2013,32 +1871,12 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_playeranimstate.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\sdk_prediction.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_shareddefs.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_usermessages.cpp">
|
||||
@ -2048,80 +1886,30 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\sdk_weapon_parse.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\vgui\sdkviewport.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\vgui\sdkviewport.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\vgui\vgui_rootpanel_sdk.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="sdk\vgui\vgui_rootpanel_sdk.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_basesdkgrenade.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_basesdkgrenade.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_grenade.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_grenade.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_mp5.cpp">
|
||||
@ -2131,16 +1919,6 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_sdkbase.h">
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\sdk\weapon_shotgun.cpp">
|
||||
@ -2820,10 +2598,10 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
RelativePath="..\public\vgui\IImage.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInput.h">
|
||||
RelativePath="iinput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iinput.h">
|
||||
RelativePath="..\public\vgui\IInput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui\IInputInternal.h">
|
||||
@ -3066,10 +2844,10 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
RelativePath="..\public\tier1\mempool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\Menu.h">
|
||||
RelativePath="menu.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="menu.h">
|
||||
RelativePath="..\public\vgui_controls\Menu.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\public\vgui_controls\MenuItem.h">
|
||||
@ -3635,27 +3413,34 @@ if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\bitmap.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\mathlib.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier0.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier1.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier2.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vgui_controls.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vstdlib.lib">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Link Libraries"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\bitmap.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\choreoobjects.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\mathlib.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier0.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier1.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\tier2.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vgui_controls.lib">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib-vc7\public\vstdlib.lib">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@ -89,7 +89,7 @@
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\lib\public"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMT"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="true"
|
||||
@ -205,7 +205,7 @@
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\lib\public"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCD,LIBCMTD"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(IntDir)/client.pdb"
|
||||
GenerateMapFile="true"
|
||||
@ -663,86 +663,6 @@
|
||||
RelativePath="cdll_util.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoactor.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreochannel.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoevent.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\game_shared\choreoscene.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="cl_mat_stub.cpp"
|
||||
>
|
||||
@ -2502,7 +2422,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
ObjectFile="$(IntDir)/"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
@ -2510,7 +2430,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"
|
||||
ObjectFile="$(IntDir)/"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
@ -4827,88 +4747,96 @@
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib\public\bitmap.lib"
|
||||
<Filter
|
||||
Name="Link Libraries"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\mathlib.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier0.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
<File
|
||||
RelativePath="..\lib\public\bitmap.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\choreoobjects.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier1.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier2.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vgui_controls.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\mathlib.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier0.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vstdlib.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier1.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\tier2.lib"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vgui_controls.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\public\vstdlib.lib"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release SDK|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@ -505,7 +505,7 @@ void CSpectatorGUI::Update()
|
||||
|
||||
wchar_t playerText[ 80 ], playerName[ 64 ], health[ 10 ];
|
||||
wcscpy( playerText, L"Unable to find #Spec_PlayerItem*" );
|
||||
memset( playerName, 0x0, sizeof( playerName ) * sizeof( wchar_t ) );
|
||||
memset( playerName, 0x0, sizeof( playerName ) );
|
||||
|
||||
localize()->ConvertANSIToUnicode( UTIL_SafeName(gr->GetPlayerName( playernum )), playerName, sizeof( playerName ) );
|
||||
int iHealth = gr->GetHealth( playernum );
|
||||
|
@ -199,7 +199,7 @@ void CHUDAutoAim::OnThink()
|
||||
QAngle targetangles;
|
||||
QAngle delta;
|
||||
|
||||
float dist = (pLocalPlayer->m_HL2Local.m_vecAutoAimPoint - pLocalPlayer->GetAbsOrigin()).Length();
|
||||
// float dist = (pLocalPlayer->m_HL2Local.m_vecAutoAimPoint - pLocalPlayer->GetAbsOrigin()).Length();
|
||||
|
||||
engine->GetViewAngles( viewangles );
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,45 +1,45 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Used to influence the initial force for a dying NPC's ragdoll.
|
||||
// Passive entity. Just represents position in the world, radius, force
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#pragma once
|
||||
|
||||
#ifndef CRAGDOLLMAGNET_H
|
||||
#define CRAGDOLLMAGNET_H
|
||||
|
||||
#define SF_RAGDOLLMAGNET_BAR 0x00000002 // this is a bar magnet.
|
||||
|
||||
class CRagdollMagnet : public CPointEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CRagdollMagnet, CPointEntity );
|
||||
DECLARE_DATADESC();
|
||||
|
||||
Vector GetForceVector( CBaseEntity *pNPC );
|
||||
float GetRadius( void ) { return m_radius; }
|
||||
Vector GetAxisVector( void ) { return m_axis - GetAbsOrigin(); }
|
||||
float DistToPoint( const Vector &vecPoint );
|
||||
|
||||
bool IsEnabled( void ) { return !m_bDisabled; }
|
||||
|
||||
int IsBarMagnet( void ) { return (m_spawnflags & SF_RAGDOLLMAGNET_BAR); }
|
||||
|
||||
static CRagdollMagnet *FindBestMagnet( CBaseEntity *pNPC );
|
||||
|
||||
void Enable( bool bEnable ) { m_bDisabled = !bEnable; }
|
||||
|
||||
// Inputs
|
||||
void InputEnable( inputdata_t &inputdata );
|
||||
void InputDisable( inputdata_t &inputdata );
|
||||
|
||||
private:
|
||||
bool m_bDisabled;
|
||||
float m_radius;
|
||||
float m_force;
|
||||
Vector m_axis;
|
||||
};
|
||||
|
||||
#endif //CRAGDOLLMAGNET_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Used to influence the initial force for a dying NPC's ragdoll.
|
||||
// Passive entity. Just represents position in the world, radius, force
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#pragma once
|
||||
|
||||
#ifndef CRAGDOLLMAGNET_H
|
||||
#define CRAGDOLLMAGNET_H
|
||||
|
||||
#define SF_RAGDOLLMAGNET_BAR 0x00000002 // this is a bar magnet.
|
||||
|
||||
class CRagdollMagnet : public CPointEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CRagdollMagnet, CPointEntity );
|
||||
DECLARE_DATADESC();
|
||||
|
||||
Vector GetForceVector( CBaseEntity *pNPC );
|
||||
float GetRadius( void ) { return m_radius; }
|
||||
Vector GetAxisVector( void ) { return m_axis - GetAbsOrigin(); }
|
||||
float DistToPoint( const Vector &vecPoint );
|
||||
|
||||
bool IsEnabled( void ) { return !m_bDisabled; }
|
||||
|
||||
int IsBarMagnet( void ) { return (m_spawnflags & SF_RAGDOLLMAGNET_BAR); }
|
||||
|
||||
static CRagdollMagnet *FindBestMagnet( CBaseEntity *pNPC );
|
||||
|
||||
void Enable( bool bEnable ) { m_bDisabled = !bEnable; }
|
||||
|
||||
// Inputs
|
||||
void InputEnable( inputdata_t &inputdata );
|
||||
void InputDisable( inputdata_t &inputdata );
|
||||
|
||||
private:
|
||||
bool m_bDisabled;
|
||||
float m_radius;
|
||||
float m_force;
|
||||
Vector m_axis;
|
||||
};
|
||||
|
||||
#endif //CRAGDOLLMAGNET_H
|
||||
|
@ -124,7 +124,7 @@ void CEffectsServer::Smoke( const Vector &origin, int mModel, float flScale, flo
|
||||
CPVSFilter filter( origin );
|
||||
if ( !SuppressTE( filter ) )
|
||||
{
|
||||
te->Smoke( filter, 0.0, &origin, mModel, flScale * 0.1f, flFramerate );
|
||||
te->Smoke( filter, 0.0, &origin, mModel, flScale * 0.1f, static_cast<int>(flFramerate) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,8 +274,8 @@ void CEntityFlame::FlameThink( void )
|
||||
{
|
||||
const float ENTITYFLAME_MOVE_AWAY_DIST = 24.0f;
|
||||
// Make a sound near my origin, and up a little higher (in case I'm on the ground, so NPC's still hear it)
|
||||
CSoundEnt::InsertSound( SOUND_MOVE_AWAY, GetAbsOrigin(), ENTITYFLAME_MOVE_AWAY_DIST, 0.1f, this, SOUNDENT_CHANNEL_REPEATED_DANGER );
|
||||
CSoundEnt::InsertSound( SOUND_MOVE_AWAY, GetAbsOrigin() + Vector( 0, 0, 48.0f ), ENTITYFLAME_MOVE_AWAY_DIST, 0.1f, this, SOUNDENT_CHANNEL_REPEATING );
|
||||
CSoundEnt::InsertSound( SOUND_MOVE_AWAY, GetAbsOrigin(), static_cast<int>(ENTITYFLAME_MOVE_AWAY_DIST), 0.1f, this, SOUNDENT_CHANNEL_REPEATED_DANGER );
|
||||
CSoundEnt::InsertSound( SOUND_MOVE_AWAY, GetAbsOrigin() + Vector( 0, 0, 48.0f ), static_cast<int>(ENTITYFLAME_MOVE_AWAY_DIST), 0.1f, this, SOUNDENT_CHANNEL_REPEATING );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -381,7 +381,7 @@ void CEnvBeam::Strike( void )
|
||||
if ( pStart == NULL || pEnd == NULL )
|
||||
return;
|
||||
|
||||
m_speed = clamp( m_speed, 0, MAX_BEAM_SCROLLSPEED );
|
||||
m_speed = static_cast<int>(clamp( m_speed, 0, MAX_BEAM_SCROLLSPEED ));
|
||||
|
||||
int pointStart = IsStaticPointEntity( pStart );
|
||||
int pointEnd = IsStaticPointEntity( pEnd );
|
||||
@ -710,7 +710,7 @@ void CEnvBeam::BeamUpdateVars( void )
|
||||
|
||||
m_nNumBeamEnts = 2;
|
||||
|
||||
m_speed = clamp( m_speed, 0, MAX_BEAM_SCROLLSPEED );
|
||||
m_speed = static_cast<int>(clamp( m_speed, 0, MAX_BEAM_SCROLLSPEED ));
|
||||
|
||||
// NOTE: If the end entity is the beam itself (and the start entity
|
||||
// isn't *also* the beam itself, we've got problems. This is a problem
|
||||
|
@ -245,6 +245,8 @@ void CEnvShake::ApplyShake( ShakeCommand_t command )
|
||||
case SHAKE_FREQUENCY:
|
||||
m_pShakeController->WakeObjects();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ END_DATADESC()
|
||||
//-----------------------------------------------------------------------------
|
||||
// List of maps in HL2 that we must apply our skybox fog fixup hack to
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef HL2_DLL
|
||||
static const char *s_pBogusFogMaps[] =
|
||||
{
|
||||
"d1_canals_01",
|
||||
@ -84,6 +85,7 @@ static const char *s_pBogusFogMaps[] =
|
||||
"d3_citadel_01",
|
||||
NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Constructor, destructor
|
||||
|
@ -309,7 +309,7 @@ void Templates_StartUniqueInstance( void )
|
||||
g_iCurrentTemplateInstance++;
|
||||
|
||||
// Make sure there's enough room to fit it into the string
|
||||
int iMax = pow(10.0f, (int)((strlen(ENTITYIO_FIXUP_STRING) - 1))); // -1 for the &
|
||||
int iMax = static_cast<int>(pow(10.0f, (int)((strlen(ENTITYIO_FIXUP_STRING) - 1)))); // -1 for the &
|
||||
if ( g_iCurrentTemplateInstance >= iMax )
|
||||
{
|
||||
// We won't hit this.
|
||||
|
@ -629,29 +629,22 @@ bool CAI_BaseActor::CheckSceneEventCompletion( CSceneEventInfo *info, float curr
|
||||
Assert( info->m_pScene );
|
||||
Assert( info->m_pEvent );
|
||||
|
||||
switch ( event->GetType() )
|
||||
if (event->GetType() == CChoreoEvent::GENERIC)
|
||||
{
|
||||
case CChoreoEvent::GENERIC:
|
||||
if (info->m_nType == SCENE_AI_HOLSTER || info->m_nType == SCENE_AI_UNHOLSTER)
|
||||
{
|
||||
switch( info->m_nType)
|
||||
if (info->m_iLayer == -1)
|
||||
{
|
||||
case SCENE_AI_HOLSTER:
|
||||
case SCENE_AI_UNHOLSTER:
|
||||
{
|
||||
if (info->m_iLayer == -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float preload = event->GetEndTime() - currenttime;
|
||||
if (preload < 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float t = (1.0 - GetLayerCycle( info->m_iLayer )) * SequenceDuration( GetLayerSequence( info->m_iLayer ) );
|
||||
|
||||
return (t <= preload);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
float preload = event->GetEndTime() - currenttime;
|
||||
if (preload < 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float t = (1.0 - GetLayerCycle( info->m_iLayer )) * SequenceDuration( GetLayerSequence( info->m_iLayer ) );
|
||||
|
||||
return (t <= preload);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1665,6 +1658,8 @@ void CAI_BaseActor::PlayExpressionForState( NPC_STATE state )
|
||||
SetExpression( STRING(m_iszDeathExpression) );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,11 +81,11 @@ public:
|
||||
m_flBlinktime( 0 ),
|
||||
m_hLookTarget( NULL ),
|
||||
m_iszExpressionScene( NULL_STRING ),
|
||||
m_iszExpressionOverride( NULL_STRING ),
|
||||
m_iszIdleExpression( NULL_STRING ),
|
||||
m_iszAlertExpression( NULL_STRING ),
|
||||
m_iszCombatExpression( NULL_STRING ),
|
||||
m_iszDeathExpression( NULL_STRING ),
|
||||
m_iszExpressionOverride( NULL_STRING )
|
||||
m_iszDeathExpression( NULL_STRING )
|
||||
{
|
||||
memset( m_flextarget, 0, 64 * sizeof( m_flextarget[0] ) );
|
||||
}
|
||||
|
27339
dlls/ai_basenpc.cpp
27339
dlls/ai_basenpc.cpp
File diff suppressed because it is too large
Load Diff
@ -336,8 +336,6 @@ void CAI_BasePhysicsFlyingBot::TranslateNavGoal( CBaseEntity *pTarget, Vector &c
|
||||
//-----------------------------------------------------------------------------
|
||||
IMotionEvent::simresult_e CAI_BasePhysicsFlyingBot::Simulate( IPhysicsMotionController *pController, IPhysicsObject *pObject, float deltaTime, Vector &linear, AngularImpulse &angular )
|
||||
{
|
||||
static int count;
|
||||
|
||||
IPhysicsObject *pPhysicsObject = VPhysicsGetObject();
|
||||
// Assert( pPhysicsObject );
|
||||
if (!pPhysicsObject)
|
||||
|
@ -1132,7 +1132,7 @@ void CAI_BaseNPC::StartTask( const Task_t *pTask )
|
||||
{
|
||||
if (!GetHintNode())
|
||||
{
|
||||
SetHintNode( CAI_HintManager::FindHint( this, HINT_NONE, pTask->flTaskData, 2000 ) );
|
||||
SetHintNode( CAI_HintManager::FindHint( this, HINT_NONE, static_cast<int>(pTask->flTaskData), 2000 ) );
|
||||
}
|
||||
if (GetHintNode())
|
||||
{
|
||||
@ -1330,7 +1330,7 @@ void CAI_BaseNPC::StartTask( const Task_t *pTask )
|
||||
break;
|
||||
|
||||
case TASK_SET_SCHEDULE:
|
||||
if ( !SetSchedule( pTask->flTaskData ) )
|
||||
if ( !SetSchedule( static_cast<int>(pTask->flTaskData) ) )
|
||||
TaskFail(FAIL_SCHEDULE_NOT_FOUND);
|
||||
break;
|
||||
|
||||
@ -2537,7 +2537,7 @@ void CAI_BaseNPC::StartTask( const Task_t *pTask )
|
||||
}
|
||||
case TASK_SPEAK_SENTENCE:
|
||||
{
|
||||
SpeakSentence(pTask->flTaskData);
|
||||
SpeakSentence(static_cast<int>(pTask->flTaskData));
|
||||
TaskComplete();
|
||||
break;
|
||||
}
|
||||
@ -2842,7 +2842,7 @@ void CAI_BaseNPC::StartTask( const Task_t *pTask )
|
||||
{
|
||||
int iMinDist, iMaxDist, iParameter;
|
||||
|
||||
iParameter = pTask->flTaskData;
|
||||
iParameter = static_cast<int>(pTask->flTaskData);
|
||||
|
||||
iMinDist = iParameter / 10000;
|
||||
iMaxDist = iParameter - (iMinDist * 10000);
|
||||
|
@ -15,11 +15,15 @@
|
||||
#include "networkvar.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#include <typeinfo>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#pragma warning(disable:4290)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
@ -262,28 +266,28 @@ public:
|
||||
{
|
||||
if ( condition >= ID_SPACE_OFFSET && condition < ID_SPACE_OFFSET + 10000 ) // it's local to us
|
||||
condition = GetClassScheduleIdSpace()->ConditionLocalToGlobal( condition );
|
||||
GetOuter()->SetCondition( condition );
|
||||
this->GetOuter()->SetCondition( condition );
|
||||
}
|
||||
|
||||
bool HasCondition( int condition )
|
||||
{
|
||||
if ( condition >= ID_SPACE_OFFSET && condition < ID_SPACE_OFFSET + 10000 ) // it's local to us
|
||||
condition = GetClassScheduleIdSpace()->ConditionLocalToGlobal( condition );
|
||||
return GetOuter()->HasCondition( condition );
|
||||
return this->GetOuter()->HasCondition( condition );
|
||||
}
|
||||
|
||||
bool HasInterruptCondition( int condition )
|
||||
{
|
||||
if ( condition >= ID_SPACE_OFFSET && condition < ID_SPACE_OFFSET + 10000 ) // it's local to us
|
||||
condition = GetClassScheduleIdSpace()->ConditionLocalToGlobal( condition );
|
||||
return GetOuter()->HasInterruptCondition( condition );
|
||||
return this->GetOuter()->HasInterruptCondition( condition );
|
||||
}
|
||||
|
||||
void ClearCondition( int condition )
|
||||
{
|
||||
if ( condition >= ID_SPACE_OFFSET && condition < ID_SPACE_OFFSET + 10000 ) // it's local to us
|
||||
condition = GetClassScheduleIdSpace()->ConditionLocalToGlobal( condition );
|
||||
GetOuter()->ClearCondition( condition );
|
||||
this->GetOuter()->ClearCondition( condition );
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -298,7 +302,7 @@ protected:
|
||||
}
|
||||
virtual CAI_ClassScheduleIdSpace *GetClassScheduleIdSpace()
|
||||
{
|
||||
return GetOuter()->GetClassScheduleIdSpace();
|
||||
return this->GetOuter()->GetClassScheduleIdSpace();
|
||||
}
|
||||
|
||||
static CAI_ClassScheduleIdSpace &AccessClassScheduleIdSpaceDirect()
|
||||
@ -968,7 +972,7 @@ inline void CAI_BehaviorHost<BASE_NPC>::ChangeBehaviorTo( CAI_BehaviorBase *pNew
|
||||
if ( pOldBehavior )
|
||||
{
|
||||
pOldBehavior->EndScheduleSelection();
|
||||
VacateStrategySlot();
|
||||
this->VacateStrategySlot();
|
||||
}
|
||||
|
||||
OnChangeRunningBehavior( pOldBehavior, pNewBehavior );
|
||||
|
@ -169,7 +169,7 @@ void CAI_AssaultBehavior::ClearAssaultPoint( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
DevMsg("**ERROR: Can't find next assault point: %s\n", m_hAssaultPoint->m_NextAssaultPointName );
|
||||
DevMsg("**ERROR: Can't find next assault point: %s\n", STRING(m_hAssaultPoint->m_NextAssaultPointName) );
|
||||
|
||||
// Bomb out of assault behavior.
|
||||
m_AssaultCue = CUE_NO_ASSAULT;
|
||||
@ -785,7 +785,7 @@ void CAI_AssaultBehavior::SetParameters( string_t rallypointname, AssaultCue_t a
|
||||
|
||||
if( !pBest )
|
||||
{
|
||||
DevMsg("%s Didn't find a best rally point!\n", GetOuter()->GetEntityName() );
|
||||
DevMsg("%s Didn't find a best rally point!\n", STRING(GetOuter()->GetEntityName()) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -887,6 +887,8 @@ bool CAI_AssaultBehavior::PollAssaultCue( void )
|
||||
// Player told me to go, so go!
|
||||
return m_ReceivedAssaultCue == CUE_COMMANDER;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -2289,7 +2289,7 @@ AI_FollowFormation_t *AIGetFormation( AI_Formations_t formation )
|
||||
{
|
||||
if ( formation < 0 )
|
||||
formation = (AI_Formations_t)0;
|
||||
else if ( formation >= ARRAYSIZE( g_AI_Formations ) )
|
||||
else if ( static_cast<size_t>(formation) >= ARRAYSIZE( g_AI_Formations ) )
|
||||
formation = (AI_Formations_t)(ARRAYSIZE( g_AI_Formations ) - 1 );
|
||||
|
||||
return g_AI_Formations[formation];
|
||||
|
@ -51,10 +51,10 @@ END_DATADESC();
|
||||
//-----------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
CAI_PassengerBehavior::CAI_PassengerBehavior( void ) :
|
||||
m_bEnabled( false ),
|
||||
m_hVehicle( NULL ),
|
||||
CAI_PassengerBehavior::CAI_PassengerBehavior( void ) :
|
||||
m_PassengerState( PASSENGER_STATE_OUTSIDE ),
|
||||
m_hVehicle( NULL ),
|
||||
m_bEnabled( false ),
|
||||
m_PassengerIntent( PASSENGER_INTENT_NONE ),
|
||||
m_nTransitionSequence( -1 )
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ void CRopeAnchor::Spawn()
|
||||
flDist = fabs( GetOwnerEntity()->GetAbsOrigin().z - GetAbsOrigin().z );
|
||||
}
|
||||
|
||||
m_hRope = CRopeKeyframe::CreateWithSecondPointDetached( this, -1, flDist, RAPPEL_ROPE_WIDTH, "cable/cable.vmt", 5, true );
|
||||
m_hRope = CRopeKeyframe::CreateWithSecondPointDetached( this, -1, static_cast<int>(flDist), RAPPEL_ROPE_WIDTH, "cable/cable.vmt", 5, true );
|
||||
|
||||
ASSERT( m_hRope != NULL );
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ void CAI_MappedActivityBehavior_Temporary::UpdateTranslateActivityMap()
|
||||
|
||||
CBaseCombatWeapon *pWeapon = GetOuter()->GetActiveWeapon();
|
||||
const char *pszWeaponClass = ( pWeapon ) ? pWeapon->GetClassname() : "";
|
||||
for ( int i = 0; i < ARRAYSIZE(mappings); i++ )
|
||||
for ( size_t i = 0; i < ARRAYSIZE(mappings); i++ )
|
||||
{
|
||||
if ( !mappings[i].pszWeapon || stricmp( mappings[i].pszWeapon, pszWeaponClass ) == 0 )
|
||||
{
|
||||
|
@ -961,7 +961,7 @@ int CAI_BlendedMotor::BuildInsertNode( int i, float flTime )
|
||||
|
||||
Assert( flTime > 0.0 );
|
||||
|
||||
for (i; i < m_scriptTurn.Count() - 1; i++)
|
||||
for (; i < m_scriptTurn.Count() - 1; i++)
|
||||
{
|
||||
if (m_scriptTurn[i].flTime < flTime)
|
||||
{
|
||||
@ -1203,12 +1203,8 @@ void CAI_BlendedMotor::BuildVelocityScript( const AILocalMoveGoal_t &move )
|
||||
script.flMaxVelocity = 0;
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case NAV_FLY:
|
||||
// FIXME: can there be a NAV_GROUND -> NAV_FLY transition?
|
||||
script.flMaxVelocity = 0;
|
||||
default:
|
||||
break;
|
||||
*/
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -212,8 +212,8 @@ class CAI_BlendingHost : public BASE_NPC
|
||||
{
|
||||
DECLARE_CLASS_NOFRIEND( CAI_BlendingHost, BASE_NPC );
|
||||
public:
|
||||
const CAI_BlendedMotor *GetBlendedMotor() const { return assert_cast<const CAI_BlendedMotor *>(GetMotor()); }
|
||||
CAI_BlendedMotor * GetBlendedMotor() { return assert_cast<CAI_BlendedMotor *>(GetMotor()); }
|
||||
const CAI_BlendedMotor *GetBlendedMotor() const { return assert_cast<const CAI_BlendedMotor *>(this->GetMotor()); }
|
||||
CAI_BlendedMotor * GetBlendedMotor() { return assert_cast<CAI_BlendedMotor *>(this->GetMotor()); }
|
||||
|
||||
CAI_Motor *CreateMotor()
|
||||
{
|
||||
@ -230,7 +230,7 @@ public:
|
||||
|
||||
float MaxYawSpeed( void )
|
||||
{
|
||||
float override = GetBlendedMotor()->OverrideMaxYawSpeed( GetActivity() );
|
||||
float override = GetBlendedMotor()->OverrideMaxYawSpeed( this->GetActivity() );
|
||||
if ( override != -1 )
|
||||
return override;
|
||||
return BaseClass::MaxYawSpeed();
|
||||
|
@ -329,6 +329,8 @@ int CAI_BaseNPC::TranslateSchedule( int scheduleType )
|
||||
return SCHED_ALERT_WALK;
|
||||
case NPC_STATE_COMBAT:
|
||||
return SCHED_COMBAT_WALK;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1,121 +1,121 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: A link that can be turned on and off. Unlike normal links
|
||||
// dyanimc links must be entities so they and receive messages.
|
||||
// They update the state of the actual links. Allows us to save
|
||||
// a lot of memory by not making all links into entities
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_DYNAMICLINK_H
|
||||
#define AI_DYNAMICLINK_H
|
||||
#pragma once
|
||||
|
||||
enum DynamicLinkState_t
|
||||
{
|
||||
LINK_OFF = 0,
|
||||
LINK_ON = 1,
|
||||
};
|
||||
|
||||
class CAI_Link;
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_DynanicLink
|
||||
//=============================================================================
|
||||
class CAI_DynamicLink : public CServerOnlyEntity
|
||||
{
|
||||
DECLARE_CLASS( CAI_DynamicLink, CServerOnlyEntity );
|
||||
public:
|
||||
static void InitDynamicLinks(void);
|
||||
static void ResetDynamicLinks(void);
|
||||
static void PurgeDynamicLinks(void);
|
||||
static void GenerateControllerLinks();
|
||||
|
||||
static bool gm_bInitialized;
|
||||
|
||||
static CAI_DynamicLink* GetDynamicLink(int nSrcID, int nDstID);
|
||||
|
||||
static CAI_DynamicLink* m_pAllDynamicLinks; // A linked list of all dynamic link
|
||||
CAI_DynamicLink* m_pNextDynamicLink; // The next dynamic link in the list of dynamic links
|
||||
|
||||
int m_nSrcEditID; // the node that 'owns' this link
|
||||
int m_nDestEditID; // the node on the other end of the link.
|
||||
|
||||
int m_nSrcID; // the node that 'owns' this link
|
||||
int m_nDestID; // the node on the other end of the link.
|
||||
DynamicLinkState_t m_nLinkState; //
|
||||
string_t m_strAllowUse;
|
||||
|
||||
bool m_bFixedUpIds;
|
||||
bool m_bNotSaved;
|
||||
int m_nLinkType;
|
||||
|
||||
void SetLinkState( void );
|
||||
bool IsLinkValid( void );
|
||||
|
||||
CAI_Link * FindLink();
|
||||
|
||||
int ObjectCaps();
|
||||
|
||||
// ----------------
|
||||
// Inputs
|
||||
// ----------------
|
||||
void InputTurnOn( inputdata_t &inputdata );
|
||||
void InputTurnOff( inputdata_t &inputdata );
|
||||
|
||||
DECLARE_DATADESC();
|
||||
|
||||
CAI_DynamicLink();
|
||||
~CAI_DynamicLink();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_DynanicLinkVolume
|
||||
//=============================================================================
|
||||
class CAI_DynamicLinkController : public CServerOnlyEntity
|
||||
{
|
||||
DECLARE_CLASS( CAI_DynamicLinkController, CServerOnlyEntity );
|
||||
public:
|
||||
void GenerateLinksFromVolume();
|
||||
|
||||
// ----------------
|
||||
// Inputs
|
||||
// ----------------
|
||||
void InputTurnOn( inputdata_t &inputdata );
|
||||
void InputTurnOff( inputdata_t &inputdata );
|
||||
|
||||
CUtlVector< CHandle<CAI_DynamicLink> > m_ControlledLinks;
|
||||
DynamicLinkState_t m_nLinkState; //
|
||||
string_t m_strAllowUse;
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
class CAI_RadialLinkController : public CBaseEntity
|
||||
{
|
||||
DECLARE_CLASS( CAI_RadialLinkController, CBaseEntity );
|
||||
|
||||
public:
|
||||
void Spawn();
|
||||
void Activate();
|
||||
void PollMotionThink();
|
||||
void ModifyNodeLinks( bool bMakeStale );
|
||||
|
||||
public:
|
||||
float m_flRadius;
|
||||
Vector m_vecAtRestOrigin;
|
||||
bool m_bAtRest;
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
#endif // AI_DYNAMICLINK_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: A link that can be turned on and off. Unlike normal links
|
||||
// dyanimc links must be entities so they and receive messages.
|
||||
// They update the state of the actual links. Allows us to save
|
||||
// a lot of memory by not making all links into entities
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_DYNAMICLINK_H
|
||||
#define AI_DYNAMICLINK_H
|
||||
#pragma once
|
||||
|
||||
enum DynamicLinkState_t
|
||||
{
|
||||
LINK_OFF = 0,
|
||||
LINK_ON = 1,
|
||||
};
|
||||
|
||||
class CAI_Link;
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_DynanicLink
|
||||
//=============================================================================
|
||||
class CAI_DynamicLink : public CServerOnlyEntity
|
||||
{
|
||||
DECLARE_CLASS( CAI_DynamicLink, CServerOnlyEntity );
|
||||
public:
|
||||
static void InitDynamicLinks(void);
|
||||
static void ResetDynamicLinks(void);
|
||||
static void PurgeDynamicLinks(void);
|
||||
static void GenerateControllerLinks();
|
||||
|
||||
static bool gm_bInitialized;
|
||||
|
||||
static CAI_DynamicLink* GetDynamicLink(int nSrcID, int nDstID);
|
||||
|
||||
static CAI_DynamicLink* m_pAllDynamicLinks; // A linked list of all dynamic link
|
||||
CAI_DynamicLink* m_pNextDynamicLink; // The next dynamic link in the list of dynamic links
|
||||
|
||||
int m_nSrcEditID; // the node that 'owns' this link
|
||||
int m_nDestEditID; // the node on the other end of the link.
|
||||
|
||||
int m_nSrcID; // the node that 'owns' this link
|
||||
int m_nDestID; // the node on the other end of the link.
|
||||
DynamicLinkState_t m_nLinkState; //
|
||||
string_t m_strAllowUse;
|
||||
|
||||
bool m_bFixedUpIds;
|
||||
bool m_bNotSaved;
|
||||
int m_nLinkType;
|
||||
|
||||
void SetLinkState( void );
|
||||
bool IsLinkValid( void );
|
||||
|
||||
CAI_Link * FindLink();
|
||||
|
||||
int ObjectCaps();
|
||||
|
||||
// ----------------
|
||||
// Inputs
|
||||
// ----------------
|
||||
void InputTurnOn( inputdata_t &inputdata );
|
||||
void InputTurnOff( inputdata_t &inputdata );
|
||||
|
||||
DECLARE_DATADESC();
|
||||
|
||||
CAI_DynamicLink();
|
||||
~CAI_DynamicLink();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_DynanicLinkVolume
|
||||
//=============================================================================
|
||||
class CAI_DynamicLinkController : public CServerOnlyEntity
|
||||
{
|
||||
DECLARE_CLASS( CAI_DynamicLinkController, CServerOnlyEntity );
|
||||
public:
|
||||
void GenerateLinksFromVolume();
|
||||
|
||||
// ----------------
|
||||
// Inputs
|
||||
// ----------------
|
||||
void InputTurnOn( inputdata_t &inputdata );
|
||||
void InputTurnOff( inputdata_t &inputdata );
|
||||
|
||||
CUtlVector< CHandle<CAI_DynamicLink> > m_ControlledLinks;
|
||||
DynamicLinkState_t m_nLinkState; //
|
||||
string_t m_strAllowUse;
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
class CAI_RadialLinkController : public CBaseEntity
|
||||
{
|
||||
DECLARE_CLASS( CAI_RadialLinkController, CBaseEntity );
|
||||
|
||||
public:
|
||||
void Spawn();
|
||||
void Activate();
|
||||
void PollMotionThink();
|
||||
void ModifyNodeLinks( bool bMakeStale );
|
||||
|
||||
public:
|
||||
float m_flRadius;
|
||||
Vector m_vecAtRestOrigin;
|
||||
bool m_bAtRest;
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
#endif // AI_DYNAMICLINK_H
|
||||
|
@ -1,47 +1,47 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: AI system that makes NPCs verbally respond to game events
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_EVENTRESPONSE_H
|
||||
#define AI_EVENTRESPONSE_H
|
||||
|
||||
#include "utldict.h"
|
||||
|
||||
#define NPCEVENTRESPONSE_DISTANCE_SQR (768 * 768) // Maximum distance for responding to NPCs
|
||||
#define NPCEVENTRESPONSE_REFIRE_TIME 15.0 // Time after giving a response before giving any more
|
||||
#define NPCEVENTRESPONSE_GIVEUP_TIME 4.0 // Time after a response trigger was fired before discarding it without responding
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: AI system that makes NPCs verbally respond to game events
|
||||
//-----------------------------------------------------------------------------
|
||||
class CNPCEventResponseSystem : public CAutoGameSystemPerFrame
|
||||
{
|
||||
public:
|
||||
CNPCEventResponseSystem( char const *name ) : CAutoGameSystemPerFrame( name )
|
||||
{
|
||||
}
|
||||
|
||||
void LevelInitPreEntity();
|
||||
void FrameUpdatePreEntityThink();
|
||||
void TriggerEvent( const char *pResponse, bool bForce = false );
|
||||
|
||||
private:
|
||||
float m_flNextEventPoll;
|
||||
|
||||
struct storedevent_t
|
||||
{
|
||||
float flEventTime;
|
||||
float flNextResponseTime;
|
||||
bool bForce;
|
||||
bool bPreventExpiration;
|
||||
};
|
||||
|
||||
typedef CUtlDict< storedevent_t, int > EventMap;
|
||||
EventMap m_ActiveEvents;
|
||||
};
|
||||
|
||||
CNPCEventResponseSystem *NPCEventResponse();
|
||||
|
||||
#endif // AI_EVENTRESPONSE_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: AI system that makes NPCs verbally respond to game events
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_EVENTRESPONSE_H
|
||||
#define AI_EVENTRESPONSE_H
|
||||
|
||||
#include "utldict.h"
|
||||
|
||||
#define NPCEVENTRESPONSE_DISTANCE_SQR (768 * 768) // Maximum distance for responding to NPCs
|
||||
#define NPCEVENTRESPONSE_REFIRE_TIME 15.0 // Time after giving a response before giving any more
|
||||
#define NPCEVENTRESPONSE_GIVEUP_TIME 4.0 // Time after a response trigger was fired before discarding it without responding
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: AI system that makes NPCs verbally respond to game events
|
||||
//-----------------------------------------------------------------------------
|
||||
class CNPCEventResponseSystem : public CAutoGameSystemPerFrame
|
||||
{
|
||||
public:
|
||||
CNPCEventResponseSystem( char const *name ) : CAutoGameSystemPerFrame( name )
|
||||
{
|
||||
}
|
||||
|
||||
void LevelInitPreEntity();
|
||||
void FrameUpdatePreEntityThink();
|
||||
void TriggerEvent( const char *pResponse, bool bForce = false );
|
||||
|
||||
private:
|
||||
float m_flNextEventPoll;
|
||||
|
||||
struct storedevent_t
|
||||
{
|
||||
float flEventTime;
|
||||
float flNextResponseTime;
|
||||
bool bForce;
|
||||
bool bPreventExpiration;
|
||||
};
|
||||
|
||||
typedef CUtlDict< storedevent_t, int > EventMap;
|
||||
EventMap m_ActiveEvents;
|
||||
};
|
||||
|
||||
CNPCEventResponseSystem *NPCEventResponse();
|
||||
|
||||
#endif // AI_EVENTRESPONSE_H
|
||||
|
@ -311,7 +311,7 @@ int CAI_HintManager::FindAllHints( CAI_BaseNPC *pNPC, const Vector &position, co
|
||||
// If we have no hints, bail
|
||||
int c = CAI_HintManager::gm_AllHints.Count();
|
||||
if ( !c )
|
||||
return NULL;
|
||||
return 0;
|
||||
|
||||
// Remove the nearest flag. It makes now sense with random.
|
||||
bool hadNearest = hintCriteria.HasFlag( bits_HINT_NODE_NEAREST );
|
||||
@ -682,7 +682,7 @@ int CAI_HintManager::GetFlags( const char *token )
|
||||
|
||||
char *lowercase = (char *)_alloca( len + 1 );
|
||||
Q_strncpy( lowercase, token, len+1 );
|
||||
strlwr( lowercase );
|
||||
Q_strlower( lowercase );
|
||||
|
||||
if ( strstr( "none", lowercase ) )
|
||||
{
|
||||
@ -1003,6 +1003,8 @@ bool CAI_Hint::IsViewable(void)
|
||||
{
|
||||
case HINT_WORLD_VISUALLY_INTERESTING:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1551,7 +1553,7 @@ hinttypedescs_t g_pszHintDescriptions[] =
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *GetHintTypeDescription( Hint_e iHintType )
|
||||
{
|
||||
for ( int i = 0; i < ARRAYSIZE(g_pszHintDescriptions); i++ )
|
||||
for ( size_t i = 0; i < ARRAYSIZE(g_pszHintDescriptions); i++ )
|
||||
{
|
||||
if ( g_pszHintDescriptions[i].iType == iHintType )
|
||||
return g_pszHintDescriptions[i].pszDesc;
|
||||
@ -1581,7 +1583,7 @@ void CC_ai_drop_hint( void )
|
||||
{
|
||||
Msg("Invalid hint type specified. Format: ai_drop_hint <hint type>\nValid hint types:\n");
|
||||
|
||||
for ( int i = 0; i < ARRAYSIZE(g_pszHintDescriptions); i++ )
|
||||
for ( size_t i = 0; i < ARRAYSIZE(g_pszHintDescriptions); i++ )
|
||||
{
|
||||
Msg("%d : %s\n", g_pszHintDescriptions[i].iType, g_pszHintDescriptions[i].pszDesc );
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
struct ai_hull_t
|
||||
{
|
||||
ai_hull_t( int bit, const char *pName, const Vector &_mins, const Vector &_maxs, const Vector &_smallMins, const Vector &_smallMaxs )
|
||||
: hullBit( bit ), mins( _mins ), maxs( _maxs ), smallMins( _smallMins ), smallMaxs( _smallMaxs ), name( pName ) {}
|
||||
: hullBit( bit ), name( pName ), mins( _mins ), maxs( _maxs ), smallMins( _smallMins ), smallMaxs( _smallMaxs ) {}
|
||||
int hullBit;
|
||||
const char* name;
|
||||
|
||||
|
150
dlls/ai_hull.h
150
dlls/ai_hull.h
@ -1,75 +1,75 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_HULL_H
|
||||
#define AI_HULL_H
|
||||
#pragma once
|
||||
|
||||
class Vector;
|
||||
//=========================================================
|
||||
// Link Properties. These hulls must correspond to the hulls
|
||||
// in AI_Hull.cpp!
|
||||
//=========================================================
|
||||
enum Hull_t
|
||||
{
|
||||
HULL_HUMAN, // Combine, Stalker, Zombie...
|
||||
HULL_SMALL_CENTERED, // Scanner
|
||||
HULL_WIDE_HUMAN, // Vortigaunt
|
||||
HULL_TINY, // Headcrab
|
||||
HULL_WIDE_SHORT, // Bullsquid
|
||||
HULL_MEDIUM, // Cremator
|
||||
HULL_TINY_CENTERED, // Manhack
|
||||
HULL_LARGE, // Antlion Guard
|
||||
HULL_LARGE_CENTERED, // Mortar Synth
|
||||
HULL_MEDIUM_TALL, // Ministrider
|
||||
//--------------------------------------------
|
||||
NUM_HULLS,
|
||||
HULL_NONE // No Hull (appears after num hulls as we don't want to count it)
|
||||
};
|
||||
|
||||
enum Hull_Bits_t
|
||||
{
|
||||
bits_HUMAN_HULL = 0x00000001,
|
||||
bits_SMALL_CENTERED_HULL = 0x00000002,
|
||||
bits_WIDE_HUMAN_HULL = 0x00000004,
|
||||
bits_TINY_HULL = 0x00000008,
|
||||
bits_WIDE_SHORT_HULL = 0x00000010,
|
||||
bits_MEDIUM_HULL = 0x00000020,
|
||||
bits_TINY_CENTERED_HULL = 0x00000040,
|
||||
bits_LARGE_HULL = 0x00000080,
|
||||
bits_LARGE_CENTERED_HULL = 0x00000100,
|
||||
bits_MEDIUM_TALL_HULL = 0x00000200,
|
||||
bits_HULL_BITS_MASK = 0x000002ff,
|
||||
};
|
||||
|
||||
inline int HullToBit( Hull_t hull )
|
||||
{
|
||||
return ( 1 << hull );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_Hull
|
||||
//=============================================================================
|
||||
namespace NAI_Hull
|
||||
{
|
||||
const Vector &Mins(int id);
|
||||
const Vector &Maxs(int id);
|
||||
|
||||
const Vector &SmallMins(int id);
|
||||
const Vector &SmallMaxs(int id);
|
||||
|
||||
float Length(int id);
|
||||
float Width(int id);
|
||||
float Height(int id);
|
||||
|
||||
int Bits(int id);
|
||||
|
||||
const char* Name(int id);
|
||||
|
||||
Hull_t LookupId(const char *szName);
|
||||
};
|
||||
|
||||
#endif // AI_HULL_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_HULL_H
|
||||
#define AI_HULL_H
|
||||
#pragma once
|
||||
|
||||
class Vector;
|
||||
//=========================================================
|
||||
// Link Properties. These hulls must correspond to the hulls
|
||||
// in AI_Hull.cpp!
|
||||
//=========================================================
|
||||
enum Hull_t
|
||||
{
|
||||
HULL_HUMAN, // Combine, Stalker, Zombie...
|
||||
HULL_SMALL_CENTERED, // Scanner
|
||||
HULL_WIDE_HUMAN, // Vortigaunt
|
||||
HULL_TINY, // Headcrab
|
||||
HULL_WIDE_SHORT, // Bullsquid
|
||||
HULL_MEDIUM, // Cremator
|
||||
HULL_TINY_CENTERED, // Manhack
|
||||
HULL_LARGE, // Antlion Guard
|
||||
HULL_LARGE_CENTERED, // Mortar Synth
|
||||
HULL_MEDIUM_TALL, // Ministrider
|
||||
//--------------------------------------------
|
||||
NUM_HULLS,
|
||||
HULL_NONE // No Hull (appears after num hulls as we don't want to count it)
|
||||
};
|
||||
|
||||
enum Hull_Bits_t
|
||||
{
|
||||
bits_HUMAN_HULL = 0x00000001,
|
||||
bits_SMALL_CENTERED_HULL = 0x00000002,
|
||||
bits_WIDE_HUMAN_HULL = 0x00000004,
|
||||
bits_TINY_HULL = 0x00000008,
|
||||
bits_WIDE_SHORT_HULL = 0x00000010,
|
||||
bits_MEDIUM_HULL = 0x00000020,
|
||||
bits_TINY_CENTERED_HULL = 0x00000040,
|
||||
bits_LARGE_HULL = 0x00000080,
|
||||
bits_LARGE_CENTERED_HULL = 0x00000100,
|
||||
bits_MEDIUM_TALL_HULL = 0x00000200,
|
||||
bits_HULL_BITS_MASK = 0x000002ff,
|
||||
};
|
||||
|
||||
inline int HullToBit( Hull_t hull )
|
||||
{
|
||||
return ( 1 << hull );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_Hull
|
||||
//=============================================================================
|
||||
namespace NAI_Hull
|
||||
{
|
||||
const Vector &Mins(int id);
|
||||
const Vector &Maxs(int id);
|
||||
|
||||
const Vector &SmallMins(int id);
|
||||
const Vector &SmallMaxs(int id);
|
||||
|
||||
float Length(int id);
|
||||
float Width(int id);
|
||||
float Height(int id);
|
||||
|
||||
int Bits(int id);
|
||||
|
||||
const char* Name(int id);
|
||||
|
||||
Hull_t LookupId(const char *szName);
|
||||
};
|
||||
|
||||
#endif // AI_HULL_H
|
||||
|
@ -1,47 +1,47 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
#pragma once
|
||||
#ifndef AI_LOOKTARGET_H
|
||||
#define AI_LOOKTARGET_H
|
||||
|
||||
#define SF_LOOKTARGET_ONLYONCE 0x00000001
|
||||
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
class CAI_LookTarget : public CPointEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CAI_LookTarget, CPointEntity );
|
||||
DECLARE_DATADESC();
|
||||
|
||||
CAI_LookTarget() { m_flTimeNextAvailable = -1; }
|
||||
|
||||
// Debugging
|
||||
int DrawDebugTextOverlays(void);
|
||||
|
||||
// Accessors & Availability
|
||||
bool IsEligible( CBaseEntity *pLooker );
|
||||
bool IsEnabled() { return !m_bDisabled; }
|
||||
bool IsAvailable() { return (gpGlobals->curtime > m_flTimeNextAvailable); }
|
||||
void Reserve( float flDuration );
|
||||
|
||||
// Searching
|
||||
static CAI_LookTarget *GetFirstLookTarget();
|
||||
static CAI_LookTarget *GetNextLookTarget( CAI_LookTarget *pCurrentTarget );
|
||||
|
||||
int m_iContext;
|
||||
int m_iPriority;
|
||||
|
||||
void Enable() { m_bDisabled = false; }
|
||||
void Disable() { m_bDisabled = true; }
|
||||
|
||||
private:
|
||||
bool m_bDisabled;
|
||||
float m_flTimeNextAvailable;
|
||||
float m_flMaxDist;
|
||||
};
|
||||
|
||||
#endif//AI_LOOKTARGET_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
#pragma once
|
||||
#ifndef AI_LOOKTARGET_H
|
||||
#define AI_LOOKTARGET_H
|
||||
|
||||
#define SF_LOOKTARGET_ONLYONCE 0x00000001
|
||||
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
class CAI_LookTarget : public CPointEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CAI_LookTarget, CPointEntity );
|
||||
DECLARE_DATADESC();
|
||||
|
||||
CAI_LookTarget() { m_flTimeNextAvailable = -1; }
|
||||
|
||||
// Debugging
|
||||
int DrawDebugTextOverlays(void);
|
||||
|
||||
// Accessors & Availability
|
||||
bool IsEligible( CBaseEntity *pLooker );
|
||||
bool IsEnabled() { return !m_bDisabled; }
|
||||
bool IsAvailable() { return (gpGlobals->curtime > m_flTimeNextAvailable); }
|
||||
void Reserve( float flDuration );
|
||||
|
||||
// Searching
|
||||
static CAI_LookTarget *GetFirstLookTarget();
|
||||
static CAI_LookTarget *GetNextLookTarget( CAI_LookTarget *pCurrentTarget );
|
||||
|
||||
int m_iContext;
|
||||
int m_iPriority;
|
||||
|
||||
void Enable() { m_bDisabled = false; }
|
||||
void Disable() { m_bDisabled = true; }
|
||||
|
||||
private:
|
||||
bool m_bDisabled;
|
||||
float m_flTimeNextAvailable;
|
||||
float m_flMaxDist;
|
||||
};
|
||||
|
||||
#endif//AI_LOOKTARGET_H
|
||||
|
1284
dlls/ai_memory.cpp
1284
dlls/ai_memory.cpp
File diff suppressed because it is too large
Load Diff
@ -118,3 +118,4 @@ private:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif // AI_MEMORY_H
|
||||
|
||||
|
@ -34,14 +34,19 @@ void DebugNoteMovementFailure()
|
||||
}
|
||||
|
||||
// a place to put breakpoints
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4189)
|
||||
#endif
|
||||
|
||||
AIMoveResult_t DbgResult( AIMoveResult_t result )
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
if ( result < AIMR_OK )
|
||||
{
|
||||
int breakHere = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch ( result )
|
||||
{
|
||||
@ -750,7 +755,7 @@ void CAI_Motor::UpdateYaw( int yawSpeed )
|
||||
float ideal, current, newYaw;
|
||||
|
||||
if ( yawSpeed == -1 )
|
||||
yawSpeed = GetYawSpeed();
|
||||
yawSpeed = static_cast<int>(GetYawSpeed());
|
||||
|
||||
// NOTE: GetIdealYaw() will never exactly be reached because UTIL_AngleMod
|
||||
// also truncates the angle to 16 bits of resolution. So lets truncate it here.
|
||||
@ -908,7 +913,7 @@ AIMoveResult_t CAI_Motor::MoveNormalExecute( const AILocalMoveGoal_t &move )
|
||||
AIMR_BLOCKED_WORLD, // AIM_PARTIAL_HIT_WORLD
|
||||
AIMR_BLOCKED_WORLD, // AIM_PARTIAL_HIT_TARGET
|
||||
};
|
||||
Assert( ARRAYSIZE( moveResults ) == AIM_NUM_RESULTS && fMotorResult >= 0 && fMotorResult <= ARRAYSIZE( moveResults ) );
|
||||
Assert( (AIMotorMoveResult_t)ARRAYSIZE( moveResults ) == AIM_NUM_RESULTS && fMotorResult >= 0 && fMotorResult <= (AIMotorMoveResult_t)ARRAYSIZE( moveResults ) );
|
||||
|
||||
AIMoveResult_t result = moveResults[fMotorResult];
|
||||
|
||||
@ -1015,4 +1020,3 @@ void CAI_Motor::SetMoveType( MoveType_t val, MoveCollide_t moveCollide )
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
@ -220,3 +220,4 @@ public:
|
||||
//=============================================================================
|
||||
|
||||
#endif // AI_MOTOR_H
|
||||
|
||||
|
@ -154,3 +154,4 @@ inline bool CAI_MoveProbe::TestGroundMove( const Vector &vecActualStart, const V
|
||||
}
|
||||
|
||||
#endif // AI_MOVEPROBE_H
|
||||
|
||||
|
@ -138,6 +138,8 @@ void CAI_MoveAndShootOverlay::UpdateMoveShootActivity( bool bMoveAimAtEnemy )
|
||||
case ACT_RUN:
|
||||
newActivity = ACT_RUN_AIM;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -150,6 +152,8 @@ void CAI_MoveAndShootOverlay::UpdateMoveShootActivity( bool bMoveAimAtEnemy )
|
||||
case ACT_RUN_AIM:
|
||||
newActivity = ACT_RUN;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ bool CAI_MoveSolver::Solve( const AI_MoveSuggestion_t *pSuggestions, int nSugges
|
||||
AI_MoveSuggestion_t *pHighSuggestion;
|
||||
};
|
||||
|
||||
Solution_t solutions[NUM_SOLUTIONS] = { 0 };
|
||||
Solution_t solutions[NUM_SOLUTIONS] = { {0.0f, 0.0f, NULL} };
|
||||
|
||||
//---------------------------------
|
||||
|
||||
@ -133,15 +133,15 @@ bool CAI_MoveSolver::Solve( const AI_MoveSuggestion_t *pSuggestions, int nSugges
|
||||
|
||||
// Convert arc values to solution indices relative to right post. Right is angle down, left is angle up.
|
||||
float halfSpan = current.arc.span * 0.5;
|
||||
int center = round( ( halfSpan * NUM_SOLUTIONS ) / 360 );
|
||||
int left = ( current.arc.span * NUM_SOLUTIONS ) / 360;
|
||||
int center = static_cast<int>(round( ( halfSpan * NUM_SOLUTIONS ) / 360 ));
|
||||
int left = static_cast<int>(( current.arc.span * NUM_SOLUTIONS ) / 360);
|
||||
|
||||
float angRight = current.arc.center - halfSpan;
|
||||
|
||||
if (angRight < 0.0)
|
||||
angRight += 360;
|
||||
|
||||
int base = ( angRight * NUM_SOLUTIONS ) / 360;
|
||||
int base = static_cast<int>(( angRight * NUM_SOLUTIONS ) / 360);
|
||||
|
||||
// Sweep from left to right, summing the bias. For positive suggestions,
|
||||
// the bias is further weighted to favor the center of the arc.
|
||||
|
@ -90,12 +90,12 @@ int CAI_GlobalNamespace::NextGlobalBase() const
|
||||
//
|
||||
|
||||
CAI_LocalIdSpace::CAI_LocalIdSpace( bool fIsRoot )
|
||||
: m_pGlobalNamespace( NULL ),
|
||||
m_pParentIDSpace( NULL ),
|
||||
m_globalBase( (fIsRoot) ? 0 : -1 ),
|
||||
: m_globalBase( (fIsRoot) ? 0 : -1 ),
|
||||
m_localBase( (fIsRoot) ? 0 : MAX_STRING_INDEX ),
|
||||
m_localTop( -1 ),
|
||||
m_globalTop( -1 )
|
||||
m_globalTop( -1 ),
|
||||
m_pParentIDSpace( NULL ),
|
||||
m_pGlobalNamespace( NULL )
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -1116,7 +1116,6 @@ float CAI_Navigator::GetPathTimeToGoal()
|
||||
|
||||
AI_PathNode_t CAI_Navigator::GetNearestNode()
|
||||
{
|
||||
COMPILE_TIME_ASSERT( (int)AIN_NO_NODE == NO_NODE );
|
||||
return (AI_PathNode_t)( GetPathfinder()->NearestNodeToNPC() );
|
||||
}
|
||||
|
||||
@ -2159,6 +2158,8 @@ bool CAI_Navigator::PreMove()
|
||||
GetMotor()->MoveJumpStop();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
SetNavType( NAV_GROUND );
|
||||
@ -2364,6 +2365,8 @@ bool CAI_Navigator::Move( float flInterval )
|
||||
case NAV_FLY:
|
||||
OnMoveBlocked( &moveResult );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3625,6 +3628,8 @@ bool CAI_Navigator::DoFindPath( void )
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return returnCode;
|
||||
@ -3927,18 +3932,18 @@ void CAI_Navigator::DrawDebugRouteOverlay(void)
|
||||
if (waypoint)
|
||||
{
|
||||
Vector RGB = GetRouteColor(waypoint->NavType(), waypoint->Flags());
|
||||
NDebugOverlay::Line(GetLocalOrigin(), waypoint->GetPos(), RGB[0],RGB[1],RGB[2], true,0);
|
||||
NDebugOverlay::Line(GetLocalOrigin(), waypoint->GetPos(), static_cast<int>(RGB[0]),static_cast<int>(RGB[1]),static_cast<int>(RGB[2]), true,0);
|
||||
}
|
||||
|
||||
while (waypoint)
|
||||
{
|
||||
Vector RGB = GetWaypointColor(waypoint->NavType());
|
||||
NDebugOverlay::Box(waypoint->GetPos(), Vector(-3,-3,-3),Vector(3,3,3), RGB[0],RGB[1],RGB[2], true,0);
|
||||
NDebugOverlay::Box(waypoint->GetPos(), Vector(-3,-3,-3),Vector(3,3,3), static_cast<int>(RGB[0]),static_cast<int>(RGB[1]),static_cast<int>(RGB[2]), true,0);
|
||||
|
||||
if (waypoint->GetNext())
|
||||
{
|
||||
Vector RGB = GetRouteColor(waypoint->GetNext()->NavType(), waypoint->GetNext()->Flags());
|
||||
NDebugOverlay::Line(waypoint->GetPos(), waypoint->GetNext()->GetPos(),RGB[0],RGB[1],RGB[2], true,0);
|
||||
NDebugOverlay::Line(waypoint->GetPos(), waypoint->GetNext()->GetPos(),static_cast<int>(RGB[0]),static_cast<int>(RGB[1]),static_cast<int>(RGB[2]), true,0);
|
||||
}
|
||||
waypoint = waypoint->GetNext();
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ struct AI_NavGoal_t
|
||||
CBaseEntity * pTarget = AIN_DEF_TARGET);
|
||||
|
||||
//----------------------------------
|
||||
|
||||
|
||||
// What type of goal is this
|
||||
GoalType_t type;
|
||||
|
||||
@ -195,10 +195,6 @@ struct AI_NavGoal_t
|
||||
|
||||
// The activity to use, or none if a previosly set activity should be used
|
||||
Activity activity;
|
||||
|
||||
// The predicted activity used after arrival
|
||||
Activity arrivalActivity;
|
||||
int arrivalSequence;
|
||||
|
||||
// The tolerance of success, or none if a previosly set tolerance should be used
|
||||
float tolerance;
|
||||
@ -209,9 +205,13 @@ struct AI_NavGoal_t
|
||||
|
||||
// Optional flags specifying
|
||||
unsigned flags;
|
||||
|
||||
|
||||
// The target of the navigation, primarily used to ignore the entity in hull and line traces
|
||||
CBaseEntity * pTarget;
|
||||
|
||||
// The predicted activity used after arrival
|
||||
Activity arrivalActivity;
|
||||
int arrivalSequence;
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
|
@ -47,13 +47,13 @@ public:
|
||||
class CNodeFilter : public INodeListFilter
|
||||
{
|
||||
public:
|
||||
CNodeFilter( CAI_BaseNPC *pNPC, const Vector &pos ) : m_pNPC(pNPC), m_pos(pos)
|
||||
CNodeFilter( CAI_BaseNPC *pNPC, const Vector &pos ) : m_pos(pos), m_pNPC(pNPC)
|
||||
{
|
||||
if ( m_pNPC )
|
||||
m_capabilities = m_pNPC->CapabilitiesGet();
|
||||
}
|
||||
|
||||
CNodeFilter( const Vector &pos ) : m_pNPC(NULL), m_pos(pos)
|
||||
CNodeFilter( const Vector &pos ) : m_pos(pos), m_pNPC(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2345,7 +2345,7 @@ void CAI_NetworkBuilder::InitClimbNodePosition(CAI_Network *pNetwork, CAI_Node *
|
||||
{
|
||||
float floorZ = GetFloorZ(origin); // FIXME: don't use this
|
||||
|
||||
if (abs(pNode->GetOrigin().z - floorZ) < 36)
|
||||
if (abs(static_cast<int>(pNode->GetOrigin().z - floorZ)) < 36)
|
||||
{
|
||||
CAI_Node *new_node = pNetwork->AddNode( pNode->GetOrigin(), pNode->m_flYaw );
|
||||
new_node->m_pHint = NULL;
|
||||
|
@ -1241,7 +1241,7 @@ AI_Waypoint_t *CAI_Pathfinder::BuildRadialRoute( const Vector &vStartPos, const
|
||||
vNextPos.y += flRadius * sin( flCurAngle );
|
||||
|
||||
// Build a route from the last position to the current one
|
||||
pNextRoute = BuildLocalRoute( vLastPos, vNextPos, NULL, NULL, NO_NODE, fRouteBits, goalTolerance);
|
||||
pNextRoute = BuildLocalRoute( vLastPos, vNextPos, NULL, 0, NO_NODE, fRouteBits, goalTolerance);
|
||||
|
||||
// If we can't find a route, we failed
|
||||
if ( pNextRoute == NULL )
|
||||
@ -1270,7 +1270,7 @@ AI_Waypoint_t *CAI_Pathfinder::BuildRadialRoute( const Vector &vStartPos, const
|
||||
}
|
||||
|
||||
// Append a path to the final position
|
||||
pLastRoute = BuildLocalRoute( vLastPos, vGoalPos, NULL, NULL, NO_NODE, bAirRoute ? bits_BUILD_FLY : bits_BUILD_GROUND, goalTolerance );
|
||||
pLastRoute = BuildLocalRoute( vLastPos, vGoalPos, NULL, 0, NO_NODE, bAirRoute ? bits_BUILD_FLY : bits_BUILD_GROUND, goalTolerance );
|
||||
if ( pLastRoute == NULL )
|
||||
return NULL;
|
||||
|
||||
@ -1811,9 +1811,9 @@ void CAI_Pathfinder::CTriDebugOverlay::FadeTriOverlayLines(void)
|
||||
{
|
||||
for (int i=0;i<NUM_NPC_DEBUG_OVERLAYS;i++)
|
||||
{
|
||||
m_debugTriOverlayLine[i]->r *= 0.5;
|
||||
m_debugTriOverlayLine[i]->g *= 0.5;
|
||||
m_debugTriOverlayLine[i]->b *= 0.5;
|
||||
m_debugTriOverlayLine[i]->r = static_cast<int>(m_debugTriOverlayLine[i]->r * 0.5);
|
||||
m_debugTriOverlayLine[i]->g = static_cast<int>(m_debugTriOverlayLine[i]->g * 0.5);
|
||||
m_debugTriOverlayLine[i]->b = static_cast<int>(m_debugTriOverlayLine[i]->b * 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,8 +60,8 @@ inline float cube( float f )
|
||||
|
||||
CAI_PlaneSolver::CAI_PlaneSolver( CAI_BaseNPC *pNpc )
|
||||
: m_pNpc( pNpc ),
|
||||
m_fSolvedPrev( false ),
|
||||
m_PrevTarget( FLT_MAX, FLT_MAX, FLT_MAX ),
|
||||
m_fSolvedPrev( false ),
|
||||
m_PrevSolution( 0 ),
|
||||
m_ClosestHaveBeenToCurrent( FLT_MAX ),
|
||||
m_TimeLastProgress( FLT_MAX ),
|
||||
|
@ -137,8 +137,8 @@ private:
|
||||
CircleObstacles_t( const Vector ¢er, float radius, CBaseEntity *pEntity, AI_MoveSuggType_t type )
|
||||
: center(center),
|
||||
radius(radius),
|
||||
hEntity(pEntity),
|
||||
type(type)
|
||||
type(type),
|
||||
hEntity(pEntity)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ static CUtlMap<AIConcept_t, ConceptInfo_t *> g_ConceptInfoMap;
|
||||
static void InitConcepts( void )
|
||||
{
|
||||
g_ConceptInfoMap.SetLessFunc( CaselessStringLessThan );
|
||||
for ( int i = 0; i < ARRAYSIZE(g_ConceptInfos); i++ )
|
||||
for ( size_t i = 0; i < ARRAYSIZE(g_ConceptInfos); i++ )
|
||||
{
|
||||
g_ConceptInfoMap.Insert( g_ConceptInfos[i].concept, &g_ConceptInfos[i] );
|
||||
}
|
||||
@ -158,7 +158,7 @@ void CAI_AllySpeechManager::Spawn()
|
||||
InitConcepts();
|
||||
}
|
||||
|
||||
for ( int i = 0; i < ARRAYSIZE(g_ConceptInfos); i++ )
|
||||
for ( size_t i = 0; i < ARRAYSIZE(g_ConceptInfos); i++ )
|
||||
m_ConceptTimers.Insert( AllocPooledString( g_ConceptInfos[i].concept ), CSimpleSimTimer() );
|
||||
}
|
||||
|
||||
@ -1512,7 +1512,7 @@ bool CAI_PlayerAlly::ShouldSpeakRandom( AIConcept_t concept, int iChance )
|
||||
if ( flModifier < 0.001 )
|
||||
return false;
|
||||
|
||||
iChance = floor( (float)iChance / flModifier );
|
||||
iChance = static_cast<int>(floor( (float)iChance / flModifier ));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ bool CAI_SchedulesManager::LoadSchedulesFromBuffer( const char *prefix, char *pS
|
||||
int taskNum = 0;
|
||||
|
||||
pfile = engine->ParseFile(pfile, token, sizeof( token ) );
|
||||
while ((token[0]!=NULL) && (stricmp("Interrupts",token)))
|
||||
while ((token[0] != 0) && (stricmp("Interrupts",token)))
|
||||
{
|
||||
// Convert generic ID to sub-class specific enum
|
||||
int taskID = CAI_BaseNPC::GetTaskID(token);
|
||||
@ -477,7 +477,7 @@ bool CAI_SchedulesManager::LoadSchedulesFromBuffer( const char *prefix, char *pS
|
||||
// Now read in the interrupts
|
||||
// ==========================
|
||||
pfile = engine->ParseFile(pfile, token, sizeof( token ) );
|
||||
while ((token[0]!=NULL) && (stricmp("Schedule",token)))
|
||||
while ((token[0] != 0) && (stricmp("Schedule",token)))
|
||||
{
|
||||
// Convert generic ID to sub-class specific enum
|
||||
int condID = CAI_BaseNPC::GetConditionID(token);
|
||||
|
@ -1,200 +1,200 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: A schedule
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include "bitstring.h"
|
||||
|
||||
#ifndef AI_SCHEDULE_H
|
||||
#define AI_SCHEDULE_H
|
||||
|
||||
#pragma once
|
||||
|
||||
class CStringRegistry;
|
||||
class CAI_ClassScheduleIdSpace;
|
||||
class CAI_BaseNPC;
|
||||
|
||||
struct Task_t;
|
||||
|
||||
#ifndef MAX_CONDITIONS
|
||||
#define MAX_CONDITIONS 32*8
|
||||
#endif
|
||||
typedef CFixedBitString<MAX_CONDITIONS> CAI_ScheduleBits;
|
||||
|
||||
//==================================================
|
||||
// goalType_t
|
||||
//==================================================
|
||||
|
||||
enum goalType_t
|
||||
{
|
||||
GOAL_NONE = -1,
|
||||
GOAL_ENEMY, //Our current enemy's position
|
||||
GOAL_TARGET, //Our current target's position
|
||||
GOAL_ENEMY_LKP, //Our current enemy's last known position
|
||||
GOAL_SAVED_POSITION, //Our saved position
|
||||
};
|
||||
|
||||
//==================================================
|
||||
// pathType_t
|
||||
//==================================================
|
||||
|
||||
enum pathType_t
|
||||
{
|
||||
PATH_NONE = -1,
|
||||
PATH_TRAVEL, //Path that will take us to the goal
|
||||
PATH_LOS, //Path that gives us line of sight to our goal
|
||||
//PATH_FLANK, //Path that will take us to a flanking position of our goal
|
||||
//PATH_FLANK_LOS, //Path that will take us to within line of sight to the flanking position of our goal
|
||||
PATH_COVER, //Path that will give us cover from our goal
|
||||
//PATH_COVER_LOS, //Path that will give us line of sight to cover from our goal
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_Schedule
|
||||
//=============================================================================
|
||||
|
||||
class CAI_Schedule;
|
||||
|
||||
class CAI_SchedulesManager
|
||||
{
|
||||
public:
|
||||
CAI_SchedulesManager()
|
||||
{
|
||||
allSchedules = NULL;
|
||||
m_CurLoadSig = 0; // Note when schedules reset
|
||||
}
|
||||
|
||||
int GetScheduleLoadSignature() { return m_CurLoadSig; }
|
||||
CAI_Schedule* GetScheduleFromID( int schedID ); // Function to return schedule from linked list
|
||||
CAI_Schedule* GetScheduleByName( const char *name );
|
||||
|
||||
bool LoadAllSchedules(void);
|
||||
|
||||
bool LoadSchedules( const char* prefix, CAI_ClassScheduleIdSpace *pIdSpace );
|
||||
bool LoadSchedulesFromBuffer( const char *prefix, char *pfile, CAI_ClassScheduleIdSpace *pIdSpace );
|
||||
|
||||
private:
|
||||
friend class CAI_SystemHook;
|
||||
|
||||
int m_CurLoadSig; // Note when schedules reset
|
||||
CAI_Schedule* allSchedules; // A linked list of all schedules
|
||||
|
||||
CAI_Schedule * CreateSchedule(char *name, int schedule_id);
|
||||
|
||||
void CreateStringRegistries( void );
|
||||
void DestroyStringRegistries( void );
|
||||
void DeleteAllSchedules(void);
|
||||
|
||||
//static bool LoadSchedules( char* prefix, int taskIDOffset, int taskENOffset,
|
||||
// int schedIDOffset, int schedENOffset,
|
||||
// int condIDOffset, int condENOffset);
|
||||
|
||||
// parsing helpers
|
||||
int GetStateID(const char *state_name);
|
||||
int GetMemoryID(const char *memory_name);
|
||||
int GetPathID( const char *token );
|
||||
int GetGoalID( const char *token );
|
||||
|
||||
};
|
||||
|
||||
extern CAI_SchedulesManager g_AI_SchedulesManager;
|
||||
|
||||
class CAI_Schedule
|
||||
{
|
||||
// ---------
|
||||
// Static
|
||||
// ---------
|
||||
// ---------
|
||||
public:
|
||||
int GetId() const
|
||||
{
|
||||
return m_iScheduleID;
|
||||
}
|
||||
|
||||
const Task_t *GetTaskList() const
|
||||
{
|
||||
return m_pTaskList;
|
||||
}
|
||||
|
||||
int NumTasks() const
|
||||
{
|
||||
return m_iNumTasks;
|
||||
}
|
||||
|
||||
void GetInterruptMask( CAI_ScheduleBits *pBits ) const
|
||||
{
|
||||
m_InterruptMask.Copy( pBits );
|
||||
}
|
||||
|
||||
bool HasInterrupt( int condition ) const
|
||||
{
|
||||
return m_InterruptMask.GetBit( condition );
|
||||
}
|
||||
|
||||
const char *GetName() const
|
||||
{
|
||||
return m_pName;
|
||||
}
|
||||
|
||||
private:
|
||||
friend class CAI_SchedulesManager;
|
||||
|
||||
int m_iScheduleID; // The id number of this schedule
|
||||
|
||||
Task_t *m_pTaskList;
|
||||
int m_iNumTasks;
|
||||
|
||||
CAI_ScheduleBits m_InterruptMask; // a bit mask of conditions that can interrupt this schedule
|
||||
char *m_pName;
|
||||
|
||||
CAI_Schedule *nextSchedule; // The next schedule in the list of schedules
|
||||
|
||||
CAI_Schedule(char *name,int schedule_id, CAI_Schedule *pNext);
|
||||
~CAI_Schedule( void );
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// In-memory schedules
|
||||
//
|
||||
|
||||
#define AI_DEFINE_SCHEDULE( name, text ) \
|
||||
const char * g_psz##name = \
|
||||
"\n Schedule" \
|
||||
"\n " #name \
|
||||
text \
|
||||
"\n"
|
||||
|
||||
|
||||
#define AI_LOAD_SCHEDULE( classname, name ) \
|
||||
do \
|
||||
{ \
|
||||
extern const char * g_psz##name; \
|
||||
if ( classname::gm_SchedLoadStatus.fValid ) \
|
||||
{ \
|
||||
classname::gm_SchedLoadStatus.fValid = g_AI_SchedulesManager.LoadSchedulesFromBuffer( #classname,(char *)g_psz##name,&classname::gm_ClassScheduleIdSpace ); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
|
||||
// For loading default schedules in memory (see ai_default.cpp)
|
||||
#define AI_LOAD_DEF_SCHEDULE( classname, name ) \
|
||||
do \
|
||||
{ \
|
||||
extern const char * g_psz##name; \
|
||||
if (!g_AI_SchedulesManager.LoadSchedulesFromBuffer( #classname,(char *)g_psz##name,&classname::gm_ClassScheduleIdSpace )) \
|
||||
return false; \
|
||||
} while (false)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif // AI_SCHEDULE_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: A schedule
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include "bitstring.h"
|
||||
|
||||
#ifndef AI_SCHEDULE_H
|
||||
#define AI_SCHEDULE_H
|
||||
|
||||
#pragma once
|
||||
|
||||
class CStringRegistry;
|
||||
class CAI_ClassScheduleIdSpace;
|
||||
class CAI_BaseNPC;
|
||||
|
||||
struct Task_t;
|
||||
|
||||
#ifndef MAX_CONDITIONS
|
||||
#define MAX_CONDITIONS 32*8
|
||||
#endif
|
||||
typedef CFixedBitString<MAX_CONDITIONS> CAI_ScheduleBits;
|
||||
|
||||
//==================================================
|
||||
// goalType_t
|
||||
//==================================================
|
||||
|
||||
enum goalType_t
|
||||
{
|
||||
GOAL_NONE = -1,
|
||||
GOAL_ENEMY, //Our current enemy's position
|
||||
GOAL_TARGET, //Our current target's position
|
||||
GOAL_ENEMY_LKP, //Our current enemy's last known position
|
||||
GOAL_SAVED_POSITION, //Our saved position
|
||||
};
|
||||
|
||||
//==================================================
|
||||
// pathType_t
|
||||
//==================================================
|
||||
|
||||
enum pathType_t
|
||||
{
|
||||
PATH_NONE = -1,
|
||||
PATH_TRAVEL, //Path that will take us to the goal
|
||||
PATH_LOS, //Path that gives us line of sight to our goal
|
||||
//PATH_FLANK, //Path that will take us to a flanking position of our goal
|
||||
//PATH_FLANK_LOS, //Path that will take us to within line of sight to the flanking position of our goal
|
||||
PATH_COVER, //Path that will give us cover from our goal
|
||||
//PATH_COVER_LOS, //Path that will give us line of sight to cover from our goal
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_Schedule
|
||||
//=============================================================================
|
||||
|
||||
class CAI_Schedule;
|
||||
|
||||
class CAI_SchedulesManager
|
||||
{
|
||||
public:
|
||||
CAI_SchedulesManager()
|
||||
{
|
||||
allSchedules = NULL;
|
||||
m_CurLoadSig = 0; // Note when schedules reset
|
||||
}
|
||||
|
||||
int GetScheduleLoadSignature() { return m_CurLoadSig; }
|
||||
CAI_Schedule* GetScheduleFromID( int schedID ); // Function to return schedule from linked list
|
||||
CAI_Schedule* GetScheduleByName( const char *name );
|
||||
|
||||
bool LoadAllSchedules(void);
|
||||
|
||||
bool LoadSchedules( const char* prefix, CAI_ClassScheduleIdSpace *pIdSpace );
|
||||
bool LoadSchedulesFromBuffer( const char *prefix, char *pfile, CAI_ClassScheduleIdSpace *pIdSpace );
|
||||
|
||||
private:
|
||||
friend class CAI_SystemHook;
|
||||
|
||||
int m_CurLoadSig; // Note when schedules reset
|
||||
CAI_Schedule* allSchedules; // A linked list of all schedules
|
||||
|
||||
CAI_Schedule * CreateSchedule(char *name, int schedule_id);
|
||||
|
||||
void CreateStringRegistries( void );
|
||||
void DestroyStringRegistries( void );
|
||||
void DeleteAllSchedules(void);
|
||||
|
||||
//static bool LoadSchedules( char* prefix, int taskIDOffset, int taskENOffset,
|
||||
// int schedIDOffset, int schedENOffset,
|
||||
// int condIDOffset, int condENOffset);
|
||||
|
||||
// parsing helpers
|
||||
int GetStateID(const char *state_name);
|
||||
int GetMemoryID(const char *memory_name);
|
||||
int GetPathID( const char *token );
|
||||
int GetGoalID( const char *token );
|
||||
|
||||
};
|
||||
|
||||
extern CAI_SchedulesManager g_AI_SchedulesManager;
|
||||
|
||||
class CAI_Schedule
|
||||
{
|
||||
// ---------
|
||||
// Static
|
||||
// ---------
|
||||
// ---------
|
||||
public:
|
||||
int GetId() const
|
||||
{
|
||||
return m_iScheduleID;
|
||||
}
|
||||
|
||||
const Task_t *GetTaskList() const
|
||||
{
|
||||
return m_pTaskList;
|
||||
}
|
||||
|
||||
int NumTasks() const
|
||||
{
|
||||
return m_iNumTasks;
|
||||
}
|
||||
|
||||
void GetInterruptMask( CAI_ScheduleBits *pBits ) const
|
||||
{
|
||||
m_InterruptMask.Copy( pBits );
|
||||
}
|
||||
|
||||
bool HasInterrupt( int condition ) const
|
||||
{
|
||||
return m_InterruptMask.GetBit( condition );
|
||||
}
|
||||
|
||||
const char *GetName() const
|
||||
{
|
||||
return m_pName;
|
||||
}
|
||||
|
||||
private:
|
||||
friend class CAI_SchedulesManager;
|
||||
|
||||
int m_iScheduleID; // The id number of this schedule
|
||||
|
||||
Task_t *m_pTaskList;
|
||||
int m_iNumTasks;
|
||||
|
||||
CAI_ScheduleBits m_InterruptMask; // a bit mask of conditions that can interrupt this schedule
|
||||
char *m_pName;
|
||||
|
||||
CAI_Schedule *nextSchedule; // The next schedule in the list of schedules
|
||||
|
||||
CAI_Schedule(char *name,int schedule_id, CAI_Schedule *pNext);
|
||||
~CAI_Schedule( void );
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// In-memory schedules
|
||||
//
|
||||
|
||||
#define AI_DEFINE_SCHEDULE( name, text ) \
|
||||
const char * g_psz##name = \
|
||||
"\n Schedule" \
|
||||
"\n " #name \
|
||||
text \
|
||||
"\n"
|
||||
|
||||
|
||||
#define AI_LOAD_SCHEDULE( classname, name ) \
|
||||
do \
|
||||
{ \
|
||||
extern const char * g_psz##name; \
|
||||
if ( classname::gm_SchedLoadStatus.fValid ) \
|
||||
{ \
|
||||
classname::gm_SchedLoadStatus.fValid = g_AI_SchedulesManager.LoadSchedulesFromBuffer( #classname,(char *)g_psz##name,&classname::gm_ClassScheduleIdSpace ); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
|
||||
// For loading default schedules in memory (see ai_default.cpp)
|
||||
#define AI_LOAD_DEF_SCHEDULE( classname, name ) \
|
||||
do \
|
||||
{ \
|
||||
extern const char * g_psz##name; \
|
||||
if (!g_AI_SchedulesManager.LoadSchedulesFromBuffer( #classname,(char *)g_psz##name,&classname::gm_ClassScheduleIdSpace )) \
|
||||
return false; \
|
||||
} while (false)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif // AI_SCHEDULE_H
|
||||
|
@ -1,249 +1,249 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_SCRIPTCONDITIONS_H
|
||||
#define AI_SCRIPTCONDITIONS_H
|
||||
|
||||
#include "baseentity.h"
|
||||
#include "entityoutput.h"
|
||||
#include "simtimer.h"
|
||||
#include "ai_npcstate.h"
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class CAI_ProxTester
|
||||
{
|
||||
public:
|
||||
CAI_ProxTester()
|
||||
: m_distSq( 0 ),
|
||||
m_fInside( false )
|
||||
{
|
||||
}
|
||||
|
||||
void Init( float dist )
|
||||
{
|
||||
m_fInside = ( dist > 0 );
|
||||
m_distSq = dist * dist;
|
||||
}
|
||||
|
||||
bool Check( CBaseEntity *pEntity1, CBaseEntity *pEntity2 )
|
||||
{
|
||||
if ( m_distSq != 0 )
|
||||
{
|
||||
float distSq = ( pEntity1->GetAbsOrigin() - pEntity2->GetAbsOrigin() ).LengthSqr();
|
||||
bool fInside = ( distSq < m_distSq );
|
||||
|
||||
return ( m_fInside == fInside );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
DECLARE_SIMPLE_DATADESC();
|
||||
|
||||
private:
|
||||
|
||||
float m_distSq;
|
||||
bool m_fInside;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class CAI_ScriptConditionsElement
|
||||
{
|
||||
public:
|
||||
|
||||
DECLARE_SIMPLE_DATADESC();
|
||||
|
||||
void SetActor( CBaseEntity *pEntity ) { m_hActor = pEntity; }
|
||||
CBaseEntity *GetActor( void ){ return m_hActor.Get(); }
|
||||
|
||||
void SetTimer( CSimTimer timer ) { m_Timer = timer; }
|
||||
CSimTimer *GetTimer( void ) { return &m_Timer; }
|
||||
|
||||
void SetTimeOut( CSimTimer timeout) { m_Timeout = timeout; }
|
||||
CSimTimer *GetTimeOut( void ) { return &m_Timeout; }
|
||||
|
||||
private:
|
||||
EHANDLE m_hActor;
|
||||
CSimTimer m_Timer;
|
||||
CSimTimer m_Timeout;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// class CAI_ScriptConditions
|
||||
//
|
||||
// Purpose: Watches a set of conditions relative to a given NPC, and when they
|
||||
// are all satisfied, fires the relevant output
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class CAI_ScriptConditions : public CBaseEntity, public IEntityListener
|
||||
{
|
||||
DECLARE_CLASS( CAI_ScriptConditions, CBaseEntity );
|
||||
|
||||
public:
|
||||
CAI_ScriptConditions()
|
||||
: m_fDisabled( true ),
|
||||
m_flRequiredTime( 0 ),
|
||||
m_fMinState( NPC_STATE_IDLE ),
|
||||
m_fMaxState( NPC_STATE_IDLE ),
|
||||
m_fScriptStatus( TRS_NONE ),
|
||||
m_fActorSeePlayer( TRS_NONE ),
|
||||
m_flPlayerActorProximity( 0 ),
|
||||
m_flPlayerActorFOV( -1 ),
|
||||
m_fPlayerActorLOS( TRS_NONE ),
|
||||
m_fActorSeeTarget( TRS_NONE ),
|
||||
m_flActorTargetProximity( 0 ),
|
||||
m_flPlayerTargetProximity( 0 ),
|
||||
m_flPlayerTargetFOV( 0 ),
|
||||
m_fPlayerTargetLOS( TRS_NONE ),
|
||||
m_fPlayerBlockingActor( TRS_NONE ),
|
||||
m_flMinTimeout( 0 ),
|
||||
m_flMaxTimeout( 0 ),
|
||||
m_fActorInPVS( TRS_NONE )
|
||||
{
|
||||
#ifndef HL2_EPISODIC
|
||||
m_hActor = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
void Spawn();
|
||||
void Activate();
|
||||
|
||||
void EvaluationThink();
|
||||
|
||||
void Enable();
|
||||
void Disable();
|
||||
|
||||
void SetThinkTime() { SetNextThink( gpGlobals->curtime + 0.250 ); }
|
||||
|
||||
// Evaluators
|
||||
struct EvalArgs_t
|
||||
{
|
||||
CBaseEntity *pActor;
|
||||
CBaseEntity *pPlayer;
|
||||
CBaseEntity *pTarget;
|
||||
};
|
||||
|
||||
bool EvalState( const EvalArgs_t &args );
|
||||
bool EvalActorSeePlayer( const EvalArgs_t &args );
|
||||
bool EvalPlayerActorLook( const EvalArgs_t &args );
|
||||
bool EvalPlayerTargetLook( const EvalArgs_t &args );
|
||||
bool EvalPlayerActorProximity( const EvalArgs_t &args );
|
||||
bool EvalPlayerTargetProximity( const EvalArgs_t &args );
|
||||
bool EvalActorTargetProximity( const EvalArgs_t &args );
|
||||
bool EvalActorSeeTarget( const EvalArgs_t &args );
|
||||
bool EvalPlayerActorLOS( const EvalArgs_t &args );
|
||||
bool EvalPlayerTargetLOS( const EvalArgs_t &args );
|
||||
bool EvalPlayerBlockingActor( const EvalArgs_t &args );
|
||||
bool EvalActorInPVS( const EvalArgs_t &args );
|
||||
|
||||
void OnEntitySpawned( CBaseEntity *pEntity );
|
||||
|
||||
int AddNewElement( CBaseEntity *pActor );
|
||||
|
||||
bool ActorInList( CBaseEntity *pActor );
|
||||
void UpdateOnRemove( void );
|
||||
|
||||
// Input handlers
|
||||
void InputEnable( inputdata_t &inputdata );
|
||||
void InputDisable( inputdata_t &inputdata );
|
||||
|
||||
// Output handlers
|
||||
COutputEvent m_OnConditionsSatisfied;
|
||||
COutputEvent m_OnConditionsTimeout;
|
||||
COutputEvent m_NoValidActors;
|
||||
|
||||
//---------------------------------
|
||||
|
||||
#ifndef HL2_EPISODIC
|
||||
CBaseEntity *GetActor() { return m_hActor.Get(); }
|
||||
#endif
|
||||
CBaseEntity *GetPlayer() { return UTIL_GetLocalPlayer(); }
|
||||
|
||||
//---------------------------------
|
||||
|
||||
// @Note (toml 07-17-02): At some point, it may be desireable to switch to using function objects instead of functions. Probably
|
||||
// if support for NPCs addiing custom conditions becomes necessary
|
||||
typedef bool (CAI_ScriptConditions::*EvaluationFunc_t)( const EvalArgs_t &args );
|
||||
|
||||
struct EvaluatorInfo_t
|
||||
{
|
||||
EvaluationFunc_t pfnEvaluator;
|
||||
const char *pszName;
|
||||
};
|
||||
|
||||
static EvaluatorInfo_t gm_Evaluators[];
|
||||
|
||||
//---------------------------------
|
||||
// Evaluation helpers
|
||||
|
||||
static bool IsInFOV( CBaseEntity *pViewer, CBaseEntity *pViewed, float fov, bool bTrueCone );
|
||||
static bool PlayerHasLineOfSight( CBaseEntity *pViewer, CBaseEntity *pViewed, bool fNot );
|
||||
static bool ActorInPlayersPVS( CBaseEntity *pActor, bool bNot );
|
||||
|
||||
virtual void OnRestore( void );
|
||||
|
||||
//---------------------------------
|
||||
// General conditions info
|
||||
|
||||
bool m_fDisabled;
|
||||
bool m_bLeaveAsleep;
|
||||
EHANDLE m_hTarget;
|
||||
|
||||
float m_flRequiredTime; // How long should the conditions me true
|
||||
|
||||
#ifndef HL2_EPISODIC
|
||||
EHANDLE m_hActor;
|
||||
CSimTimer m_Timer; // @TODO (toml 07-16-02): save/load of timer once Jay has save/load of contained objects
|
||||
CSimTimer m_Timeout;
|
||||
#endif
|
||||
|
||||
//---------------------------------
|
||||
// Specific conditions data
|
||||
NPC_STATE m_fMinState;
|
||||
NPC_STATE m_fMaxState;
|
||||
ThreeState_t m_fScriptStatus;
|
||||
ThreeState_t m_fActorSeePlayer;
|
||||
string_t m_Actor;
|
||||
|
||||
float m_flPlayerActorProximity;
|
||||
CAI_ProxTester m_PlayerActorProxTester;
|
||||
|
||||
float m_flPlayerActorFOV;
|
||||
bool m_bPlayerActorFOVTrueCone;
|
||||
ThreeState_t m_fPlayerActorLOS;
|
||||
ThreeState_t m_fActorSeeTarget;
|
||||
|
||||
float m_flActorTargetProximity;
|
||||
CAI_ProxTester m_ActorTargetProxTester;
|
||||
|
||||
float m_flPlayerTargetProximity;
|
||||
CAI_ProxTester m_PlayerTargetProxTester;
|
||||
|
||||
float m_flPlayerTargetFOV;
|
||||
bool m_bPlayerTargetFOVTrueCone;
|
||||
ThreeState_t m_fPlayerTargetLOS;
|
||||
ThreeState_t m_fPlayerBlockingActor;
|
||||
ThreeState_t m_fActorInPVS;
|
||||
|
||||
float m_flMinTimeout;
|
||||
float m_flMaxTimeout;
|
||||
|
||||
CUtlVector< CAI_ScriptConditionsElement > m_ElementList;
|
||||
|
||||
//---------------------------------
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif // AI_SCRIPTCONDITIONS_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef AI_SCRIPTCONDITIONS_H
|
||||
#define AI_SCRIPTCONDITIONS_H
|
||||
|
||||
#include "baseentity.h"
|
||||
#include "entityoutput.h"
|
||||
#include "simtimer.h"
|
||||
#include "ai_npcstate.h"
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class CAI_ProxTester
|
||||
{
|
||||
public:
|
||||
CAI_ProxTester()
|
||||
: m_distSq( 0 ),
|
||||
m_fInside( false )
|
||||
{
|
||||
}
|
||||
|
||||
void Init( float dist )
|
||||
{
|
||||
m_fInside = ( dist > 0 );
|
||||
m_distSq = dist * dist;
|
||||
}
|
||||
|
||||
bool Check( CBaseEntity *pEntity1, CBaseEntity *pEntity2 )
|
||||
{
|
||||
if ( m_distSq != 0 )
|
||||
{
|
||||
float distSq = ( pEntity1->GetAbsOrigin() - pEntity2->GetAbsOrigin() ).LengthSqr();
|
||||
bool fInside = ( distSq < m_distSq );
|
||||
|
||||
return ( m_fInside == fInside );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
DECLARE_SIMPLE_DATADESC();
|
||||
|
||||
private:
|
||||
|
||||
float m_distSq;
|
||||
bool m_fInside;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class CAI_ScriptConditionsElement
|
||||
{
|
||||
public:
|
||||
|
||||
DECLARE_SIMPLE_DATADESC();
|
||||
|
||||
void SetActor( CBaseEntity *pEntity ) { m_hActor = pEntity; }
|
||||
CBaseEntity *GetActor( void ){ return m_hActor.Get(); }
|
||||
|
||||
void SetTimer( CSimTimer timer ) { m_Timer = timer; }
|
||||
CSimTimer *GetTimer( void ) { return &m_Timer; }
|
||||
|
||||
void SetTimeOut( CSimTimer timeout) { m_Timeout = timeout; }
|
||||
CSimTimer *GetTimeOut( void ) { return &m_Timeout; }
|
||||
|
||||
private:
|
||||
EHANDLE m_hActor;
|
||||
CSimTimer m_Timer;
|
||||
CSimTimer m_Timeout;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// class CAI_ScriptConditions
|
||||
//
|
||||
// Purpose: Watches a set of conditions relative to a given NPC, and when they
|
||||
// are all satisfied, fires the relevant output
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class CAI_ScriptConditions : public CBaseEntity, public IEntityListener
|
||||
{
|
||||
DECLARE_CLASS( CAI_ScriptConditions, CBaseEntity );
|
||||
|
||||
public:
|
||||
CAI_ScriptConditions()
|
||||
: m_fDisabled( true ),
|
||||
m_flRequiredTime( 0 ),
|
||||
m_fMinState( NPC_STATE_IDLE ),
|
||||
m_fMaxState( NPC_STATE_IDLE ),
|
||||
m_fScriptStatus( TRS_NONE ),
|
||||
m_fActorSeePlayer( TRS_NONE ),
|
||||
m_flPlayerActorProximity( 0 ),
|
||||
m_flPlayerActorFOV( -1 ),
|
||||
m_fPlayerActorLOS( TRS_NONE ),
|
||||
m_fActorSeeTarget( TRS_NONE ),
|
||||
m_flActorTargetProximity( 0 ),
|
||||
m_flPlayerTargetProximity( 0 ),
|
||||
m_flPlayerTargetFOV( 0 ),
|
||||
m_fPlayerTargetLOS( TRS_NONE ),
|
||||
m_fPlayerBlockingActor( TRS_NONE ),
|
||||
m_fActorInPVS( TRS_NONE ),
|
||||
m_flMinTimeout( 0 ),
|
||||
m_flMaxTimeout( 0 )
|
||||
{
|
||||
#ifndef HL2_EPISODIC
|
||||
m_hActor = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
void Spawn();
|
||||
void Activate();
|
||||
|
||||
void EvaluationThink();
|
||||
|
||||
void Enable();
|
||||
void Disable();
|
||||
|
||||
void SetThinkTime() { SetNextThink( gpGlobals->curtime + 0.250 ); }
|
||||
|
||||
// Evaluators
|
||||
struct EvalArgs_t
|
||||
{
|
||||
CBaseEntity *pActor;
|
||||
CBaseEntity *pPlayer;
|
||||
CBaseEntity *pTarget;
|
||||
};
|
||||
|
||||
bool EvalState( const EvalArgs_t &args );
|
||||
bool EvalActorSeePlayer( const EvalArgs_t &args );
|
||||
bool EvalPlayerActorLook( const EvalArgs_t &args );
|
||||
bool EvalPlayerTargetLook( const EvalArgs_t &args );
|
||||
bool EvalPlayerActorProximity( const EvalArgs_t &args );
|
||||
bool EvalPlayerTargetProximity( const EvalArgs_t &args );
|
||||
bool EvalActorTargetProximity( const EvalArgs_t &args );
|
||||
bool EvalActorSeeTarget( const EvalArgs_t &args );
|
||||
bool EvalPlayerActorLOS( const EvalArgs_t &args );
|
||||
bool EvalPlayerTargetLOS( const EvalArgs_t &args );
|
||||
bool EvalPlayerBlockingActor( const EvalArgs_t &args );
|
||||
bool EvalActorInPVS( const EvalArgs_t &args );
|
||||
|
||||
void OnEntitySpawned( CBaseEntity *pEntity );
|
||||
|
||||
int AddNewElement( CBaseEntity *pActor );
|
||||
|
||||
bool ActorInList( CBaseEntity *pActor );
|
||||
void UpdateOnRemove( void );
|
||||
|
||||
// Input handlers
|
||||
void InputEnable( inputdata_t &inputdata );
|
||||
void InputDisable( inputdata_t &inputdata );
|
||||
|
||||
// Output handlers
|
||||
COutputEvent m_OnConditionsSatisfied;
|
||||
COutputEvent m_OnConditionsTimeout;
|
||||
COutputEvent m_NoValidActors;
|
||||
|
||||
//---------------------------------
|
||||
|
||||
#ifndef HL2_EPISODIC
|
||||
CBaseEntity *GetActor() { return m_hActor.Get(); }
|
||||
#endif
|
||||
CBaseEntity *GetPlayer() { return UTIL_GetLocalPlayer(); }
|
||||
|
||||
//---------------------------------
|
||||
|
||||
// @Note (toml 07-17-02): At some point, it may be desireable to switch to using function objects instead of functions. Probably
|
||||
// if support for NPCs addiing custom conditions becomes necessary
|
||||
typedef bool (CAI_ScriptConditions::*EvaluationFunc_t)( const EvalArgs_t &args );
|
||||
|
||||
struct EvaluatorInfo_t
|
||||
{
|
||||
EvaluationFunc_t pfnEvaluator;
|
||||
const char *pszName;
|
||||
};
|
||||
|
||||
static EvaluatorInfo_t gm_Evaluators[];
|
||||
|
||||
//---------------------------------
|
||||
// Evaluation helpers
|
||||
|
||||
static bool IsInFOV( CBaseEntity *pViewer, CBaseEntity *pViewed, float fov, bool bTrueCone );
|
||||
static bool PlayerHasLineOfSight( CBaseEntity *pViewer, CBaseEntity *pViewed, bool fNot );
|
||||
static bool ActorInPlayersPVS( CBaseEntity *pActor, bool bNot );
|
||||
|
||||
virtual void OnRestore( void );
|
||||
|
||||
//---------------------------------
|
||||
// General conditions info
|
||||
|
||||
bool m_fDisabled;
|
||||
bool m_bLeaveAsleep;
|
||||
EHANDLE m_hTarget;
|
||||
|
||||
float m_flRequiredTime; // How long should the conditions me true
|
||||
|
||||
#ifndef HL2_EPISODIC
|
||||
EHANDLE m_hActor;
|
||||
CSimTimer m_Timer; // @TODO (toml 07-16-02): save/load of timer once Jay has save/load of contained objects
|
||||
CSimTimer m_Timeout;
|
||||
#endif
|
||||
|
||||
//---------------------------------
|
||||
// Specific conditions data
|
||||
NPC_STATE m_fMinState;
|
||||
NPC_STATE m_fMaxState;
|
||||
ThreeState_t m_fScriptStatus;
|
||||
ThreeState_t m_fActorSeePlayer;
|
||||
string_t m_Actor;
|
||||
|
||||
float m_flPlayerActorProximity;
|
||||
CAI_ProxTester m_PlayerActorProxTester;
|
||||
|
||||
float m_flPlayerActorFOV;
|
||||
bool m_bPlayerActorFOVTrueCone;
|
||||
ThreeState_t m_fPlayerActorLOS;
|
||||
ThreeState_t m_fActorSeeTarget;
|
||||
|
||||
float m_flActorTargetProximity;
|
||||
CAI_ProxTester m_ActorTargetProxTester;
|
||||
|
||||
float m_flPlayerTargetProximity;
|
||||
CAI_ProxTester m_PlayerTargetProxTester;
|
||||
|
||||
float m_flPlayerTargetFOV;
|
||||
bool m_bPlayerTargetFOVTrueCone;
|
||||
ThreeState_t m_fPlayerTargetLOS;
|
||||
ThreeState_t m_fPlayerBlockingActor;
|
||||
ThreeState_t m_fActorInPVS;
|
||||
|
||||
float m_flMinTimeout;
|
||||
float m_flMaxTimeout;
|
||||
|
||||
CUtlVector< CAI_ScriptConditionsElement > m_ElementList;
|
||||
|
||||
//---------------------------------
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif // AI_SCRIPTCONDITIONS_H
|
||||
|
@ -37,8 +37,7 @@ CAI_SensedObjectsManager g_AI_SensedObjectsManager;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct AISightIterVal_t
|
||||
{
|
||||
@ -243,7 +242,7 @@ CBaseEntity *CAI_Senses::GetFirstSeenEntity( AISightIter_t *pIter, seentype_t iS
|
||||
pIterVal->SeenArray = (char)iSeenType;
|
||||
int iFirstArray = ( iSeenType == SEEN_ALL ) ? 0 : iSeenType;
|
||||
|
||||
for ( int i = iFirstArray; i < ARRAYSIZE( m_SeenArrays ); i++ )
|
||||
for ( int i = iFirstArray; i < static_cast<int>(ARRAYSIZE( m_SeenArrays )); i++ )
|
||||
{
|
||||
if ( m_SeenArrays[i]->Count() != 0 )
|
||||
{
|
||||
@ -265,7 +264,7 @@ CBaseEntity *CAI_Senses::GetNextSeenEntity( AISightIter_t *pIter ) const
|
||||
{
|
||||
AISightIterVal_t *pIterVal = (AISightIterVal_t *)pIter;
|
||||
|
||||
for ( int i = pIterVal->array; i < ARRAYSIZE( m_SeenArrays ); i++ )
|
||||
for ( int i = pIterVal->array; i < static_cast<int>(ARRAYSIZE( m_SeenArrays )); i++ )
|
||||
{
|
||||
for ( int j = pIterVal->iNext; j < m_SeenArrays[i]->Count(); j++ )
|
||||
{
|
||||
@ -618,7 +617,7 @@ void CAI_Senses::PerformSensing( void )
|
||||
// -----------------
|
||||
// Look
|
||||
// -----------------
|
||||
Look( m_LookDist );
|
||||
Look( static_cast<int>(m_LookDist) );
|
||||
|
||||
// ------------------
|
||||
// Listen
|
||||
|
@ -213,8 +213,8 @@ CAI_Expresser::CAI_Expresser( CAI_BaseNPC *pOuter )
|
||||
: CAI_Component( pOuter ),
|
||||
m_pSink( NULL ),
|
||||
m_flStopTalkTime( 0 ),
|
||||
m_flBlockedTalkTime( 0 ),
|
||||
m_flStopTalkTimeWithoutDelay( 0 ),
|
||||
m_flBlockedTalkTime( 0 ),
|
||||
m_voicePitch( 100 )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
@ -828,7 +828,7 @@ void CAI_ExpresserHost_DoModifyOrAppendCriteria( CAI_BaseNPC *pSpeaker, AI_Crite
|
||||
}
|
||||
|
||||
static const char *pStateNames[] = { "None", "Idle", "Alert", "Combat", "Scripted", "PlayDead", "Dead" };
|
||||
if ( (int)pSpeaker->m_NPCState < ARRAYSIZE(pStateNames) )
|
||||
if ( (int)pSpeaker->m_NPCState < static_cast<int>(ARRAYSIZE(pStateNames)) )
|
||||
{
|
||||
set.AppendCriteria( "npcstate", UTIL_VarArgs( "[NPCState::%s]", pStateNames[pSpeaker->m_NPCState] ) );
|
||||
}
|
||||
|
@ -260,15 +260,15 @@ public:
|
||||
virtual void PostSpeakDispatchResponse( AIConcept_t concept, AI_Response *response ) { return; }
|
||||
float GetResponseDuration( AI_Response *response );
|
||||
|
||||
float GetTimeSpeechComplete() const { return GetExpresser()->GetTimeSpeechComplete(); }
|
||||
float GetTimeSpeechComplete() const { return this->GetExpresser()->GetTimeSpeechComplete(); }
|
||||
|
||||
bool IsSpeaking() { return GetExpresser()->IsSpeaking(); }
|
||||
bool CanSpeak() { return GetExpresser()->CanSpeak(); }
|
||||
bool CanSpeakAfterMyself() { return GetExpresser()->CanSpeakAfterMyself(); }
|
||||
bool IsSpeaking() { return this->GetExpresser()->IsSpeaking(); }
|
||||
bool CanSpeak() { return this->GetExpresser()->CanSpeak(); }
|
||||
bool CanSpeakAfterMyself() { return this->GetExpresser()->CanSpeakAfterMyself(); }
|
||||
|
||||
void SetSpokeConcept( AIConcept_t concept, AI_Response *response, bool bCallback = true ) { GetExpresser()->SetSpokeConcept( concept, response, bCallback ); }
|
||||
float GetTimeSpokeConcept( AIConcept_t concept ) { return GetExpresser()->GetTimeSpokeConcept( concept ); }
|
||||
bool SpokeConcept( AIConcept_t concept ) { return GetExpresser()->SpokeConcept( concept ); }
|
||||
void SetSpokeConcept( AIConcept_t concept, AI_Response *response, bool bCallback = true ) { this->GetExpresser()->SetSpokeConcept( concept, response, bCallback ); }
|
||||
float GetTimeSpokeConcept( AIConcept_t concept ) { return this->GetExpresser()->GetTimeSpokeConcept( concept ); }
|
||||
bool SpokeConcept( AIConcept_t concept ) { return this->GetExpresser()->SpokeConcept( concept ); }
|
||||
|
||||
protected:
|
||||
virtual bool Speak( AIConcept_t concept, const char *modifiers = NULL, char *pszOutResponseChosen = NULL, size_t bufsize = 0 );
|
||||
@ -285,7 +285,7 @@ protected:
|
||||
template <class BASE_NPC>
|
||||
inline void CAI_ExpresserHost<BASE_NPC>::NoteSpeaking( float duration, float delay )
|
||||
{
|
||||
GetExpresser()->NoteSpeaking( duration, delay );
|
||||
this->GetExpresser()->NoteSpeaking( duration, delay );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -293,8 +293,8 @@ inline void CAI_ExpresserHost<BASE_NPC>::NoteSpeaking( float duration, float del
|
||||
template <class BASE_NPC>
|
||||
inline bool CAI_ExpresserHost<BASE_NPC>::Speak( AIConcept_t concept, const char *modifiers /*= NULL*/, char *pszOutResponseChosen /*=NULL*/, size_t bufsize /* = 0 */ )
|
||||
{
|
||||
AssertOnce( GetExpresser()->GetOuter() == this );
|
||||
return GetExpresser()->Speak( concept, modifiers, pszOutResponseChosen, bufsize );
|
||||
AssertOnce( this->GetExpresser()->GetOuter() == this );
|
||||
return this->GetExpresser()->Speak( concept, modifiers, pszOutResponseChosen, bufsize );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -302,7 +302,7 @@ inline bool CAI_ExpresserHost<BASE_NPC>::Speak( AIConcept_t concept, const char
|
||||
template <class BASE_NPC>
|
||||
inline int CAI_ExpresserHost<BASE_NPC>::PlaySentence( const char *pszSentence, float delay, float volume, soundlevel_t soundlevel, CBaseEntity *pListener )
|
||||
{
|
||||
return GetExpresser()->SpeakRawSentence( pszSentence, delay, volume, soundlevel, pListener );
|
||||
return this->GetExpresser()->SpeakRawSentence( pszSentence, delay, volume, soundlevel, pListener );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -332,7 +332,7 @@ inline IResponseSystem *CAI_ExpresserHost<BASE_NPC>::GetResponseSystem()
|
||||
template <class BASE_NPC>
|
||||
inline AI_Response *CAI_ExpresserHost<BASE_NPC>::SpeakFindResponse( AIConcept_t concept, const char *modifiers /*= NULL*/ )
|
||||
{
|
||||
return GetExpresser()->SpeakFindResponse( concept, modifiers );
|
||||
return this->GetExpresser()->SpeakFindResponse( concept, modifiers );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -340,7 +340,7 @@ inline AI_Response *CAI_ExpresserHost<BASE_NPC>::SpeakFindResponse( AIConcept_t
|
||||
template <class BASE_NPC>
|
||||
inline bool CAI_ExpresserHost<BASE_NPC>::SpeakDispatchResponse( AIConcept_t concept, AI_Response *response )
|
||||
{
|
||||
if ( GetExpresser()->SpeakDispatchResponse( concept, response ) )
|
||||
if ( this->GetExpresser()->SpeakDispatchResponse( concept, response ) )
|
||||
{
|
||||
PostSpeakDispatchResponse( concept, response );
|
||||
return true;
|
||||
@ -354,7 +354,7 @@ inline bool CAI_ExpresserHost<BASE_NPC>::SpeakDispatchResponse( AIConcept_t conc
|
||||
template <class BASE_NPC>
|
||||
inline float CAI_ExpresserHost<BASE_NPC>::GetResponseDuration( AI_Response *response )
|
||||
{
|
||||
return GetExpresser()->GetResponseDuration( response );
|
||||
return this->GetExpresser()->GetResponseDuration( response );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -262,7 +262,7 @@ void CAI_Squad::AddToSquad(CAI_BaseNPC *pNPC)
|
||||
|
||||
if (m_SquadMembers.Count() == MAX_SQUAD_MEMBERS)
|
||||
{
|
||||
DevMsg("Error!! Squad %s is too big!!! Replacing last member\n",this->m_Name);
|
||||
DevMsg("Error!! Squad %s is too big!!! Replacing last member\n", STRING(this->m_Name));
|
||||
m_SquadMembers.Remove(m_SquadMembers.Count()-1);
|
||||
}
|
||||
m_SquadMembers.AddToTail(pNPC);
|
||||
|
@ -660,7 +660,7 @@ bool CAI_TacticalServices::FindLateralLos( const Vector &vecThreat, Vector *pRes
|
||||
int iDelta = COVER_DELTA;
|
||||
|
||||
// If we're limited in how far we're allowed to move laterally, don't bother checking past it
|
||||
int iMaxLateralDelta = GetOuter()->GetMaxTacticalLateralMovement();
|
||||
int iMaxLateralDelta = static_cast<int>(GetOuter()->GetMaxTacticalLateralMovement());
|
||||
if ( iMaxLateralDelta != MAXTACLAT_IGNORE && iMaxLateralDelta < iDelta )
|
||||
{
|
||||
iChecks = 1;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -500,12 +500,12 @@ void CBaseAnimating::SetLightingOriginRelative( string_t strLightingOriginRelati
|
||||
{
|
||||
if( !pLightingOrigin )
|
||||
{
|
||||
DevWarning( "%s: Cannot find Lighting Origin named: %s\n", GetEntityName(), strLightingOriginRelative );
|
||||
DevWarning( "%s: Cannot find Lighting Origin named: %s\n", STRING(GetEntityName()), STRING(strLightingOriginRelative) );
|
||||
}
|
||||
else
|
||||
{
|
||||
DevWarning( "%s: Specified entity '%s' must be a info_lighting_relative!\n",
|
||||
pLightingOrigin->GetClassname(), pLightingOrigin->GetEntityName() );
|
||||
pLightingOrigin->GetClassname(), STRING(pLightingOrigin->GetEntityName()) );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1,57 +1,57 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: The class from which all bludgeon melee
|
||||
// weapons are derived.
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include "basehlcombatweapon.h"
|
||||
|
||||
#ifndef BASEBLUDGEONWEAPON_H
|
||||
#define BASEBLUDGEONWEAPON_H
|
||||
|
||||
//=========================================================
|
||||
// CBaseHLBludgeonWeapon
|
||||
//=========================================================
|
||||
class CBaseHLBludgeonWeapon : public CBaseHLCombatWeapon
|
||||
{
|
||||
DECLARE_CLASS( CBaseHLBludgeonWeapon, CBaseHLCombatWeapon );
|
||||
public:
|
||||
CBaseHLBludgeonWeapon();
|
||||
|
||||
DECLARE_SERVERCLASS();
|
||||
|
||||
virtual void Spawn( void );
|
||||
virtual void Precache( void );
|
||||
|
||||
//Attack functions
|
||||
virtual void PrimaryAttack( void );
|
||||
virtual void SecondaryAttack( void );
|
||||
|
||||
virtual void ItemPostFrame( void );
|
||||
|
||||
//Functions to select animation sequences
|
||||
virtual Activity GetPrimaryAttackActivity( void ) { return ACT_VM_HITCENTER; }
|
||||
virtual Activity GetSecondaryAttackActivity( void ) { return ACT_VM_HITCENTER2; }
|
||||
|
||||
virtual float GetFireRate( void ) { return 0.2f; }
|
||||
virtual float GetRange( void ) { return 32.0f; }
|
||||
virtual float GetDamageForActivity( Activity hitActivity ) { return 1.0f; }
|
||||
|
||||
virtual int CapabilitiesGet( void );
|
||||
virtual int WeaponMeleeAttack1Condition( float flDot, float flDist );
|
||||
|
||||
protected:
|
||||
virtual void ImpactEffect( trace_t &trace );
|
||||
|
||||
private:
|
||||
bool ImpactWater( const Vector &start, const Vector &end );
|
||||
void Swing( int bIsSecondary );
|
||||
void Hit( trace_t &traceHit, Activity nHitActivity );
|
||||
Activity ChooseIntersectionPointAndActivity( trace_t &hitTrace, const Vector &mins, const Vector &maxs, CBasePlayer *pOwner );
|
||||
};
|
||||
|
||||
#endif
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: The class from which all bludgeon melee
|
||||
// weapons are derived.
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include "basehlcombatweapon.h"
|
||||
|
||||
#ifndef BASEBLUDGEONWEAPON_H
|
||||
#define BASEBLUDGEONWEAPON_H
|
||||
|
||||
//=========================================================
|
||||
// CBaseHLBludgeonWeapon
|
||||
//=========================================================
|
||||
class CBaseHLBludgeonWeapon : public CBaseHLCombatWeapon
|
||||
{
|
||||
DECLARE_CLASS( CBaseHLBludgeonWeapon, CBaseHLCombatWeapon );
|
||||
public:
|
||||
CBaseHLBludgeonWeapon();
|
||||
|
||||
DECLARE_SERVERCLASS();
|
||||
|
||||
virtual void Spawn( void );
|
||||
virtual void Precache( void );
|
||||
|
||||
//Attack functions
|
||||
virtual void PrimaryAttack( void );
|
||||
virtual void SecondaryAttack( void );
|
||||
|
||||
virtual void ItemPostFrame( void );
|
||||
|
||||
//Functions to select animation sequences
|
||||
virtual Activity GetPrimaryAttackActivity( void ) { return ACT_VM_HITCENTER; }
|
||||
virtual Activity GetSecondaryAttackActivity( void ) { return ACT_VM_HITCENTER2; }
|
||||
|
||||
virtual float GetFireRate( void ) { return 0.2f; }
|
||||
virtual float GetRange( void ) { return 32.0f; }
|
||||
virtual float GetDamageForActivity( Activity hitActivity ) { return 1.0f; }
|
||||
|
||||
virtual int CapabilitiesGet( void );
|
||||
virtual int WeaponMeleeAttack1Condition( float flDot, float flDist );
|
||||
|
||||
protected:
|
||||
virtual void ImpactEffect( trace_t &trace );
|
||||
|
||||
private:
|
||||
bool ImpactWater( const Vector &start, const Vector &end );
|
||||
void Swing( int bIsSecondary );
|
||||
void Hit( trace_t &traceHit, Activity nHitActivity );
|
||||
Activity ChooseIntersectionPointAndActivity( trace_t &hitTrace, const Vector &mins, const Vector &maxs, CBasePlayer *pOwner );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1300,8 +1300,6 @@ Killed
|
||||
*/
|
||||
void CBaseCombatCharacter::Event_Killed( const CTakeDamageInfo &info )
|
||||
{
|
||||
extern ConVar npc_vphysics;
|
||||
|
||||
// Advance life state to dying
|
||||
m_lifeState = LIFE_DYING;
|
||||
|
||||
@ -2858,7 +2856,7 @@ void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrc, float flRa
|
||||
// be less than 128 units.
|
||||
float soundRadius = max( 128.0f, flRadius * 1.5 );
|
||||
|
||||
CSoundEnt::InsertSound( SOUND_COMBAT | SOUND_CONTEXT_EXPLOSION, vecSrc, soundRadius, 0.25, info.GetInflictor() );
|
||||
CSoundEnt::InsertSound( SOUND_COMBAT | SOUND_CONTEXT_EXPLOSION, vecSrc, static_cast<int>(soundRadius), 0.25, info.GetInflictor() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ class CWeaponLOSFilter : public CTraceFilterSkipTwoEntities
|
||||
{
|
||||
DECLARE_CLASS( CWeaponLOSFilter, CTraceFilterSkipTwoEntities );
|
||||
public:
|
||||
CWeaponLOSFilter::CWeaponLOSFilter( IHandleEntity *pHandleEntity, IHandleEntity *pHandleEntity2, int collisionGroup ) :
|
||||
CWeaponLOSFilter( IHandleEntity *pHandleEntity, IHandleEntity *pHandleEntity2, int collisionGroup ) :
|
||||
CTraceFilterSkipTwoEntities( pHandleEntity, pHandleEntity2, collisionGroup )
|
||||
{
|
||||
}
|
||||
|
@ -547,8 +547,8 @@ void CBaseEntity::AddTimedOverlay( const char *msg, int endTime )
|
||||
int len = strlen(msg);
|
||||
pNewTO->msg = new char[len + 1];
|
||||
Q_strncpy(pNewTO->msg,msg, len+1);
|
||||
pNewTO->msgEndTime = gpGlobals->curtime + endTime;
|
||||
pNewTO->msgStartTime = gpGlobals->curtime;
|
||||
pNewTO->msgEndTime = static_cast<int>(gpGlobals->curtime + endTime);
|
||||
pNewTO->msgStartTime = static_cast<int>(gpGlobals->curtime);
|
||||
pNewTO->pNextTimedOverlay = m_pTimedOverlay;
|
||||
m_pTimedOverlay = pNewTO;
|
||||
}
|
||||
@ -689,7 +689,7 @@ void CBaseEntity::DrawTimedOverlays(void)
|
||||
// If messages aren't paused fade out
|
||||
if (!CBaseEntity::Debug_IsPaused())
|
||||
{
|
||||
nAlpha = 255*((gpGlobals->curtime - pTO->msgStartTime)/(pTO->msgEndTime - pTO->msgStartTime));
|
||||
nAlpha = static_cast<int>(255*((gpGlobals->curtime - pTO->msgStartTime)/(pTO->msgEndTime - pTO->msgStartTime)));
|
||||
}
|
||||
int r = 185;
|
||||
int g = 145;
|
||||
@ -3300,7 +3300,7 @@ void CBaseEntity::DrawInputOverlay(const char *szInputName, CBaseEntity *pCaller
|
||||
{
|
||||
Q_snprintf( bigstring,sizeof(bigstring), "%3.1f (%s) <-- (%s)\n", gpGlobals->curtime, szInputName, pCaller ? pCaller->GetDebugName() : NULL);
|
||||
}
|
||||
AddTimedOverlay(bigstring, 10.0);
|
||||
AddTimedOverlay(bigstring, 10);
|
||||
|
||||
if ( Value.FieldType() == FIELD_INTEGER )
|
||||
{
|
||||
@ -3331,7 +3331,7 @@ void CBaseEntity::DrawOutputOverlay(CEventAction *ev)
|
||||
{
|
||||
Q_snprintf( bigstring,sizeof(bigstring), "%3.1f (%s) --> (%s)\n", gpGlobals->curtime, STRING(ev->m_iTargetInput), STRING(ev->m_iTarget));
|
||||
}
|
||||
AddTimedOverlay(bigstring, 10.0);
|
||||
AddTimedOverlay(bigstring, 10);
|
||||
|
||||
// Now print to the console
|
||||
if ( ev->m_flDelay )
|
||||
@ -4545,7 +4545,7 @@ void CC_Find_Ent( void )
|
||||
if ( bMatches )
|
||||
{
|
||||
iCount++;
|
||||
Msg(" '%s' : '%s' (entindex %d) \n", ent->GetClassname(), ent->GetEntityName(), ent->entindex() );
|
||||
Msg(" '%s' : '%s' (entindex %d) \n", ent->GetClassname(), STRING(ent->GetEntityName()), ent->entindex() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -4607,6 +4607,8 @@ void CC_Ent_Dump( void )
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// don't print out the duplicate keys
|
||||
@ -6381,8 +6383,8 @@ void CBaseEntity::SUB_PerformFadeOut( void )
|
||||
dt = 0.1f;
|
||||
}
|
||||
m_nRenderMode = kRenderTransTexture;
|
||||
int speed = max(1,256*dt); // fade out over 1 second
|
||||
SetRenderColorA( UTIL_Approach( 0, m_clrRender->a, speed ) );
|
||||
int speed = static_cast<int>(max(1,256*dt)); // fade out over 1 second
|
||||
SetRenderColorA( static_cast<byte>(UTIL_Approach( 0, m_clrRender->a, speed )) );
|
||||
}
|
||||
|
||||
bool CBaseEntity::SUB_AllowedToFade( void )
|
||||
|
@ -1007,21 +1007,21 @@ public:
|
||||
|
||||
ENTITYFUNCPTR TouchSet( ENTITYFUNCPTR func, char *name )
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == MFP_SIZE );
|
||||
m_pfnTouch = func;
|
||||
FunctionCheck( (void *)*((int *)((char *)this + ( offsetof(CBaseEntity,m_pfnTouch)))), name );
|
||||
return func;
|
||||
}
|
||||
USEPTR UseSet( USEPTR func, char *name )
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == MFP_SIZE );
|
||||
m_pfnUse = func;
|
||||
FunctionCheck( (void *)*((int *)((char *)this + ( offsetof(CBaseEntity,m_pfnUse)))), name );
|
||||
return func;
|
||||
}
|
||||
ENTITYFUNCPTR BlockedSet( ENTITYFUNCPTR func, char *name )
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == MFP_SIZE );
|
||||
m_pfnBlocked = func;
|
||||
FunctionCheck( (void *)*((int *)((char *)this + ( offsetof(CBaseEntity,m_pfnBlocked)))), name );
|
||||
return func;
|
||||
@ -1789,7 +1789,7 @@ inline void CBaseEntity::SetName( string_t newName )
|
||||
|
||||
inline bool CBaseEntity::NameMatches( const char *pszNameOrWildcard )
|
||||
{
|
||||
if ( IDENT_STRINGS(m_iName, pszNameOrWildcard) )
|
||||
if ( IDENT_STRINGS(m_iName, MAKE_STRING(pszNameOrWildcard)) )
|
||||
return true;
|
||||
return NameMatchesComplex( pszNameOrWildcard );
|
||||
}
|
||||
@ -1803,7 +1803,7 @@ inline bool CBaseEntity::NameMatches( string_t nameStr )
|
||||
|
||||
inline bool CBaseEntity::ClassMatches( const char *pszClassOrWildcard )
|
||||
{
|
||||
if ( IDENT_STRINGS(m_iClassname, pszClassOrWildcard ) )
|
||||
if ( IDENT_STRINGS(m_iClassname, MAKE_STRING(pszClassOrWildcard) ) )
|
||||
return true;
|
||||
return ClassMatchesComplex( pszClassOrWildcard );
|
||||
}
|
||||
|
@ -361,6 +361,8 @@ bool CBaseFlex::ClearSceneEvent( CSceneEventInfo *info, bool fastKill, bool canc
|
||||
}
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -642,7 +644,7 @@ bool CBaseFlex::HandleStartGestureSceneEvent( CSceneEventInfo *info, CChoreoScen
|
||||
if ( looping )
|
||||
{
|
||||
DevMsg( 1, "vcd error, gesture %s of model %s is marked as STUDIO_LOOPING!\n",
|
||||
event->GetParameters(), GetModelName() );
|
||||
event->GetParameters(), STRING(GetModelName()) );
|
||||
}
|
||||
|
||||
SetLayerLooping( info->m_iLayer, false ); // force to not loop
|
||||
@ -731,6 +733,9 @@ bool CBaseFlex::StartSceneEvent( CSceneEventInfo *info, CChoreoScene *scene, CCh
|
||||
|
||||
case CChoreoEvent::EXPRESSION: // These are handled client-side
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -47,7 +47,7 @@ void CBaseGrenadeConcussion::FallThink(void)
|
||||
Remove( );
|
||||
return;
|
||||
}
|
||||
CSoundEnt::InsertSound ( SOUND_DANGER, GetAbsOrigin() + GetAbsVelocity() * 0.5, GetAbsVelocity().Length( ), 0.2 );
|
||||
CSoundEnt::InsertSound ( SOUND_DANGER, GetAbsOrigin() + GetAbsVelocity() * 0.5, static_cast<int>(GetAbsVelocity().Length()), 0.2 );
|
||||
|
||||
SetNextThink( gpGlobals->curtime + random->RandomFloat(0.05, 0.1) );
|
||||
|
||||
|
@ -1,65 +1,65 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#if !defined( BASETEMPENTITY_H )
|
||||
#define BASETEMPENTITY_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "edict.h"
|
||||
|
||||
// This is the base class for TEMP ENTITIES that use the
|
||||
// event system to propagate
|
||||
class CBaseTempEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS_NOBASE( CBaseTempEntity );
|
||||
DECLARE_SERVERCLASS();
|
||||
|
||||
CBaseTempEntity( const char *name );
|
||||
virtual ~CBaseTempEntity( void );
|
||||
|
||||
const char *GetName( void );
|
||||
|
||||
// Force all derived classes to implement a test
|
||||
virtual void Test( const Vector& current_origin, const QAngle& current_angles );
|
||||
|
||||
virtual void Create( IRecipientFilter& filter, float delay = 0.0 );
|
||||
|
||||
virtual void Precache( void );
|
||||
|
||||
CBaseTempEntity *GetNext( void );
|
||||
|
||||
// Get list of tempentities
|
||||
static CBaseTempEntity *GetList( void );
|
||||
|
||||
// Called at startup to allow temp entities to precache any models/sounds that they need
|
||||
static void PrecacheTempEnts( void );
|
||||
|
||||
void NetworkStateChanged() {} // TE's are sent out right away so we don't track whether state changes or not,
|
||||
// but we want to allow CNetworkVars.
|
||||
void NetworkStateChanged( void *pVar ) {}
|
||||
|
||||
private:
|
||||
// Descriptive name, for when running tests
|
||||
const char *m_pszName;
|
||||
|
||||
// Next in chain
|
||||
CBaseTempEntity *m_pNext;
|
||||
|
||||
// ConVars add themselves to this list for the executable. Then ConVarMgr::Init() runs through
|
||||
// all the console variables and registers them.
|
||||
static CBaseTempEntity *s_pTempEntities;
|
||||
};
|
||||
|
||||
#endif // BASETEMPENTITY_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#if !defined( BASETEMPENTITY_H )
|
||||
#define BASETEMPENTITY_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "edict.h"
|
||||
|
||||
// This is the base class for TEMP ENTITIES that use the
|
||||
// event system to propagate
|
||||
class CBaseTempEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS_NOBASE( CBaseTempEntity );
|
||||
DECLARE_SERVERCLASS();
|
||||
|
||||
CBaseTempEntity( const char *name );
|
||||
virtual ~CBaseTempEntity( void );
|
||||
|
||||
const char *GetName( void );
|
||||
|
||||
// Force all derived classes to implement a test
|
||||
virtual void Test( const Vector& current_origin, const QAngle& current_angles );
|
||||
|
||||
virtual void Create( IRecipientFilter& filter, float delay = 0.0 );
|
||||
|
||||
virtual void Precache( void );
|
||||
|
||||
CBaseTempEntity *GetNext( void );
|
||||
|
||||
// Get list of tempentities
|
||||
static CBaseTempEntity *GetList( void );
|
||||
|
||||
// Called at startup to allow temp entities to precache any models/sounds that they need
|
||||
static void PrecacheTempEnts( void );
|
||||
|
||||
void NetworkStateChanged() {} // TE's are sent out right away so we don't track whether state changes or not,
|
||||
// but we want to allow CNetworkVars.
|
||||
void NetworkStateChanged( void *pVar ) {}
|
||||
|
||||
private:
|
||||
// Descriptive name, for when running tests
|
||||
const char *m_pszName;
|
||||
|
||||
// Next in chain
|
||||
CBaseTempEntity *m_pNext;
|
||||
|
||||
// ConVars add themselves to this list for the executable. Then ConVarMgr::Init() runs through
|
||||
// all the console variables and registers them.
|
||||
static CBaseTempEntity *s_pTempEntities;
|
||||
};
|
||||
|
||||
#endif // BASETEMPENTITY_H
|
||||
|
@ -1,17 +1,17 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Server side view model object
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#if !defined( BASEVIEWMODEL_H )
|
||||
#define BASEVIEWMODEL_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "baseviewmodel_shared.h"
|
||||
|
||||
#endif // BASEVIEWMODEL_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Server side view model object
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#if !defined( BASEVIEWMODEL_H )
|
||||
#define BASEVIEWMODEL_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "baseviewmodel_shared.h"
|
||||
|
||||
#endif // BASEVIEWMODEL_H
|
||||
|
@ -325,8 +325,8 @@ inline CBitStringT<BASE_OPS>::CBitStringT(int numBits)
|
||||
template <class BASE_OPS>
|
||||
inline bool CBitStringT<BASE_OPS>::GetBit( int bitNum ) const
|
||||
{
|
||||
Assert( bitNum >= 0 && bitNum < Size() );
|
||||
const int *pInt = GetInts() + BitString_Int( bitNum );
|
||||
Assert( bitNum >= 0 && bitNum < this->Size() );
|
||||
const int *pInt = this->GetInts() + BitString_Int( bitNum );
|
||||
return ( ( *pInt & BitString_Bit( bitNum ) ) != 0 );
|
||||
}
|
||||
|
||||
@ -335,8 +335,8 @@ inline bool CBitStringT<BASE_OPS>::GetBit( int bitNum ) const
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::SetBit( int bitNum )
|
||||
{
|
||||
Assert( bitNum >= 0 && bitNum < Size() );
|
||||
int *pInt = GetInts() + BitString_Int( bitNum );
|
||||
Assert( bitNum >= 0 && bitNum < this->Size() );
|
||||
int *pInt = this->GetInts() + BitString_Int( bitNum );
|
||||
*pInt |= BitString_Bit( bitNum );
|
||||
}
|
||||
|
||||
@ -345,8 +345,8 @@ inline void CBitStringT<BASE_OPS>::SetBit( int bitNum )
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::ClearBit(int bitNum)
|
||||
{
|
||||
Assert( bitNum >= 0 && bitNum < Size() );
|
||||
int *pInt = GetInts() + BitString_Int( bitNum );
|
||||
Assert( bitNum >= 0 && bitNum < this->Size() );
|
||||
int *pInt = this->GetInts() + BitString_Int( bitNum );
|
||||
*pInt &= ~BitString_Bit( bitNum );
|
||||
}
|
||||
|
||||
@ -362,10 +362,10 @@ inline void CBitStringT<BASE_OPS>::And(const CBitStringT &addStr, CBitStringT *o
|
||||
ValidateOperand( *out );
|
||||
|
||||
int * pDest = out->GetInts();
|
||||
const int *pOperand1 = GetInts();
|
||||
const int *pOperand1 = this->GetInts();
|
||||
const int *pOperand2 = addStr.GetInts();
|
||||
|
||||
for (int i = GetNumInts() - 1; i >= 0 ; --i)
|
||||
for (int i = this->GetNumInts() - 1; i >= 0 ; --i)
|
||||
{
|
||||
pDest[i] = pOperand1[i] & pOperand2[i];
|
||||
}
|
||||
@ -383,10 +383,10 @@ inline void CBitStringT<BASE_OPS>::Or(const CBitStringT &orStr, CBitStringT *out
|
||||
ValidateOperand( *out );
|
||||
|
||||
int * pDest = out->GetInts();
|
||||
const int *pOperand1 = GetInts();
|
||||
const int *pOperand1 = this->GetInts();
|
||||
const int *pOperand2 = orStr.GetInts();
|
||||
|
||||
for (int i = GetNumInts() - 1; i >= 0; --i)
|
||||
for (int i = this->GetNumInts() - 1; i >= 0; --i)
|
||||
{
|
||||
pDest[i] = pOperand1[i] | pOperand2[i];
|
||||
}
|
||||
@ -401,10 +401,10 @@ template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::Xor(const CBitStringT &xorStr, CBitStringT *out) const
|
||||
{
|
||||
int * pDest = out->GetInts();
|
||||
const int *pOperand1 = GetInts();
|
||||
const int *pOperand1 = this->GetInts();
|
||||
const int *pOperand2 = xorStr.GetInts();
|
||||
|
||||
for (int i = GetNumInts() - 1; i >= 0; --i)
|
||||
for (int i = this->GetNumInts() - 1; i >= 0; --i)
|
||||
{
|
||||
pDest[i] = pOperand1[i] ^ pOperand2[i];
|
||||
}
|
||||
@ -421,9 +421,9 @@ inline void CBitStringT<BASE_OPS>::Not(CBitStringT *out) const
|
||||
ValidateOperand( *out );
|
||||
|
||||
int * pDest = out->GetInts();
|
||||
const int *pOperand = GetInts();
|
||||
const int *pOperand = this->GetInts();
|
||||
|
||||
for (int i = GetNumInts() - 1; i >= 0; --i)
|
||||
for (int i = this->GetNumInts() - 1; i >= 0; --i)
|
||||
{
|
||||
pDest[i] = ~(pOperand[i]);
|
||||
}
|
||||
@ -440,7 +440,7 @@ inline void CBitStringT<BASE_OPS>::Copy(CBitStringT *out) const
|
||||
ValidateOperand( *out );
|
||||
Assert( out != this );
|
||||
|
||||
memcpy( out->GetInts(), GetInts(), GetNumInts() * sizeof( int ) );
|
||||
memcpy( out->GetInts(), this->GetInts(), this->GetNumInts() * sizeof( int ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -454,11 +454,11 @@ inline bool CBitStringT<BASE_OPS>::IsAllClear(void) const
|
||||
// Number of available bits may be more than the number
|
||||
// actually used, so make sure to mask out unused bits
|
||||
// before testing for zero
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[this->GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
|
||||
for (int i = GetNumInts() - 1; i >= 0; --i)
|
||||
for (int i = this->GetNumInts() - 1; i >= 0; --i)
|
||||
{
|
||||
if ( GetInts()[i] !=0 )
|
||||
if ( this->GetInts()[i] !=0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -477,11 +477,11 @@ inline bool CBitStringT<BASE_OPS>::IsAllSet(void) const
|
||||
// Number of available bits may be more than the number
|
||||
// actually used, so make sure to mask out unused bits
|
||||
// before testing for set bits
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[GetNumInts()-1] |= CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[this->GetNumInts()-1] |= CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
|
||||
for (int i = GetNumInts() - 1; i >= 0; --i)
|
||||
for (int i = this->GetNumInts() - 1; i >= 0; --i)
|
||||
{
|
||||
if ( GetInts()[i] != ~0 )
|
||||
if ( this->GetInts()[i] != ~0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -497,8 +497,8 @@ inline bool CBitStringT<BASE_OPS>::IsAllSet(void) const
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::SetAllBits(void)
|
||||
{
|
||||
if ( GetInts() )
|
||||
memset( GetInts(), 0xff, GetNumInts() * sizeof(int) );
|
||||
if ( this->GetInts() )
|
||||
memset( this->GetInts(), 0xff, this->GetNumInts() * sizeof(int) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -509,8 +509,8 @@ inline void CBitStringT<BASE_OPS>::SetAllBits(void)
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::ClearAllBits(void)
|
||||
{
|
||||
if ( GetInts() )
|
||||
memset( GetInts(), 0, GetNumInts() * sizeof(int) );
|
||||
if ( this->GetInts() )
|
||||
memset( this->GetInts(), 0, this->GetNumInts() * sizeof(int) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -518,8 +518,8 @@ inline void CBitStringT<BASE_OPS>::ClearAllBits(void)
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::DebugPrintBits(void) const
|
||||
{
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
DebugPrintBitStringBits( GetInts(), GetNumInts() );
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[this->GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
DebugPrintBitStringBits( this->GetInts(), this->GetNumInts() );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -527,8 +527,8 @@ inline void CBitStringT<BASE_OPS>::DebugPrintBits(void) const
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::SaveBitString(CUtlBuffer& buf) const
|
||||
{
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
::SaveBitString( GetInts(), GetNumInts(), buf );
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[this->GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask(); // external semantics of const retained
|
||||
::SaveBitString( this->GetInts(), this->GetNumInts(), buf );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -536,8 +536,8 @@ inline void CBitStringT<BASE_OPS>::SaveBitString(CUtlBuffer& buf) const
|
||||
template <class BASE_OPS>
|
||||
inline void CBitStringT<BASE_OPS>::LoadBitString(CUtlBuffer& buf)
|
||||
{
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask();
|
||||
::LoadBitString( GetInts(), GetNumInts(), buf );
|
||||
(const_cast<CBitStringT *>(this))->GetInts()[this->GetNumInts()-1] &= ~CBitStringT<BASE_OPS>::GetEndMask();
|
||||
::LoadBitString( this->GetInts(), this->GetNumInts(), buf );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -701,7 +701,7 @@ void CFuncRotating::RampPitchVol( void )
|
||||
|
||||
float fpitch = FANPITCHMIN + (FANPITCHMAX - FANPITCHMIN) * fpct;
|
||||
|
||||
int pitch = clamp(fpitch, 0, 255);
|
||||
int pitch = static_cast<int>(clamp(fpitch, 0, 255));
|
||||
if (pitch == PITCH_NORM)
|
||||
{
|
||||
pitch = PITCH_NORM - 1;
|
||||
|
2970
dlls/buttons.cpp
2970
dlls/buttons.cpp
File diff suppressed because it is too large
Load Diff
@ -1200,6 +1200,7 @@ void variant_t::SetOther( void *data )
|
||||
|
||||
case FIELD_EHANDLE: *((EHANDLE *)data) = eVal; break;
|
||||
case FIELD_CLASSPTR: *((CBaseEntity **)data) = eVal; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1252,6 +1253,8 @@ bool variant_t::Convert( fieldtype_t newType )
|
||||
SetBool( iVal != 0 );
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1271,6 +1274,8 @@ bool variant_t::Convert( fieldtype_t newType )
|
||||
SetBool( flVal != 0 );
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1358,6 +1363,9 @@ bool variant_t::Convert( fieldtype_t newType )
|
||||
SetEntity( ent );
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1377,9 +1385,13 @@ bool variant_t::Convert( fieldtype_t newType )
|
||||
}
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// invalid conversion
|
||||
@ -1457,6 +1469,9 @@ const char *variant_t::ToString( void ) const
|
||||
Q_strncpy( szBuf, pszName, 512 );
|
||||
return (szBuf);
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return("No conversion to string");
|
||||
|
@ -830,7 +830,7 @@ void CC_Player_TestDispatchEffect( void )
|
||||
AngleVectors( vecAngles, &data.m_vNormal );
|
||||
}
|
||||
data.m_nEntIndex = pPlayer->entindex();
|
||||
data.m_fFlags = flags;
|
||||
data.m_fFlags = static_cast<int>(flags);
|
||||
data.m_flMagnitude = magnitude;
|
||||
data.m_flScale = scale;
|
||||
DispatchEffect( (char *)engine->Cmd_Argv(1), data );
|
||||
@ -1148,6 +1148,7 @@ void CC_HurtMe_f(void)
|
||||
|
||||
static ConCommand hurtme("hurtme", CC_HurtMe_f, "Hurts the player.\n\tArguments: <health to lose>", FCVAR_CHEAT);
|
||||
|
||||
#ifdef _DEBUG
|
||||
static bool IsInGroundList( CBaseEntity *ent, CBaseEntity *ground )
|
||||
{
|
||||
if ( !ground || !ent )
|
||||
@ -1169,6 +1170,7 @@ static bool IsInGroundList( CBaseEntity *ent, CBaseEntity *ground )
|
||||
return false;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static int DescribeGroundList( CBaseEntity *ent )
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ void CTargetChangeGravity::InputChangeGrav( inputdata_t &inputdata )
|
||||
|
||||
// Save the gravity to restore it in InputResetGrav
|
||||
if ( m_iOldGrav )
|
||||
m_iOldGrav = pl->GetGravity();
|
||||
m_iOldGrav = static_cast<int>(pl->GetGravity());
|
||||
|
||||
pl->SetGravity(m_iGravity);
|
||||
}
|
||||
|
142
dlls/cplane.cpp
142
dlls/cplane.cpp
@ -1,71 +1,71 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "game.h"
|
||||
#include "cplane.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
//=========================================================
|
||||
// Plane
|
||||
//=========================================================
|
||||
CPlane::CPlane ( void )
|
||||
{
|
||||
m_fInitialized = FALSE;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
// InitializePlane - Takes a normal for the plane and a
|
||||
// point on the plane and
|
||||
//=========================================================
|
||||
void CPlane::InitializePlane ( const Vector &vecNormal, const Vector &vecPoint )
|
||||
{
|
||||
m_vecNormal = vecNormal;
|
||||
m_flDist = DotProduct ( m_vecNormal, vecPoint );
|
||||
m_fInitialized = TRUE;
|
||||
}
|
||||
|
||||
|
||||
//=========================================================
|
||||
// PointInFront - determines whether the given vector is
|
||||
// in front of the plane.
|
||||
//=========================================================
|
||||
bool CPlane::PointInFront ( const Vector &vecPoint )
|
||||
{
|
||||
float flFace;
|
||||
|
||||
if ( !m_fInitialized )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flFace = DotProduct ( m_vecNormal, vecPoint ) - m_flDist;
|
||||
|
||||
if ( flFace >= 0 )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
//=========================================================
|
||||
float CPlane::PointDist ( const Vector &vecPoint )
|
||||
{
|
||||
float flDist;
|
||||
|
||||
if ( !m_fInitialized )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flDist = DotProduct ( m_vecNormal, vecPoint ) - m_flDist;
|
||||
|
||||
return flDist;
|
||||
}
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "game.h"
|
||||
#include "cplane.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
//=========================================================
|
||||
// Plane
|
||||
//=========================================================
|
||||
CPlane::CPlane ( void )
|
||||
{
|
||||
m_fInitialized = FALSE;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
// InitializePlane - Takes a normal for the plane and a
|
||||
// point on the plane and
|
||||
//=========================================================
|
||||
void CPlane::InitializePlane ( const Vector &vecNormal, const Vector &vecPoint )
|
||||
{
|
||||
m_vecNormal = vecNormal;
|
||||
m_flDist = DotProduct ( m_vecNormal, vecPoint );
|
||||
m_fInitialized = TRUE;
|
||||
}
|
||||
|
||||
|
||||
//=========================================================
|
||||
// PointInFront - determines whether the given vector is
|
||||
// in front of the plane.
|
||||
//=========================================================
|
||||
bool CPlane::PointInFront ( const Vector &vecPoint )
|
||||
{
|
||||
float flFace;
|
||||
|
||||
if ( !m_fInitialized )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flFace = DotProduct ( m_vecNormal, vecPoint ) - m_flDist;
|
||||
|
||||
if ( flFace >= 0 )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
//=========================================================
|
||||
float CPlane::PointDist ( const Vector &vecPoint )
|
||||
{
|
||||
float flDist;
|
||||
|
||||
if ( !m_fInitialized )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flDist = DotProduct ( m_vecNormal, vecPoint ) - m_flDist;
|
||||
|
||||
return flDist;
|
||||
}
|
||||
|
@ -1,44 +1,44 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#pragma once
|
||||
|
||||
#ifndef CPLANE_H
|
||||
#define CPLANE_H
|
||||
|
||||
//=========================================================
|
||||
// Plane
|
||||
//=========================================================
|
||||
class CPlane
|
||||
{
|
||||
public:
|
||||
CPlane ( void );
|
||||
|
||||
//=========================================================
|
||||
// InitializePlane - Takes a normal for the plane and a
|
||||
// point on the plane and
|
||||
//=========================================================
|
||||
void InitializePlane ( const Vector &vecNormal, const Vector &vecPoint );
|
||||
|
||||
//=========================================================
|
||||
// PointInFront - determines whether the given vector is
|
||||
// in front of the plane.
|
||||
//=========================================================
|
||||
bool PointInFront ( const Vector &vecPoint );
|
||||
|
||||
//=========================================================
|
||||
// How far off the plane is this point?
|
||||
//=========================================================
|
||||
float PointDist( const Vector &vecPoint );
|
||||
|
||||
private:
|
||||
Vector m_vecNormal;
|
||||
float m_flDist;
|
||||
bool m_fInitialized;
|
||||
};
|
||||
|
||||
#endif //CPLANE_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#pragma once
|
||||
|
||||
#ifndef CPLANE_H
|
||||
#define CPLANE_H
|
||||
|
||||
//=========================================================
|
||||
// Plane
|
||||
//=========================================================
|
||||
class CPlane
|
||||
{
|
||||
public:
|
||||
CPlane ( void );
|
||||
|
||||
//=========================================================
|
||||
// InitializePlane - Takes a normal for the plane and a
|
||||
// point on the plane and
|
||||
//=========================================================
|
||||
void InitializePlane ( const Vector &vecNormal, const Vector &vecPoint );
|
||||
|
||||
//=========================================================
|
||||
// PointInFront - determines whether the given vector is
|
||||
// in front of the plane.
|
||||
//=========================================================
|
||||
bool PointInFront ( const Vector &vecPoint );
|
||||
|
||||
//=========================================================
|
||||
// How far off the plane is this point?
|
||||
//=========================================================
|
||||
float PointDist( const Vector &vecPoint );
|
||||
|
||||
private:
|
||||
Vector m_vecNormal;
|
||||
float m_flDist;
|
||||
bool m_fInitialized;
|
||||
};
|
||||
|
||||
#endif //CPLANE_H
|
||||
|
@ -175,7 +175,7 @@ void CTerrainMorph::MorphThink( void )
|
||||
//Msg( "Strength: %f - Radius: %f\n", params.m_flStrength, params.m_flRadius );
|
||||
|
||||
TerrainMod_Add( type, params );
|
||||
m_iIterations += params.m_flStrength;
|
||||
m_iIterations += static_cast<int>(params.m_flStrength);
|
||||
}
|
||||
#if 0
|
||||
NDebugOverlay::Line( m_Params.m_vecLocation, m_Params.m_vecLocation + Vector( 200, 200, 0 ), 0,255,0, true, 3 );
|
||||
|
@ -214,11 +214,11 @@ bool CBaseDoor::KeyValue( const char *szKeyName, const char *szValue )
|
||||
{
|
||||
if (FStrEq(szKeyName, "locked_sentence"))
|
||||
{
|
||||
m_bLockedSentence = atof(szValue);
|
||||
m_bLockedSentence = static_cast<byte>(atof(szValue));
|
||||
}
|
||||
else if (FStrEq(szKeyName, "unlocked_sentence"))
|
||||
{
|
||||
m_bUnlockedSentence = atof(szValue);
|
||||
m_bUnlockedSentence = static_cast<byte>(atof(szValue));
|
||||
}
|
||||
else
|
||||
return BaseClass::KeyValue( szKeyName, szValue );
|
||||
@ -454,6 +454,8 @@ void CBaseDoor::Activate( void )
|
||||
case TS_AT_BOTTOM:
|
||||
UpdateAreaPortals( false );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef HL1_DLL
|
||||
|
@ -968,7 +968,7 @@ void CTestEffect::Think( void )
|
||||
for (i = 0; i < m_iBeam; i++)
|
||||
{
|
||||
t = (gpGlobals->curtime - m_flBeamTime[i]) / ( 3 + m_flStartTime - m_flBeamTime[i]);
|
||||
m_pBeam[i]->SetBrightness( 255 * t );
|
||||
m_pBeam[i]->SetBrightness( static_cast<int>(255 * t) );
|
||||
// m_pBeam[i]->SetScrollRate( 20 * t );
|
||||
}
|
||||
SetNextThink( gpGlobals->curtime + 0.1f );
|
||||
@ -1149,11 +1149,11 @@ void CBlood::InputEmitBlood( inputdata_t &inputdata )
|
||||
{
|
||||
if ( HasSpawnFlags( SF_BLOOD_STREAM ) )
|
||||
{
|
||||
UTIL_BloodStream( BloodPosition(inputdata.pActivator), Direction(), Color(), BloodAmount() );
|
||||
UTIL_BloodStream( BloodPosition(inputdata.pActivator), Direction(), Color(), static_cast<int>(BloodAmount()) );
|
||||
}
|
||||
else
|
||||
{
|
||||
UTIL_BloodDrips( BloodPosition(inputdata.pActivator), Direction(), Color(), BloodAmount() );
|
||||
UTIL_BloodDrips( BloodPosition(inputdata.pActivator), Direction(), Color(), static_cast<int>(BloodAmount()) );
|
||||
}
|
||||
|
||||
if ( HasSpawnFlags( SF_BLOOD_DECAL ) )
|
||||
@ -1190,7 +1190,7 @@ void CBlood::InputEmitBlood( inputdata_t &inputdata )
|
||||
nFlags |= FX_BLOODSPRAY_GORE;
|
||||
}
|
||||
|
||||
UTIL_BloodSpray(GetAbsOrigin(), Direction(), Color(), BloodAmount(), nFlags);
|
||||
UTIL_BloodSpray(GetAbsOrigin(), Direction(), Color(), static_cast<int>(BloodAmount()), nFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1591,7 +1591,7 @@ void CEnvWind::Spawn( void )
|
||||
SetSolid( SOLID_NONE );
|
||||
AddEffects( EF_NODRAW );
|
||||
|
||||
m_EnvWindShared.Init( entindex(), 0, gpGlobals->frametime, GetLocalAngles().y, 0 );
|
||||
m_EnvWindShared.Init( entindex(), 0, gpGlobals->frametime, static_cast<int>(GetLocalAngles().y), 0 );
|
||||
|
||||
SetThink( &CEnvWind::WindThink );
|
||||
SetNextThink( gpGlobals->curtime );
|
||||
|
@ -1,76 +1,76 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#include "cbase.h"
|
||||
#include "entityblocker.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
LINK_ENTITY_TO_CLASS( entity_blocker, CEntityBlocker );
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : &origin -
|
||||
// &mins -
|
||||
// &maxs -
|
||||
// NULL -
|
||||
// Output : CEntityBlocker
|
||||
//-----------------------------------------------------------------------------
|
||||
CEntityBlocker *CEntityBlocker::Create( const Vector &origin, const Vector &mins, const Vector &maxs, CBaseEntity *pOwner, bool bBlockPhysics )
|
||||
{
|
||||
CEntityBlocker *pBlocker = (CEntityBlocker *) CBaseEntity::Create( "entity_blocker", origin, vec3_angle, pOwner );
|
||||
|
||||
if ( pBlocker != NULL )
|
||||
{
|
||||
pBlocker->SetSize( mins, maxs );
|
||||
if ( bBlockPhysics )
|
||||
{
|
||||
pBlocker->VPhysicsInitStatic();
|
||||
}
|
||||
}
|
||||
|
||||
return pBlocker;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CEntityBlocker::Spawn( void )
|
||||
{
|
||||
SetSolid( SOLID_BBOX );
|
||||
AddSolidFlags( FSOLID_CUSTOMRAYTEST );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Entity blockers don't block tracelines so they don't screw up weapon fire, etc
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CEntityBlocker::TestCollision( const Ray_t &ray, unsigned int mask, trace_t& trace )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose :
|
||||
// Input :
|
||||
// Output :
|
||||
//------------------------------------------------------------------------------
|
||||
void CC_Test_Entity_Blocker( void )
|
||||
{
|
||||
CBasePlayer *pPlayer = UTIL_GetCommandClient();
|
||||
Vector vecForward;
|
||||
pPlayer->GetVectors( &vecForward, NULL, NULL );
|
||||
|
||||
trace_t tr;
|
||||
Vector vecOrigin = pPlayer->GetAbsOrigin() + (vecForward * 256);
|
||||
UTIL_TraceHull( vecOrigin + Vector(0,0,256), vecOrigin - Vector(0,0,256), VEC_HULL_MIN, VEC_HULL_MAX, MASK_SOLID, pPlayer, COLLISION_GROUP_NONE, &tr );
|
||||
if ( !tr.allsolid && !tr.startsolid )
|
||||
{
|
||||
CEntityBlocker::Create( tr.endpos, VEC_HULL_MIN, VEC_HULL_MAX, NULL, true );
|
||||
NDebugOverlay::Box( tr.endpos, VEC_HULL_MIN, VEC_HULL_MAX, 0, 255, 0, 64, 1000.0 );
|
||||
}
|
||||
}
|
||||
static ConCommand test_entity_blocker("test_entity_blocker", CC_Test_Entity_Blocker, "Test command that drops an entity blocker out in front of the player.", FCVAR_CHEAT );
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#include "cbase.h"
|
||||
#include "entityblocker.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
LINK_ENTITY_TO_CLASS( entity_blocker, CEntityBlocker );
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : &origin -
|
||||
// &mins -
|
||||
// &maxs -
|
||||
// NULL -
|
||||
// Output : CEntityBlocker
|
||||
//-----------------------------------------------------------------------------
|
||||
CEntityBlocker *CEntityBlocker::Create( const Vector &origin, const Vector &mins, const Vector &maxs, CBaseEntity *pOwner, bool bBlockPhysics )
|
||||
{
|
||||
CEntityBlocker *pBlocker = (CEntityBlocker *) CBaseEntity::Create( "entity_blocker", origin, vec3_angle, pOwner );
|
||||
|
||||
if ( pBlocker != NULL )
|
||||
{
|
||||
pBlocker->SetSize( mins, maxs );
|
||||
if ( bBlockPhysics )
|
||||
{
|
||||
pBlocker->VPhysicsInitStatic();
|
||||
}
|
||||
}
|
||||
|
||||
return pBlocker;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CEntityBlocker::Spawn( void )
|
||||
{
|
||||
SetSolid( SOLID_BBOX );
|
||||
AddSolidFlags( FSOLID_CUSTOMRAYTEST );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Entity blockers don't block tracelines so they don't screw up weapon fire, etc
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CEntityBlocker::TestCollision( const Ray_t &ray, unsigned int mask, trace_t& trace )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Purpose :
|
||||
// Input :
|
||||
// Output :
|
||||
//------------------------------------------------------------------------------
|
||||
void CC_Test_Entity_Blocker( void )
|
||||
{
|
||||
CBasePlayer *pPlayer = UTIL_GetCommandClient();
|
||||
Vector vecForward;
|
||||
pPlayer->GetVectors( &vecForward, NULL, NULL );
|
||||
|
||||
trace_t tr;
|
||||
Vector vecOrigin = pPlayer->GetAbsOrigin() + (vecForward * 256);
|
||||
UTIL_TraceHull( vecOrigin + Vector(0,0,256), vecOrigin - Vector(0,0,256), VEC_HULL_MIN, VEC_HULL_MAX, MASK_SOLID, pPlayer, COLLISION_GROUP_NONE, &tr );
|
||||
if ( !tr.allsolid && !tr.startsolid )
|
||||
{
|
||||
CEntityBlocker::Create( tr.endpos, VEC_HULL_MIN, VEC_HULL_MAX, NULL, true );
|
||||
NDebugOverlay::Box( tr.endpos, VEC_HULL_MIN, VEC_HULL_MAX, 0, 255, 0, 64, 1000.0 );
|
||||
}
|
||||
}
|
||||
static ConCommand test_entity_blocker("test_entity_blocker", CC_Test_Entity_Blocker, "Test command that drops an entity blocker out in front of the player.", FCVAR_CHEAT );
|
||||
|
@ -146,7 +146,7 @@ public:
|
||||
void Clear()
|
||||
{
|
||||
m_simThinkList.Purge();
|
||||
for ( int i = 0; i < ARRAYSIZE(m_entinfoIndex); i++ )
|
||||
for ( size_t i = 0; i < ARRAYSIZE(m_entinfoIndex); i++ )
|
||||
{
|
||||
m_entinfoIndex[i] = 0xFFFF;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ void CEnvEntityMaker::Activate( void )
|
||||
// check for valid template
|
||||
if ( m_iszTemplate == NULL_STRING )
|
||||
{
|
||||
Warning( "env_entity_maker %s has no template entity!\n", GetEntityName() );
|
||||
Warning( "env_entity_maker %s has no template entity!\n", STRING(GetEntityName()) );
|
||||
UTIL_Remove( this );
|
||||
return;
|
||||
}
|
||||
@ -131,7 +131,7 @@ CPointTemplate *CEnvEntityMaker::FindTemplate()
|
||||
CPointTemplate *pTemplate = dynamic_cast<CPointTemplate *>(gEntList.FindEntityByName( NULL, STRING(m_iszTemplate) ));
|
||||
if ( !pTemplate )
|
||||
{
|
||||
Warning( "env_entity_maker %s failed to find template %s.\n", GetEntityName(), STRING(m_iszTemplate) );
|
||||
Warning( "env_entity_maker %s failed to find template %s.\n", STRING(GetEntityName()), STRING(m_iszTemplate) );
|
||||
}
|
||||
|
||||
return pTemplate;
|
||||
|
@ -1,13 +1,13 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef ENV_ZOOM_H
|
||||
#define ENV_ZOOM_H
|
||||
|
||||
bool CanOverrideEnvZoomOwner( CBaseEntity *pZoomOwner );
|
||||
float GetZoomOwnerDesiredFOV( CBaseEntity *pZoomOwner );
|
||||
|
||||
#endif //ENV_ZOOM_H
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef ENV_ZOOM_H
|
||||
#define ENV_ZOOM_H
|
||||
|
||||
bool CanOverrideEnvZoomOwner( CBaseEntity *pZoomOwner );
|
||||
float GetZoomOwnerDesiredFOV( CBaseEntity *pZoomOwner );
|
||||
|
||||
#endif //ENV_ZOOM_H
|
||||
|
@ -92,7 +92,7 @@ void CEnvMicrophone::Spawn(void)
|
||||
{ SF_MICROPHONE_SOUND_EXPLOSION, SOUND_CONTEXT_EXPLOSION },
|
||||
};
|
||||
|
||||
for (int i = 0; i < sizeof(nFlags) / sizeof(nFlags[0]); i++)
|
||||
for (size_t i = 0; i < sizeof(nFlags) / sizeof(nFlags[0]); i++)
|
||||
{
|
||||
if (m_spawnflags & nFlags[i][0])
|
||||
{
|
||||
|
@ -64,9 +64,9 @@ BEGIN_SIMPLE_DATADESC( FailPosition_t )
|
||||
END_DATADESC();
|
||||
|
||||
CAI_PassengerBehaviorCompanion::CAI_PassengerBehaviorCompanion( void ) :
|
||||
m_flUnseenDuration( 0.0f ),
|
||||
m_flNextOverturnWarning( 0.0f ),
|
||||
m_flOverturnedDuration( 0.0f ),
|
||||
m_flUnseenDuration( 0.0f ),
|
||||
m_nExitAttempts( 0 )
|
||||
{
|
||||
memset( &m_vehicleState, 0, sizeof( m_vehicleState ) );
|
||||
|
@ -70,8 +70,8 @@ impactdamagetable_t gZombiePassengerImpactDamageTable =
|
||||
// Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
CAI_PassengerBehaviorZombie::CAI_PassengerBehaviorZombie( void ) :
|
||||
m_flLastVerticalLean( 0.0f ),
|
||||
m_flLastLateralLean( 0.0f ),
|
||||
m_flLastVerticalLean( 0.0f ),
|
||||
m_flNextLeapTime( 0.0f )
|
||||
{
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class CGravityVortexController : public CBaseEntity
|
||||
|
||||
public:
|
||||
|
||||
CGravityVortexController( void ) : m_flEndTime( 0.0f ), m_flRadius( 256 ), m_flStrength( 256 ), m_flMass( 0.0f ) {}
|
||||
CGravityVortexController( void ) : m_flMass( 0.0f ), m_flEndTime( 0.0f ), m_flRadius( 256 ), m_flStrength( 256 ) {}
|
||||
float GetConsumedMass( void ) const;
|
||||
|
||||
static CGravityVortexController *Create( const Vector &origin, float radius, float strength, float duration );
|
||||
|
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
|
||||
#include "basegrenade_shared.h"
|
||||
#include "sprite.h"
|
||||
#include "Sprite.h"
|
||||
|
||||
extern ConVar hopwire_trap;
|
||||
|
||||
|
@ -1,133 +1,133 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Big pulsating ball inside the core of the citadel
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#include "cbase.h"
|
||||
#include "baseentity.h"
|
||||
|
||||
#define COREBALL_MODEL "models/props_combine/coreball.mdl"
|
||||
|
||||
class CPropCoreBall : public CBaseAnimating
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CPropCoreBall, CBaseAnimating );
|
||||
DECLARE_DATADESC();
|
||||
DECLARE_SERVERCLASS();
|
||||
|
||||
CPropCoreBall();
|
||||
|
||||
virtual void Spawn( void );
|
||||
virtual void Precache( void );
|
||||
|
||||
CNetworkVar( float, m_flScaleX );
|
||||
CNetworkVar( float, m_flScaleY );
|
||||
CNetworkVar( float, m_flScaleZ );
|
||||
|
||||
CNetworkVar( float, m_flLerpTimeX );
|
||||
CNetworkVar( float, m_flLerpTimeY );
|
||||
CNetworkVar( float, m_flLerpTimeZ );
|
||||
|
||||
CNetworkVar( float, m_flGoalTimeX );
|
||||
CNetworkVar( float, m_flGoalTimeY );
|
||||
CNetworkVar( float, m_flGoalTimeZ );
|
||||
|
||||
void InputSetScaleX( inputdata_t &inputdata );
|
||||
void InputSetScaleY( inputdata_t &inputdata );
|
||||
void InputSetScaleZ( inputdata_t &inputdata );
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( prop_coreball, CPropCoreBall );
|
||||
|
||||
BEGIN_DATADESC( CPropCoreBall )
|
||||
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetScaleX", InputSetScaleX ),
|
||||
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetScaleY", InputSetScaleY ),
|
||||
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetScaleZ", InputSetScaleZ ),
|
||||
|
||||
DEFINE_FIELD( m_flScaleX, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flScaleY, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flScaleZ, FIELD_FLOAT ),
|
||||
|
||||
DEFINE_FIELD( m_flLerpTimeX, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flLerpTimeY, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flLerpTimeZ, FIELD_FLOAT ),
|
||||
|
||||
DEFINE_FIELD( m_flGoalTimeX, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flGoalTimeY, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flGoalTimeZ, FIELD_FLOAT ),
|
||||
END_DATADESC()
|
||||
|
||||
IMPLEMENT_SERVERCLASS_ST( CPropCoreBall, DT_PropCoreBall )
|
||||
SendPropFloat( SENDINFO(m_flScaleX), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flScaleY), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flScaleZ), 0, SPROP_NOSCALE ),
|
||||
|
||||
SendPropFloat( SENDINFO(m_flLerpTimeX), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flLerpTimeY), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flLerpTimeZ), 0, SPROP_NOSCALE ),
|
||||
|
||||
SendPropFloat( SENDINFO(m_flGoalTimeX), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flGoalTimeY), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flGoalTimeZ), 0, SPROP_NOSCALE ),
|
||||
END_SEND_TABLE()
|
||||
|
||||
CPropCoreBall::CPropCoreBall( void )
|
||||
{
|
||||
m_flScaleX = 1.0f;
|
||||
m_flScaleY = 1.0f;
|
||||
m_flScaleZ = 1.0f;
|
||||
|
||||
UseClientSideAnimation();
|
||||
}
|
||||
|
||||
void CPropCoreBall::Spawn( void )
|
||||
{
|
||||
Precache();
|
||||
SetModel( COREBALL_MODEL );
|
||||
|
||||
SetMoveType( MOVETYPE_NONE );
|
||||
|
||||
BaseClass::Spawn();
|
||||
|
||||
AddEffects( EF_NOSHADOW );
|
||||
|
||||
SetSequence( 0 );
|
||||
SetPlaybackRate( 1.0f );
|
||||
}
|
||||
|
||||
void CPropCoreBall::Precache( void )
|
||||
{
|
||||
BaseClass::Precache();
|
||||
PrecacheModel( COREBALL_MODEL );
|
||||
}
|
||||
|
||||
void CPropCoreBall::InputSetScaleX( inputdata_t &inputdata )
|
||||
{
|
||||
Vector vecScale;
|
||||
inputdata.value.Vector3D( vecScale );
|
||||
|
||||
m_flScaleX = vecScale.x;
|
||||
m_flLerpTimeX = vecScale.y;
|
||||
m_flGoalTimeX = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
void CPropCoreBall::InputSetScaleY( inputdata_t &inputdata )
|
||||
{
|
||||
Vector vecScale;
|
||||
inputdata.value.Vector3D( vecScale );
|
||||
|
||||
m_flScaleY = vecScale.x;
|
||||
m_flLerpTimeY = vecScale.y;
|
||||
m_flGoalTimeY = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
void CPropCoreBall::InputSetScaleZ( inputdata_t &inputdata )
|
||||
{
|
||||
Vector vecScale;
|
||||
inputdata.value.Vector3D( vecScale );
|
||||
|
||||
m_flScaleZ = vecScale.x;
|
||||
m_flLerpTimeZ = vecScale.y;
|
||||
m_flGoalTimeZ = gpGlobals->curtime;
|
||||
}
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Big pulsating ball inside the core of the citadel
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#include "cbase.h"
|
||||
#include "baseentity.h"
|
||||
|
||||
#define COREBALL_MODEL "models/props_combine/coreball.mdl"
|
||||
|
||||
class CPropCoreBall : public CBaseAnimating
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CPropCoreBall, CBaseAnimating );
|
||||
DECLARE_DATADESC();
|
||||
DECLARE_SERVERCLASS();
|
||||
|
||||
CPropCoreBall();
|
||||
|
||||
virtual void Spawn( void );
|
||||
virtual void Precache( void );
|
||||
|
||||
CNetworkVar( float, m_flScaleX );
|
||||
CNetworkVar( float, m_flScaleY );
|
||||
CNetworkVar( float, m_flScaleZ );
|
||||
|
||||
CNetworkVar( float, m_flLerpTimeX );
|
||||
CNetworkVar( float, m_flLerpTimeY );
|
||||
CNetworkVar( float, m_flLerpTimeZ );
|
||||
|
||||
CNetworkVar( float, m_flGoalTimeX );
|
||||
CNetworkVar( float, m_flGoalTimeY );
|
||||
CNetworkVar( float, m_flGoalTimeZ );
|
||||
|
||||
void InputSetScaleX( inputdata_t &inputdata );
|
||||
void InputSetScaleY( inputdata_t &inputdata );
|
||||
void InputSetScaleZ( inputdata_t &inputdata );
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( prop_coreball, CPropCoreBall );
|
||||
|
||||
BEGIN_DATADESC( CPropCoreBall )
|
||||
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetScaleX", InputSetScaleX ),
|
||||
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetScaleY", InputSetScaleY ),
|
||||
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetScaleZ", InputSetScaleZ ),
|
||||
|
||||
DEFINE_FIELD( m_flScaleX, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flScaleY, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flScaleZ, FIELD_FLOAT ),
|
||||
|
||||
DEFINE_FIELD( m_flLerpTimeX, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flLerpTimeY, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flLerpTimeZ, FIELD_FLOAT ),
|
||||
|
||||
DEFINE_FIELD( m_flGoalTimeX, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flGoalTimeY, FIELD_FLOAT ),
|
||||
DEFINE_FIELD( m_flGoalTimeZ, FIELD_FLOAT ),
|
||||
END_DATADESC()
|
||||
|
||||
IMPLEMENT_SERVERCLASS_ST( CPropCoreBall, DT_PropCoreBall )
|
||||
SendPropFloat( SENDINFO(m_flScaleX), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flScaleY), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flScaleZ), 0, SPROP_NOSCALE ),
|
||||
|
||||
SendPropFloat( SENDINFO(m_flLerpTimeX), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flLerpTimeY), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flLerpTimeZ), 0, SPROP_NOSCALE ),
|
||||
|
||||
SendPropFloat( SENDINFO(m_flGoalTimeX), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flGoalTimeY), 0, SPROP_NOSCALE ),
|
||||
SendPropFloat( SENDINFO(m_flGoalTimeZ), 0, SPROP_NOSCALE ),
|
||||
END_SEND_TABLE()
|
||||
|
||||
CPropCoreBall::CPropCoreBall( void )
|
||||
{
|
||||
m_flScaleX = 1.0f;
|
||||
m_flScaleY = 1.0f;
|
||||
m_flScaleZ = 1.0f;
|
||||
|
||||
UseClientSideAnimation();
|
||||
}
|
||||
|
||||
void CPropCoreBall::Spawn( void )
|
||||
{
|
||||
Precache();
|
||||
SetModel( COREBALL_MODEL );
|
||||
|
||||
SetMoveType( MOVETYPE_NONE );
|
||||
|
||||
BaseClass::Spawn();
|
||||
|
||||
AddEffects( EF_NOSHADOW );
|
||||
|
||||
SetSequence( 0 );
|
||||
SetPlaybackRate( 1.0f );
|
||||
}
|
||||
|
||||
void CPropCoreBall::Precache( void )
|
||||
{
|
||||
BaseClass::Precache();
|
||||
PrecacheModel( COREBALL_MODEL );
|
||||
}
|
||||
|
||||
void CPropCoreBall::InputSetScaleX( inputdata_t &inputdata )
|
||||
{
|
||||
Vector vecScale;
|
||||
inputdata.value.Vector3D( vecScale );
|
||||
|
||||
m_flScaleX = vecScale.x;
|
||||
m_flLerpTimeX = vecScale.y;
|
||||
m_flGoalTimeX = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
void CPropCoreBall::InputSetScaleY( inputdata_t &inputdata )
|
||||
{
|
||||
Vector vecScale;
|
||||
inputdata.value.Vector3D( vecScale );
|
||||
|
||||
m_flScaleY = vecScale.x;
|
||||
m_flLerpTimeY = vecScale.y;
|
||||
m_flGoalTimeY = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
void CPropCoreBall::InputSetScaleZ( inputdata_t &inputdata )
|
||||
{
|
||||
Vector vecScale;
|
||||
inputdata.value.Vector3D( vecScale );
|
||||
|
||||
m_flScaleZ = vecScale.x;
|
||||
m_flLerpTimeZ = vecScale.y;
|
||||
m_flGoalTimeZ = gpGlobals->curtime;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user