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.

43 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef C_PLAYERATTACHEDMODEL_H
  7. #define C_PLAYERATTACHEDMODEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #define PAM_PERMANENT -1
  12. // Flags
  13. #define PAM_SPIN_Z (1<<0)
  14. #define PAM_ROTATE_RANDOMLY (1<<1)
  15. #define PAM_SCALEUP (1<<2)
  16. #define PAM_ANIMATE_RANDOMLY (1<<3)
  17. //-----------------------------------------------------------------------------
  18. // Purpose: A clientside, visual only model that's attached to players
  19. //-----------------------------------------------------------------------------
  20. class C_PlayerAttachedModel : public C_BaseAnimating
  21. {
  22. DECLARE_CLASS( C_PlayerAttachedModel, C_BaseAnimating );
  23. public:
  24. static C_PlayerAttachedModel *Create( const char *pszModelName, C_BaseEntity *pParent, int iAttachment, Vector vecOffset, float flLifetime = 0.2, int iFlags = 0 );
  25. bool Initialize( const char *pszModelName, C_BaseEntity *pParent, int iAttachment, Vector vecOffset, float flLifetime, int iFlags );
  26. void SetLifetime( float flLifetime );
  27. void ClientThink( void );
  28. void ApplyBoneMatrixTransform( matrix3x4_t& transform );
  29. private:
  30. float m_flExpiresAt;
  31. int m_iFlags;
  32. float m_flRotateAt;
  33. float m_flAnimateAt;
  34. float m_flScale;
  35. };
  36. #endif // C_PLAYERATTACHEDMODEL_H