Counter Strike : Global Offensive Source Code
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.

51 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef RAGDOLLBOOGIE_H
  7. #define RAGDOLLBOOGIE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. //-----------------------------------------------------------------------------
  12. // Set this spawnflag before calling Spawn to get electrical effects
  13. //-----------------------------------------------------------------------------
  14. #define SF_RAGDOLL_BOOGIE_ELECTRICAL 0x10000
  15. #define SF_RAGDOLL_BOOGIE_ELECTRICAL_NARROW_BEAM 0x20000
  16. //-----------------------------------------------------------------------------
  17. // Makes ragdolls DANCE!
  18. //-----------------------------------------------------------------------------
  19. class CRagdollBoogie : public CBaseEntity
  20. {
  21. DECLARE_DATADESC();
  22. DECLARE_CLASS( CRagdollBoogie, CBaseEntity );
  23. public:
  24. static CRagdollBoogie *Create( CBaseEntity *pTarget, float flMagnitude, float flStartTime, float flLengthTime = 0.0f, int nSpawnFlags = 0 );
  25. static void IncrementSuppressionCount( CBaseEntity *pTarget );
  26. static void DecrementSuppressionCount( CBaseEntity *pTarget );
  27. virtual void Precache();
  28. void Spawn();
  29. private:
  30. void AttachToEntity( CBaseEntity *pTarget );
  31. void SetBoogieTime( float flStartTime, float flLengthTime );
  32. void SetMagnitude( float flMagnitude );
  33. void BoogieThink( void );
  34. void ZapThink();
  35. float m_flStartTime;
  36. float m_flBoogieLength;
  37. float m_flMagnitude;
  38. int m_nSuppressionCount;
  39. };
  40. #endif // RAGDOLLBOOGIE_H