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.

62 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef NPC_HEADCRAB_H
  9. #define NPC_HEADCRAB_H
  10. #pragma once
  11. #include "hl1_ai_basenpc.h"
  12. class CNPC_Headcrab : public CHL1BaseNPC
  13. {
  14. DECLARE_CLASS( CNPC_Headcrab, CHL1BaseNPC );
  15. public:
  16. void Spawn( void );
  17. void Precache( void );
  18. void RunTask ( const Task_t *pTask );
  19. void StartTask ( const Task_t *pTask );
  20. void SetYawSpeed ( void );
  21. Vector Center( void );
  22. Vector BodyTarget( const Vector &posSrc, bool bNoisy = true );
  23. float MaxYawSpeed( void );
  24. Class_T Classify( void );
  25. void LeapTouch ( CBaseEntity *pOther );
  26. void BiteSound( void );
  27. void AttackSound( void );
  28. void TouchDamage( CBaseEntity *pOther );
  29. void HandleAnimEvent( animevent_t *pEvent );
  30. int SelectSchedule( void );
  31. void Touch( CBaseEntity *pOther );
  32. int OnTakeDamage_Alive( const CTakeDamageInfo &inputInfo );
  33. int TranslateSchedule( int scheduleType );
  34. void PrescheduleThink( void );
  35. int RangeAttack1Conditions ( float flDot, float flDist );
  36. float GetDamageAmount( void );
  37. virtual void PainSound( const CTakeDamageInfo &info );
  38. virtual void DeathSound( const CTakeDamageInfo &info );
  39. virtual void IdleSound();
  40. virtual void AlertSound();
  41. virtual int GetVoicePitch( void ) { return 100; }
  42. virtual float GetSoundVolume( void ) { return 1.0; }
  43. int m_nGibCount;
  44. DEFINE_CUSTOM_AI;
  45. DECLARE_DATADESC();
  46. protected:
  47. void HeadCrabSound( const char *pchSound );
  48. Vector m_vecJumpVel;
  49. };
  50. #endif //NPC_HEADCRAB_H