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.

36 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "proxyentity.h"
  9. #include "iclientrenderable.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. //-----------------------------------------------------------------------------
  13. // Cleanup
  14. //-----------------------------------------------------------------------------
  15. void CEntityMaterialProxy::Release( void )
  16. {
  17. delete this;
  18. }
  19. //-----------------------------------------------------------------------------
  20. // Helper class to deal with floating point inputs
  21. //-----------------------------------------------------------------------------
  22. void CEntityMaterialProxy::OnBind( void *pRenderable )
  23. {
  24. if( !pRenderable )
  25. return;
  26. IClientRenderable *pRend = ( IClientRenderable* )pRenderable;
  27. C_BaseEntity *pEnt = pRend->GetIClientUnknown()->GetBaseEntity();
  28. if ( pEnt )
  29. {
  30. OnBind( pEnt );
  31. }
  32. }