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.

67 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef NPC_BULLSQUID_H
  9. #define NPC_BULLSQUID_H
  10. #include "hl1_ai_basenpc.h"
  11. class CNPC_Bullsquid : public CHL1BaseNPC
  12. {
  13. DECLARE_CLASS( CNPC_Bullsquid, CHL1BaseNPC );
  14. public:
  15. void Spawn( void );
  16. void Precache( void );
  17. Class_T Classify( void );
  18. void IdleSound( void );
  19. void PainSound( const CTakeDamageInfo &info );
  20. void AlertSound( void );
  21. void DeathSound( const CTakeDamageInfo &info );
  22. void AttackSound( void );
  23. float MaxYawSpeed( void );
  24. void HandleAnimEvent( animevent_t *pEvent );
  25. int RangeAttack1Conditions( float flDot, float flDist );
  26. int MeleeAttack1Conditions( float flDot, float flDist );
  27. int MeleeAttack2Conditions( float flDot, float flDist );
  28. bool FValidateHintType ( CAI_Hint *pHint );
  29. void RemoveIgnoredConditions( void );
  30. Disposition_t IRelationType( CBaseEntity *pTarget );
  31. int OnTakeDamage_Alive( const CTakeDamageInfo &inputInfo );
  32. int GetSoundInterests ( void );
  33. void RunAI ( void );
  34. virtual void OnListened ( void );
  35. int SelectSchedule( void );
  36. int TranslateSchedule( int scheduleType );
  37. bool FInViewCone ( Vector pOrigin );
  38. bool FVisible ( Vector vecOrigin );
  39. void StartTask ( const Task_t *pTask );
  40. void RunTask ( const Task_t *pTask );
  41. NPC_STATE SelectIdealState ( void );
  42. DEFINE_CUSTOM_AI;
  43. DECLARE_DATADESC()
  44. private:
  45. bool m_fCanThreatDisplay;// this is so the squid only does the "I see a headcrab!" dance one time.
  46. 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.
  47. float m_flNextSpitTime;// last time the bullsquid used the spit attack.
  48. float m_flHungryTime;// set this is a future time to stop the monster from eating for a while.
  49. };
  50. #endif // NPC_BULLSQUID_H