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.

97 lines
2.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef NPC_ICHTHYOSAUR_H
  9. #define NPC_ICHTHYOSAUR_H
  10. #include "hl1_ai_basenpc.h"
  11. #define SEARCH_RETRY 16
  12. #define ICHTHYOSAUR_SPEED 150
  13. #define EYE_MAD 0
  14. #define EYE_BASE 1
  15. #define EYE_CLOSED 2
  16. #define EYE_BACK 3
  17. #define EYE_LOOK 4
  18. //
  19. // CNPC_Ichthyosaur
  20. //
  21. class CNPC_Ichthyosaur : public CHL1BaseNPC
  22. {
  23. DECLARE_CLASS( CNPC_Ichthyosaur, CHL1BaseNPC );
  24. public:
  25. void Precache( void );
  26. void Spawn( void );
  27. Class_T Classify ( void );
  28. void NPCThink ( void );
  29. void Swim ( void );
  30. void StartTask(const Task_t *pTask);
  31. void RunTask( const Task_t *pTask );
  32. int RangeAttack1Conditions( float flDot, float flDist );
  33. int MeleeAttack1Conditions ( float flDot, float flDist );
  34. void BiteTouch( CBaseEntity *pOther );
  35. void HandleAnimEvent( animevent_t *pEvent );
  36. int TranslateSchedule( int scheduleType );
  37. int SelectSchedule();
  38. virtual bool FVisible ( CBaseEntity *pEntity, int traceMask = MASK_BLOCKLOS, CBaseEntity **ppBlocker = NULL );
  39. Vector DoProbe( const Vector &Probe );
  40. bool ProbeZ( const Vector &position, const Vector &probe, float *pFraction);
  41. float GetGroundSpeed ( void );
  42. bool OverrideMove( float flInterval );
  43. void MoveExecute_Alive(float flInterval);
  44. void InputStartCombat( inputdata_t &input );
  45. void InputEndCombat( inputdata_t &input );
  46. virtual void IdleSound( void );
  47. virtual void AlertSound( void );
  48. virtual void DeathSound( const CTakeDamageInfo &info );
  49. virtual void PainSound( const CTakeDamageInfo &info );
  50. void AttackSound( void );
  51. void BiteSound( void );
  52. virtual void GatherEnemyConditions( CBaseEntity *pEnemy );
  53. DEFINE_CUSTOM_AI;
  54. DECLARE_DATADESC();
  55. private:
  56. Vector m_SaveVelocity;
  57. float m_idealDist;
  58. float m_flBlink;
  59. float m_flEnemyTouched;
  60. bool m_bOnAttack;
  61. float m_flMaxSpeed;
  62. float m_flMinSpeed;
  63. float m_flMaxDist;
  64. float m_flNextAlert;
  65. float m_flLastAttackSound;
  66. //Save the info from that run
  67. Vector m_vecLastMoveTarget;
  68. bool m_bHasMoveTarget;
  69. float m_flFlyingSpeed;
  70. };
  71. #endif //NPC_ICHTHYOSAUR_H