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.

63 lines
1.8 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef ENTITYDISSOLVE_H
  7. #define ENTITYDISSOLVE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. class CEntityDissolve : public CBaseEntity
  12. {
  13. public:
  14. DECLARE_SERVERCLASS();
  15. DECLARE_CLASS( CEntityDissolve, CBaseEntity );
  16. CEntityDissolve( void );
  17. ~CEntityDissolve( void );
  18. static CEntityDissolve *Create( CBaseEntity *pTarget, const char *pMaterialName,
  19. float flStartTime, int nDissolveType = 0, bool *pRagdollCreated = NULL );
  20. static CEntityDissolve *Create( CBaseEntity *pTarget, CBaseEntity *pSource );
  21. void Precache();
  22. void Spawn();
  23. void AttachToEntity( CBaseEntity *pTarget );
  24. void SetStartTime( float flStartTime );
  25. void SetDissolverOrigin( Vector vOrigin ) { m_vDissolverOrigin = vOrigin; }
  26. void SetMagnitude( int iMagnitude ){ m_nMagnitude = iMagnitude; }
  27. void SetDissolveType( int iType ) { m_nDissolveType = iType; }
  28. Vector GetDissolverOrigin( void )
  29. {
  30. Vector vReturn = m_vDissolverOrigin;
  31. return vReturn;
  32. }
  33. int GetMagnitude( void ) { return m_nMagnitude; }
  34. int GetDissolveType( void ) { return m_nDissolveType; }
  35. DECLARE_DATADESC();
  36. CNetworkVar( float, m_flStartTime );
  37. CNetworkVar( float, m_flFadeInStart );
  38. CNetworkVar( float, m_flFadeInLength );
  39. CNetworkVar( float, m_flFadeOutModelStart );
  40. CNetworkVar( float, m_flFadeOutModelLength );
  41. CNetworkVar( float, m_flFadeOutStart );
  42. CNetworkVar( float, m_flFadeOutLength );
  43. protected:
  44. void InputDissolve( inputdata_t &inputdata );
  45. void DissolveThink( void );
  46. void ElectrocuteThink( void );
  47. CNetworkVar( int, m_nDissolveType );
  48. CNetworkVector( m_vDissolverOrigin );
  49. CNetworkVar( int, m_nMagnitude );
  50. };
  51. #endif // ENTITYDISSOLVE_H