diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/hl2/ai_goal_police.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/hl2/ai_goal_police.h')
| -rw-r--r-- | game/server/hl2/ai_goal_police.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/game/server/hl2/ai_goal_police.h b/game/server/hl2/ai_goal_police.h new file mode 100644 index 0000000..c2b7096 --- /dev/null +++ b/game/server/hl2/ai_goal_police.h @@ -0,0 +1,50 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef AI_GOAL_POLICE_H +#define AI_GOAL_POLICE_H +#ifdef _WIN32 +#pragma once +#endif + +class CAI_PoliceGoal : public CBaseEntity +{ +public: + + DECLARE_CLASS( CAI_PoliceGoal, CBaseEntity ); + + CAI_PoliceGoal( void ); + + float GetRadius( void ); + CBaseEntity *GetTarget( void ); + + bool ShouldKnockOutTarget( const Vector &targetPos, bool bTargetVisible ); // If the target should be knocked out + void KnockOutTarget( CBaseEntity *pTarget ); // Send an output that we've knocked out this target + bool ShouldRemainAtPost( void ); + + void InputEnableKnockOut( inputdata_t &data ); + void InputDisableKnockOut( inputdata_t &data ); + + void FireWarningLevelOutput( int level ); + + float m_flRadius; + EHANDLE m_hTarget; + string_t m_iszTarget; + bool m_bOverrideKnockOut; + + COutputEvent m_OnKnockOut; + COutputEvent m_OnFirstWarning; + COutputEvent m_OnSecondWarning; + COutputEvent m_OnLastWarning; + COutputEvent m_OnSupressingTarget; + + DECLARE_DATADESC(); +}; + +#define SF_POLICE_GOAL_KNOCKOUT_BEHIND (1<<1) // Knockout a target that's behind the plane that cuts perpendicularly through us +#define SF_POLICE_GOAL_DO_NOT_LEAVE_POST (1<<2) // Cop will not come off his policing goal, even when angered + +#endif // AI_GOAL_POLICE_H |