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.

60 lines
1.6 KiB

  1. //========= Copyright � 1996-2009, Valve Corporation, All rights reserved. ============//
  2. //
  3. //=============================================================================//
  4. #ifndef PAINT_CLEANSER_MANAGER_H
  5. #define PAINT_CLEANSER_MANAGER_H
  6. #ifdef CLIENT_DLL
  7. class C_TriggerPaintCleanser;
  8. #else
  9. class CTriggerPaintCleanser;
  10. #endif
  11. //The paint cleanser on client and server
  12. #ifdef CLIENT_DLL
  13. typedef CUtlVector<C_TriggerPaintCleanser*> PaintCleanserVector_t;
  14. #else
  15. typedef CUtlVector<CTriggerPaintCleanser*> PaintCleanserVector_t;
  16. typedef CTriggerPaintCleanser C_TriggerPaintCleanser;
  17. #endif
  18. #ifdef CLIENT_DLL
  19. class CPaintCleanserManager : public CAutoGameSystemPerFrame
  20. #else
  21. class CPaintCleanserManager : public CAutoGameSystem
  22. #endif
  23. {
  24. public:
  25. CPaintCleanserManager( char const *name );
  26. ~CPaintCleanserManager();
  27. //CAutoGameSystem members
  28. virtual char const *Name() { return "PaintCleanserManager"; }
  29. virtual void LevelInitPreEntity();
  30. virtual void LevelShutdownPreEntity();
  31. void AddPaintCleanser( C_TriggerPaintCleanser *pCleanser );
  32. void RemovePaintCleanser( C_TriggerPaintCleanser *pCleanser );
  33. void GetPaintCleansers( PaintCleanserVector_t& paintCleansers );
  34. #ifdef CLIENT_DLL
  35. //CAutoGameSystemPerFrame members
  36. virtual void Update( float frametime );
  37. #endif
  38. private:
  39. #ifdef CLIENT_DLL
  40. void UpdatePaintCleanserVisibility( void );
  41. C_TriggerPaintCleanser *m_ppVisibleCleanser[ MAX_SPLITSCREEN_PLAYERS ];
  42. float m_flNextPollTime;
  43. #endif
  44. PaintCleanserVector_t m_PaintCleansers;
  45. };
  46. extern CPaintCleanserManager PaintCleanserManager;
  47. #endif //PAINT_CLEANSER_MANAGER_H