CBaseEntity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-added the rest of class hierarchy)
mNo edit summary
Line 1: Line 1:
{{CDA|CBaseEntity|IServerEntity|IServerUnknown|IHandleEntity}}
{{CDA|CBaseEntity|IServerEntity|IServerUnknown|IHandleEntity}}
<noinclude>{{lang|CBaseEntity}}[[Category:Programming]]</noinclude>
{{multipage}}
The base class for all entities.


== Keyvalues ==
[[Category:Programming]]
{{KV BaseEntity}}
 
== Inputs ==
{{I BaseEntity}}
 
== Outputs ==
{{O BaseEntity|l4d=1}}
 
= Programming related =
To get the class name of an entity, use
<source lang="cpp">
entity->edict()->GetClassName();
</source>
 
== Asserts ==
=== Client ===
'''Problem:'''
<source lang="cpp">
// Model could not be found
Assert( !"Model could not be found, index is -1" );</source>
'''Solution:'''
*Check your model name three times.
*Precache your model on both server and client.

Revision as of 23:42, 21 December 2023