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
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef HL1_ENTS_H
  7. #define HL1_ENTS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. /**********************
  12. Pendulum
  13. /**********************/
  14. class CPendulum : public CBaseToggle
  15. {
  16. DECLARE_CLASS( CPendulum, CBaseToggle );
  17. public:
  18. void Spawn ( void );
  19. void KeyValue( KeyValueData *pkvd );
  20. void Swing( void );
  21. void PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  22. void Stop( void );
  23. void Touch( CBaseEntity *pOther );
  24. void RopeTouch ( CBaseEntity *pOther );// this touch func makes the pendulum a rope
  25. void Blocked( CBaseEntity *pOther );
  26. // Input handlers.
  27. void InputActivate( inputdata_t &inputdata );
  28. DECLARE_DATADESC();
  29. float m_flAccel; // Acceleration
  30. float m_flTime;
  31. float m_flDamp;
  32. float m_flMaxSpeed;
  33. float m_flDampSpeed;
  34. QAngle m_vCenter;
  35. QAngle m_vStart;
  36. float m_flBlockDamage;
  37. EHANDLE m_hEnemy;
  38. };
  39. class CHL1Gib : public CBaseEntity
  40. {
  41. DECLARE_CLASS( CHL1Gib, CBaseEntity );
  42. public:
  43. void Spawn( const char *szGibModel );
  44. void BounceGibTouch ( CBaseEntity *pOther );
  45. void StickyGibTouch ( CBaseEntity *pOther );
  46. void WaitTillLand( void );
  47. void LimitVelocity( void );
  48. virtual int ObjectCaps( void ) { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION) | FCAP_DONT_SAVE; }
  49. static void SpawnHeadGib( CBaseEntity *pVictim );
  50. static void SpawnRandomGibs( CBaseEntity *pVictim, int cGibs, int human );
  51. static void SpawnStickyGibs( CBaseEntity *pVictim, Vector vecOrigin, int cGibs );
  52. int m_bloodColor;
  53. int m_cBloodDecals;
  54. int m_material;
  55. float m_lifeTime;
  56. DECLARE_DATADESC();
  57. };
  58. #endif // HL1_ENTS_H