2023-10-03 17:23:56 +03:00
|
|
|
|
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
2020-04-22 12:56:21 -04:00
|
|
|
|
//
|
|
|
|
|
// Purpose:
|
|
|
|
|
//
|
|
|
|
|
// $NoKeywords: $
|
|
|
|
|
//=============================================================================//
|
|
|
|
|
#include "cbase.h"
|
|
|
|
|
#include "proxyentity.h"
|
2023-10-03 17:23:56 +03:00
|
|
|
|
#include "IClientRenderable.h"
|
2020-04-22 12:56:21 -04:00
|
|
|
|
|
|
|
|
|
// memdbgon must be the last include file in a .cpp file!!!
|
|
|
|
|
#include "tier0/memdbgon.h"
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
// Cleanup
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
void CEntityMaterialProxy::Release( void )
|
|
|
|
|
{
|
|
|
|
|
delete this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2022-03-01 23:00:42 +03:00
|
|
|
|
// Helper class to deal with floating point inputs
|
2020-04-22 12:56:21 -04:00
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
void CEntityMaterialProxy::OnBind( void *pRenderable )
|
|
|
|
|
{
|
|
|
|
|
if( !pRenderable )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
IClientRenderable *pRend = ( IClientRenderable* )pRenderable;
|
|
|
|
|
C_BaseEntity *pEnt = pRend->GetIClientUnknown()->GetBaseEntity();
|
|
|
|
|
if ( pEnt )
|
|
|
|
|
{
|
|
|
|
|
OnBind( pEnt );
|
|
|
|
|
}
|
|
|
|
|
}
|