CPointEntity: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
Risk of Confusion:Not the same thing as point entity which is determined by how entity is defined in FGD, and also the logic behind the name choice differs
C++ definitions from 
		
	
No edit summary  | 
				No edit summary  | 
				||
| Line 3: | Line 3: | ||
{{Confusion|Not the same thing as [[point entity]] which is determined by how entity is defined in [[FGD]], and also the logic behind the name choice differs}}  | {{Confusion|Not the same thing as [[point entity]] which is determined by how entity is defined in [[FGD]], and also the logic behind the name choice differs}}  | ||
{{Linked entities|info_player_start|info_landmark|info_teleport_destination|info_target_helicopter_crash|info_hang_lighting|logic_proximity}}  | {{Linked entities  | ||
| 1 = info_player_start  | |||
| 2 = info_landmark  | |||
| 3 = info_teleport_destination  | |||
| 4 = info_target_helicopter_crash  | |||
| 5 = info_hang_lighting  | |||
| 6 = logic_proximity  | |||
| 7 = info_player_rebel  | |||
| 8 = info_player_combine  | |||
}}  | |||
== Keyvalues ==  | == Keyvalues ==  | ||
Latest revision as of 17:11, 10 May 2025
| CPointEntity | 
CPointEntity is a code class in 
 Source. Entities inheriting this class are never rendered as 3D models.
Entities linked to this class
Keyvalues
KeyValue method
- mins / maxs
 - Prints warning to console about not being allowed to modify mins/maxs of point entity.
 
Tip:Can be avoided by specifying # symbol. Example "mins#25 100 100 100". See keyvalue handling of CBaseEntity for more information about this.
- <anything else> <any>
 - Handled by CBaseEntity#KeyValue method.
 
C++ definitions from 
 Source 2013 Multiplayer [edit]
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);
}