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.

63 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef ENV_ALYXEMP_SHARED_H
  7. #define ENV_ALYXEMP_SHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "beam_shared.h"
  12. enum
  13. {
  14. ALYXEMP_STATE_OFF,
  15. ALYXEMP_STATE_CHARGING,
  16. ALYXEMP_STATE_DISCHARGING,
  17. };
  18. class CAlyxEmpEffect : public CBaseEntity
  19. {
  20. DECLARE_CLASS( CAlyxEmpEffect, CBaseEntity );
  21. DECLARE_SERVERCLASS();
  22. DECLARE_DATADESC();
  23. public:
  24. void InputStartCharge( inputdata_t &inputdata );
  25. void InputStartDischarge( inputdata_t &inputdata );
  26. void InputStop( inputdata_t &inputdata );
  27. void InputSetTargetEnt( inputdata_t &inputdata );
  28. void StartCharge( float flDuration );
  29. void StartDischarge();
  30. void Stop( float flDuration );
  31. void SetTargetEntity( CBaseEntity *pTarget );
  32. void ActivateAutomatic( CBaseEntity *pAlyx, CBaseEntity *pTarget );
  33. void AutomaticThink();
  34. void Spawn( void );
  35. void Precache( void );
  36. void Activate( void );
  37. private:
  38. void SetTargetEntity( const char *szEntityName );
  39. CHandle<CBeam> m_hBeam;
  40. CHandle<CBaseEntity> m_hTargetEnt;
  41. string_t m_strTargetName;
  42. int m_nType; // What type of effect this is (small, large)
  43. int m_iState;
  44. bool m_bAutomated;
  45. CNetworkVar( int, m_nState );
  46. CNetworkVar( float, m_flDuration );
  47. CNetworkVar( float, m_flStartTime );
  48. };
  49. #endif // ENV_ALYXEMP_SHARED_H