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.

80 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef NPC_BARNEY_H
  9. #define NPC_BARNEY_H
  10. #include "hl1_npc_talker.h"
  11. //=========================================================
  12. //=========================================================
  13. class CNPC_Barney : public CHL1NPCTalker
  14. {
  15. DECLARE_CLASS( CNPC_Barney, CHL1NPCTalker );
  16. public:
  17. DECLARE_DATADESC();
  18. virtual void ModifyOrAppendCriteria( AI_CriteriaSet& set );
  19. void Precache( void );
  20. void Spawn( void );
  21. void TalkInit( void );
  22. void StartTask( const Task_t *pTask );
  23. void RunTask( const Task_t *pTask );
  24. int GetSoundInterests ( void );
  25. Class_T Classify ( void );
  26. void AlertSound( void );
  27. void SetYawSpeed ( void );
  28. bool CheckRangeAttack1 ( float flDot, float flDist );
  29. void BarneyFirePistol ( void );
  30. int OnTakeDamage_Alive( const CTakeDamageInfo &inputInfo );
  31. void TraceAttack( const CTakeDamageInfo &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator );
  32. void Event_Killed( const CTakeDamageInfo &info );
  33. void PainSound( const CTakeDamageInfo &info );
  34. void DeathSound( const CTakeDamageInfo &info );
  35. void HandleAnimEvent( animevent_t *pEvent );
  36. int TranslateSchedule( int scheduleType );
  37. int SelectSchedule( void );
  38. void DeclineFollowing( void );
  39. bool CanBecomeRagdoll( void );
  40. bool ShouldGib( const CTakeDamageInfo &info );
  41. int RangeAttack1Conditions( float flDot, float flDist );
  42. void SUB_StartLVFadeOut( float delay = 10.0f, bool bNotSolid = true );
  43. void SUB_LVFadeOut( void );
  44. NPC_STATE SelectIdealState ( void );
  45. bool m_fGunDrawn;
  46. float m_flPainTime;
  47. float m_flCheckAttackTime;
  48. bool m_fLastAttackCheck;
  49. int m_iAmmoType;
  50. enum
  51. {
  52. SCHED_BARNEY_FOLLOW = BaseClass::NEXT_SCHEDULE,
  53. SCHED_BARNEY_ENEMY_DRAW,
  54. SCHED_BARNEY_FACE_TARGET,
  55. SCHED_BARNEY_IDLE_STAND,
  56. SCHED_BARNEY_STOP_FOLLOWING,
  57. };
  58. DEFINE_CUSTOM_AI;
  59. };
  60. #endif //NPC_BARNEY_H