CPointEntity/definitions: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
[[Category:Definitions]]
=== [https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/baseentity.h baseentity.h] ===
=== [https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/baseentity.h baseentity.h] ===
<syntaxhighlight lang=cpp>
<syntaxhighlight lang=cpp>

Latest revision as of 20:02, 9 June 2025

baseentity.h

class CPointEntity : public CBaseEntity
{
public:
	DECLARE_CLASS( CPointEntity, CBaseEntity );

	void	Spawn( void );
	virtual int	ObjectCaps( void ) { return BaseClass::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
	virtual bool KeyValue( const char *szKeyName, const char *szValue );
private:
};

baseentity.cpp

bool CPointEntity::KeyValue( const char *szKeyName, const char *szValue ) 
{
	if ( FStrEq( szKeyName, "mins" ) || FStrEq( szKeyName, "maxs" ) )
	{
		Warning("Warning! Can't specify mins/maxs for point entities! (%s)\n", GetClassname() );
		return true;
	}

	return BaseClass::KeyValue( szKeyName, szValue );
}

subs.cpp

void CPointEntity::Spawn( void )
{
	SetSolid( SOLID_NONE );
//	UTIL_SetSize(this, vec3_origin, vec3_origin);
}