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.

62 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef CITADEL_EFFECTS_SHARED_H
  7. #define CITADEL_EFFECTS_SHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #define SF_ENERGYCORE_NO_PARTICLES (1<<0)
  12. #define SF_ENERGYCORE_START_ON (1<<1)
  13. enum
  14. {
  15. ENERGYCORE_STATE_OFF,
  16. ENERGYCORE_STATE_CHARGING,
  17. ENERGYCORE_STATE_DISCHARGING,
  18. };
  19. #ifndef CLIENT_DLL
  20. // ============================================================================
  21. //
  22. // Energy core - charges up and then releases energy from its position
  23. //
  24. // ============================================================================
  25. class CCitadelEnergyCore : public CBaseEntity
  26. {
  27. DECLARE_CLASS( CCitadelEnergyCore, CBaseEntity );
  28. DECLARE_SERVERCLASS();
  29. DECLARE_DATADESC();
  30. public:
  31. void InputStartCharge( inputdata_t &inputdata );
  32. void InputStartDischarge( inputdata_t &inputdata );
  33. void InputStop( inputdata_t &inputdata );
  34. void SetScale( float flScale ) { m_flScale = flScale; }
  35. void StartCharge( float flWarmUpTime );
  36. void StartDischarge();
  37. void StopDischarge( float flCoolDownTime );
  38. virtual int ShouldTransmit( const CCheckTransmitInfo *pInfo );
  39. virtual int UpdateTransmitState( void );
  40. virtual void Precache();
  41. void Spawn( void );
  42. private:
  43. CNetworkVar( float, m_flScale );
  44. CNetworkVar( int, m_nState );
  45. CNetworkVar( float, m_flDuration );
  46. CNetworkVar( float, m_flStartTime );
  47. };
  48. #endif
  49. #endif // CITADEL_EFFECTS_SHARED_H