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.

63 lines
1.8 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 HL1_NPC_BARNACLE_H
  14. #define HL1_NPC_BARNACLE_H
  15. #include "hl1_ai_basenpc.h"
  16. #include "rope_physics.h"
  17. #define BARNACLE_BODY_HEIGHT 44 // how 'tall' the barnacle's model is.
  18. #define BARNACLE_PULL_SPEED 8
  19. #define BARNACLE_KILL_VICTIM_DELAY 5 // how many seconds after pulling prey in to gib them.
  20. //=========================================================
  21. // Monster's Anim Events Go Here
  22. //=========================================================
  23. #define BARNACLE_AE_PUKEGIB 2
  24. //-----------------------------------------------------------------------------
  25. // Purpose:
  26. //-----------------------------------------------------------------------------
  27. class CNPC_Barnacle : public CHL1BaseNPC
  28. {
  29. DECLARE_CLASS( CNPC_Barnacle, CHL1BaseNPC );
  30. public:
  31. void Spawn( void );
  32. void InitTonguePosition( void );
  33. void Precache( void );
  34. CBaseEntity* TongueTouchEnt ( float *pflLength );
  35. Class_T Classify ( void );
  36. void HandleAnimEvent( animevent_t *pEvent );
  37. void BarnacleThink ( void );
  38. void WaitTillDead ( void );
  39. void Event_Killed( const CTakeDamageInfo &info );
  40. int OnTakeDamage_Alive( const CTakeDamageInfo &info );
  41. DECLARE_DATADESC();
  42. float m_flAltitude;
  43. float m_flKillVictimTime;
  44. int m_cGibs;// barnacle loads up on gibs each time it kills something.
  45. bool m_fLiftingPrey;
  46. float m_flTongueAdj;
  47. float m_flIgnoreTouchesUntil;
  48. public:
  49. DEFINE_CUSTOM_AI;
  50. };
  51. #endif //HL1_NPC_BARNACLE_H