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.

72 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef NPC_HOUNDEYE_H
  9. #define NPC_HOUNDEYE_H
  10. #pragma once
  11. #include "hl1_ai_basenpc.h"
  12. #define HOUNDEYE_MAX_ATTACK_RADIUS 384
  13. class CNPC_Houndeye : public CHL1BaseNPC
  14. {
  15. DECLARE_CLASS( CNPC_Houndeye, CHL1BaseNPC );
  16. public:
  17. void Spawn( void );
  18. void Precache( void );
  19. void Event_Killed( const CTakeDamageInfo &info );
  20. void WarmUpSound ( void );
  21. void AlertSound( void );
  22. void DeathSound( const CTakeDamageInfo &info );
  23. void WarnSound( void );
  24. void PainSound( const CTakeDamageInfo &info );
  25. void IdleSound( void );
  26. float MaxYawSpeed ( void );
  27. Class_T Classify ( void );
  28. void HandleAnimEvent( animevent_t *pEvent );
  29. void SonicAttack ( void );
  30. Vector WriteBeamColor( void );
  31. bool ShouldGoToIdleState( void );
  32. bool FValidateHintType ( CAI_Hint *pHint );
  33. void SetActivity ( Activity NewActivity );
  34. void StartTask( const Task_t *pTask );
  35. void RunTask ( const Task_t *pTask );
  36. void PrescheduleThink ( void );
  37. int TranslateSchedule( int scheduleType );
  38. int SelectSchedule( void );
  39. float FLSoundVolume( CSound *pSound );
  40. int RangeAttack1Conditions ( float flDot, float flDist );
  41. void StartNPC ( void );
  42. virtual float InnateRange1MinRange( void ) { return 0.0f; }
  43. virtual float InnateRange1MaxRange( void ) { return HOUNDEYE_MAX_ATTACK_RADIUS; }
  44. DEFINE_CUSTOM_AI;
  45. DECLARE_DATADESC();
  46. private:
  47. int SquadRecruit( int searchRadius, int maxMembers );
  48. int m_iSpriteTexture;
  49. bool m_fAsleep;// some houndeyes sleep in idle mode if this is set, the houndeye is lying down
  50. bool m_fDontBlink;// don't try to open/close eye if this bit is set!
  51. Vector m_vecPackCenter; // the center of the pack. The leader maintains this by averaging the origins of all pack members.
  52. };
  53. #endif // NPC_HOUNDEYE_H