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.

73 lines
2.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Base combat character with no AI
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef NPC_BULLSQUID_H
  14. #define NPC_BULLSQUID_H
  15. #include "ai_basenpc.h"
  16. class CNPC_Bullsquid : public CAI_BaseNPC
  17. {
  18. DECLARE_CLASS( CNPC_Bullsquid, CAI_BaseNPC );
  19. DECLARE_DATADESC();
  20. public:
  21. void Spawn( void );
  22. void Precache( void );
  23. Class_T Classify( void );
  24. void IdleSound( void );
  25. void PainSound( const CTakeDamageInfo &info );
  26. void AlertSound( void );
  27. void DeathSound( const CTakeDamageInfo &info );
  28. void AttackSound( void );
  29. void GrowlSound( void );
  30. float MaxYawSpeed ( void );
  31. void HandleAnimEvent( animevent_t *pEvent );
  32. int RangeAttack1Conditions( float flDot, float flDist );
  33. int MeleeAttack1Conditions( float flDot, float flDist );
  34. int MeleeAttack2Conditions( float flDot, float flDist );
  35. bool FValidateHintType ( CAI_Hint *pHint );
  36. void RemoveIgnoredConditions( void );
  37. Disposition_t IRelationType( CBaseEntity *pTarget );
  38. int OnTakeDamage_Alive( const CTakeDamageInfo &inputInfo );
  39. int GetSoundInterests ( void );
  40. void RunAI ( void );
  41. virtual void OnListened ( void );
  42. int SelectSchedule( void );
  43. bool FInViewCone ( Vector pOrigin );
  44. void StartTask ( const Task_t *pTask );
  45. void RunTask ( const Task_t *pTask );
  46. NPC_STATE SelectIdealState ( void );
  47. DEFINE_CUSTOM_AI;
  48. private:
  49. bool m_fCanThreatDisplay;// this is so the squid only does the "I see a headcrab!" dance one time.
  50. float m_flLastHurtTime;// we keep track of this, because if something hurts a squid, it will forget about its love of headcrabs for a while.
  51. float m_flNextSpitTime;// last time the bullsquid used the spit attack.
  52. int m_nSquidSpitSprite;
  53. float m_flHungryTime;// set this is a future time to stop the monster from eating for a while.
  54. float m_nextSquidSoundTime;
  55. };
  56. #endif // NPC_BULLSQUID_H