CBaseEntity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Russification)
No edit summary
Line 1: Line 1:
{{otherlang2
<noinclude>{{otherlang2
|noborder=true
|noborder=true
|ru=CBaseEntity:ru
|ru=CBaseEntity:ru
}}__NOTOC__
}}__NOTOC__
[[Category:Programming]]
</noinclude>


The base class for all entities.<br>
The base class for all entities.<br>
Line 19: Line 21:
*Check your model name three times.
*Check your model name three times.
*Precache your model on both server and client.
*Precache your model on both server and client.
[[Category:Programming]]

Revision as of 22:30, 16 May 2019

Template:Otherlang2


The base class for all entities.
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.