source-engine/game/client/c_func_occluder.cpp

52 lines
1.2 KiB
C++
Raw Normal View History

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: $
//
2023-10-03 17:23:56 +03:00
//===========================================================================//
2020-04-22 12:56:21 -04:00
#include "cbase.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
class C_FuncOccluder : public C_BaseEntity
{
public:
DECLARE_CLIENTCLASS();
DECLARE_CLASS( C_FuncOccluder, C_BaseEntity );
// Overrides.
public:
virtual bool ShouldDraw();
2023-10-03 17:23:56 +03:00
virtual int DrawModel( int flags, const RenderableInstance_t &instance );
2020-04-22 12:56:21 -04:00
virtual void OnDataChanged( DataUpdateType_t updateType );
private:
int m_nOccluderIndex;
2023-10-03 17:23:56 +03:00
bool m_bActive;
2020-04-22 12:56:21 -04:00
};
IMPLEMENT_CLIENTCLASS_DT( C_FuncOccluder, DT_FuncOccluder, CFuncOccluder )
RecvPropBool( RECVINFO( m_bActive ) ),
RecvPropInt( RECVINFO(m_nOccluderIndex) ),
END_RECV_TABLE()
void C_FuncOccluder::OnDataChanged( DataUpdateType_t updateType )
{
BaseClass::OnDataChanged( updateType );
engine->ActivateOccluder( m_nOccluderIndex, m_bActive );
}
bool C_FuncOccluder::ShouldDraw()
{
return false;
}
2023-10-03 17:23:56 +03:00
int C_FuncOccluder::DrawModel( int flags, const RenderableInstance_t &instance )
2020-04-22 12:56:21 -04:00
{
Assert(0);
return 0;
}