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.

50 lines
1.5 KiB

  1. //====== Copyright � 1996-2008, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: stores map postprocess params
  4. //
  5. //=============================================================================
  6. #include "cbase.h"
  7. #include "c_postprocesscontroller.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. #ifdef CPostProcessController
  11. #undef CPostProcessController
  12. #endif
  13. IMPLEMENT_CLIENTCLASS_DT( C_PostProcessController, DT_PostProcessController, CPostProcessController )
  14. RecvPropArray3( RECVINFO_NAME( m_PostProcessParameters.m_flParameters[0], m_flPostProcessParameters ), POST_PROCESS_PARAMETER_COUNT, RecvPropFloat( RECVINFO_NAME( m_PostProcessParameters.m_flParameters[0], m_flPostProcessParameters[0] ) ) ),
  15. RecvPropBool( RECVINFO(m_bMaster) )
  16. END_RECV_TABLE()
  17. C_PostProcessController* C_PostProcessController::ms_pMasterController = NULL;
  18. //-----------------------------------------------------------------------------
  19. C_PostProcessController::C_PostProcessController( void )
  20. : m_bMaster( false )
  21. {
  22. if ( ms_pMasterController == NULL )
  23. {
  24. ms_pMasterController = this;
  25. }
  26. }
  27. //-----------------------------------------------------------------------------
  28. C_PostProcessController::~C_PostProcessController( void )
  29. {
  30. if ( ms_pMasterController == this )
  31. {
  32. ms_pMasterController = NULL;
  33. }
  34. }
  35. void C_PostProcessController::PostDataUpdate( DataUpdateType_t updateType )
  36. {
  37. BaseClass::PostDataUpdate( updateType );
  38. if ( m_bMaster )
  39. {
  40. ms_pMasterController = this;
  41. }
  42. }