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.

48 lines
1.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ENVMESSAGE_H
  8. #define ENVMESSAGE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "baseentity.h"
  13. #include "entityoutput.h"
  14. #define SF_MESSAGE_ONCE 0x0001 // Fade in, not out
  15. #define SF_MESSAGE_ALL 0x0002 // Send to all clients
  16. class CMessage : public CPointEntity
  17. {
  18. public:
  19. DECLARE_CLASS( CMessage, CPointEntity );
  20. void Spawn( void );
  21. void Precache( void );
  22. inline void SetMessage( string_t iszMessage ) { m_iszMessage = iszMessage; }
  23. void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  24. private:
  25. void InputShowMessage( inputdata_t &inputdata );
  26. string_t m_iszMessage; // Message to display.
  27. float m_MessageVolume;
  28. int m_MessageAttenuation;
  29. float m_Radius;
  30. DECLARE_DATADESC();
  31. string_t m_sNoise;
  32. COutputEvent m_OnShowMessage;
  33. };
  34. #endif // ENVMESSAGE_H