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.

56 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef TF_FX_MUZZLEFLASH_H
  7. #define TF_FX_MUZZLEFLASH_H
  8. #include "particles_simple.h"
  9. #include "particles_localspace.h"
  10. #include "fx.h"
  11. #include "c_te_effect_dispatch.h"
  12. #include "c_baseanimating.h"
  13. class CMuzzleFlashEmitter_1stPerson : public CLocalSpaceEmitter
  14. {
  15. public:
  16. DECLARE_CLASS( CMuzzleFlashEmitter_1stPerson, CLocalSpaceEmitter );
  17. static CSmartPtr<CMuzzleFlashEmitter_1stPerson> Create( const char *pDebugName, int entIndex, int nAttachment, int fFlags = 0 );
  18. virtual void Update( float t ) { BaseClass::Update(t); }
  19. protected:
  20. CMuzzleFlashEmitter_1stPerson( const char *pDebugName );
  21. private:
  22. CMuzzleFlashEmitter_1stPerson( const CMuzzleFlashEmitter_1stPerson & );
  23. int m_iMuzzleFlashType;
  24. };
  25. // Model versions of muzzle flashes
  26. class C_MuzzleFlashModel : public C_BaseAnimating
  27. {
  28. DECLARE_CLASS( C_MuzzleFlashModel, C_BaseAnimating );
  29. public:
  30. static C_MuzzleFlashModel *CreateMuzzleFlashModel( const char *pszModelName, C_BaseEntity *pParent, int iAttachment, float flLifetime = 0.2 );
  31. bool InitializeMuzzleFlash( const char *pszModelName, C_BaseEntity *pParent, int iAttachment, float flLifetime );
  32. void ClientThink( void );
  33. void SetLifetime( float flLifetime );
  34. // Recording
  35. virtual void GetToolRecordingState( KeyValues *msg );
  36. virtual bool SetupBones( matrix3x4_t *pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime );
  37. void SetIs3rdPersonFlash( bool bEnable );
  38. private:
  39. float m_flExpiresAt;
  40. float m_flRotateAt;
  41. bool m_bIs3rdPersonFlash;
  42. };
  43. #endif //TF_FX_MUZZLEFLASH_H