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.

51 lines
1.2 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #include "cbase.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. class C_FuncOccluder : public C_BaseEntity
  12. {
  13. public:
  14. DECLARE_CLIENTCLASS();
  15. DECLARE_CLASS( C_FuncOccluder, C_BaseEntity );
  16. // Overrides.
  17. public:
  18. virtual bool ShouldDraw();
  19. virtual int DrawModel( int flags, const RenderableInstance_t &instance );
  20. virtual void OnDataChanged( DataUpdateType_t updateType );
  21. private:
  22. int m_nOccluderIndex;
  23. bool m_bActive;
  24. };
  25. IMPLEMENT_CLIENTCLASS_DT( C_FuncOccluder, DT_FuncOccluder, CFuncOccluder )
  26. RecvPropBool( RECVINFO( m_bActive ) ),
  27. RecvPropInt( RECVINFO(m_nOccluderIndex) ),
  28. END_RECV_TABLE()
  29. void C_FuncOccluder::OnDataChanged( DataUpdateType_t updateType )
  30. {
  31. BaseClass::OnDataChanged( updateType );
  32. engine->ActivateOccluder( m_nOccluderIndex, m_bActive );
  33. }
  34. bool C_FuncOccluder::ShouldDraw()
  35. {
  36. return false;
  37. }
  38. int C_FuncOccluder::DrawModel( int flags, const RenderableInstance_t &instance )
  39. {
  40. Assert(0);
  41. return 0;
  42. }