CBaseEntity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(-added kio)
Line 6: Line 6:
</noinclude>
</noinclude>


The base class for all entities.<br>
The base class for all entities.
 
== Keyvalues ==
{{KV BaseEntity}}
 
== Inputs ==
{{I BaseEntity}}
 
== Outputs ==
{{O BaseEntity}}
 
= Programming related =
To get the class name of an entity, use  
To get the class name of an entity, use  
<source lang="cpp">
<source lang="cpp">
Line 12: Line 23:
</source>
</source>


= Asserts =
== Asserts ==
== Client ==
=== Client ===
'''Problem:'''
'''Problem:'''
<source lang="cpp">
<source lang="cpp">

Revision as of 05:28, 7 November 2022

Template:Otherlang2


The base class for all entities.

Keyvalues

Inputs

Outputs

Programming related

To get the class name of an entity, use

entity->edict()->GetClassName();

Asserts

Client

Problem:

// Model could not be found
Assert( !"Model could not be found, index is -1" );

Solution:

  • Check your model name three times.
  • Precache your model on both server and client.