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.

64 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef C_PLAYERRELATIVEMODEL_H
  7. #define C_PLAYERRELATIVEMODEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "c_tf_player.h"
  12. #define PRM_PERMANENT -1
  13. //
  14. // Flags
  15. #define PRM_SPIN_Z (1<<0)
  16. //-----------------------------------------------------------------------------
  17. // Purpose: A clientside, visual only model that's positioned relative to players
  18. //-----------------------------------------------------------------------------
  19. class C_PlayerRelativeModel : public C_BaseAnimating
  20. {
  21. DECLARE_CLASS( C_PlayerRelativeModel, C_BaseAnimating );
  22. public:
  23. static C_PlayerRelativeModel *Create( const char *pszModelName, C_BaseEntity *pParent, Vector vecOffset, QAngle angleOffset, float flAnimSpeed, float flLifetime = 0.2, int iFlags = 0 );
  24. bool Initialize( const char *pszModelName, C_BaseEntity *pParent, Vector vecOffset, QAngle angleOffset, float flAnimSpeed, float flLifetime, int iFlags );
  25. void SetLifetime( float flLifetime );
  26. void ClientThink( void );
  27. protected:
  28. float m_flExpiresAt;
  29. int m_iFlags;
  30. private:
  31. float m_flRotateAt;
  32. float m_flAnimateAt;
  33. float m_flScale;
  34. Vector m_vecOffsetPos;
  35. QAngle m_angleOffset;
  36. QAngle m_qOffsetRotation;
  37. float m_flAnimSpeed;
  38. };
  39. //-----------------------------------------------------------------------------
  40. // Purpose: A clientside, visual only model that's positioned relative to players
  41. //-----------------------------------------------------------------------------
  42. class C_MerasmusBombEffect : public C_PlayerRelativeModel
  43. {
  44. DECLARE_CLASS( C_MerasmusBombEffect, C_PlayerRelativeModel );
  45. public:
  46. static C_MerasmusBombEffect *Create( const char *pszModelName, C_TFPlayer *pParent, Vector vecOffset, QAngle angleOffset, float flAnimSpeed, float flLifetime = 0.2, int iFlags = 0 );
  47. bool Initialize( const char *pszModelName, C_TFPlayer *pParent, Vector vecOffset, QAngle angleOffset, float flAnimSpeed, float flLifetime, int iFlags );
  48. void ClientThink( void );
  49. private:
  50. CNewParticleEffect *m_pBombonomiconBeam;
  51. CNewParticleEffect *m_pBombonomiconEffect;
  52. };
  53. #endif // C_PLAYERRELATIVEMODEL_H