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
(-added class hierarchy, confusion) |
No edit summary |
||
Line 3: | Line 3: | ||
CPointEntity is a code class in {{Source|4}}, it has under it <code>info_player_start</code> and other entities related to spawning players. | CPointEntity is a code class in {{Source|4}}, it has under it <code>info_player_start</code> and other entities related to spawning players. | ||
{{ModernConfusion|Not the same thing as [[point entity]] which is determined by how entity is defined in [[FGD]]}} | {{ModernConfusion|Not the same thing as [[point entity]] which is determined by how entity is defined in [[FGD]]}} | ||
{{clr}} | |||
Entities inheriting this class don't allow modifying its mins/maxs via keyvalues | |||
<syntaxhighlight lang=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 ); | |||
} | |||
</syntaxhighlight> |
Revision as of 15:07, 15 July 2024
![]() |
---|
CPointEntity |
![]() |
CPointEntity is a code class in Source, it has under it
info_player_start
and other entities related to spawning players.

Entities inheriting this class don't allow modifying its mins/maxs via keyvalues
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 );
}