Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef AI_GOAL_POLICE_H
  7. #define AI_GOAL_POLICE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. class CAI_PoliceGoal : public CBaseEntity
  12. {
  13. public:
  14. DECLARE_CLASS( CAI_PoliceGoal, CBaseEntity );
  15. CAI_PoliceGoal( void );
  16. float GetRadius( void );
  17. CBaseEntity *GetTarget( void );
  18. bool ShouldKnockOutTarget( const Vector &targetPos, bool bTargetVisible ); // If the target should be knocked out
  19. void KnockOutTarget( CBaseEntity *pTarget ); // Send an output that we've knocked out this target
  20. bool ShouldRemainAtPost( void );
  21. void InputEnableKnockOut( inputdata_t &data );
  22. void InputDisableKnockOut( inputdata_t &data );
  23. void FireWarningLevelOutput( int level );
  24. float m_flRadius;
  25. EHANDLE m_hTarget;
  26. string_t m_iszTarget;
  27. bool m_bOverrideKnockOut;
  28. COutputEvent m_OnKnockOut;
  29. COutputEvent m_OnFirstWarning;
  30. COutputEvent m_OnSecondWarning;
  31. COutputEvent m_OnLastWarning;
  32. COutputEvent m_OnSupressingTarget;
  33. DECLARE_DATADESC();
  34. };
  35. #define SF_POLICE_GOAL_KNOCKOUT_BEHIND (1<<1) // Knockout a target that's behind the plane that cuts perpendicularly through us
  36. #define SF_POLICE_GOAL_DO_NOT_LEAVE_POST (1<<2) // Cop will not come off his policing goal, even when angered
  37. #endif // AI_GOAL_POLICE_H