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.

85 lines
2.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef NPC_GARGANTUA_H
  9. #define NPC_GARGANTUA_H
  10. #include "hl1_ai_basenpc.h"
  11. class CNPC_Gargantua : public CHL1BaseNPC
  12. {
  13. DECLARE_CLASS( CNPC_Gargantua, CHL1BaseNPC );
  14. public:
  15. void Spawn( void );
  16. void Precache( void );
  17. Class_T Classify ( void );
  18. float MaxYawSpeed ( void );
  19. int MeleeAttack1Conditions( float flDot, float flDist );
  20. int MeleeAttack2Conditions( float flDot, float flDist );
  21. int RangeAttack1Conditions( float flDot, float flDist );
  22. void HandleAnimEvent( animevent_t *pEvent );
  23. int TranslateSchedule( int scheduleType );
  24. void StartTask( const Task_t *pTask );
  25. void RunTask ( const Task_t *pTask );
  26. bool CanBecomeRagdoll() { return false; }
  27. void TraceAttack( const CTakeDamageInfo &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator );
  28. int OnTakeDamage_Alive( const CTakeDamageInfo &info );
  29. /* int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );
  30. void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType );
  31. Schedule_t *GetScheduleOfType( int Type );
  32. void StartTask( Task_t *pTask );
  33. void RunTask( Task_t *pTask );
  34. */
  35. void PrescheduleThink( void );
  36. void Event_Killed( const CTakeDamageInfo &info );
  37. void DeathEffect( void );
  38. bool ShouldGib( const CTakeDamageInfo &info );
  39. void EyeOff( void );
  40. void EyeOn( int level );
  41. void EyeUpdate( void );
  42. // void Leap( void );
  43. void StompAttack( void );
  44. void FlameCreate( void );
  45. void FlameUpdate( void );
  46. void FlameControls( float angleX, float angleY );
  47. void FlameDestroy( void );
  48. inline BOOL FlameIsOn( void ) { return m_pFlame[0] != NULL; }
  49. void FlameDamage( Vector vecStart, Vector vecEnd, CBaseEntity *pevInflictor, CBaseEntity *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType );
  50. DEFINE_CUSTOM_AI;
  51. DECLARE_DATADESC();
  52. private:
  53. CBaseEntity* GargantuaCheckTraceHullAttack(float flDist, int iDamage, int iDmgType);
  54. CSprite *m_pEyeGlow; // Glow around the eyes
  55. CBeam *m_pFlame[4]; // Flame beams
  56. int m_eyeBrightness; // Brightness target
  57. float m_seeTime; // Time to attack (when I see the enemy, I set this)
  58. float m_flameTime; // Time of next flame attack
  59. float m_painSoundTime; // Time of next pain sound
  60. float m_streakTime; // streak timer (don't send too many)
  61. float m_flameX; // Flame thrower aim
  62. float m_flameY;
  63. float m_flDmgTime;
  64. };
  65. #endif //NPC_GARGANTUA_H