CBaseEntity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
*Check your model name thrice.
*Check your model name thrice.
*Precache your model on both server and client.
*Precache your model on both server and client.
[[Category:Programming]]

Revision as of 22:21, 29 December 2011

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 thrice.
  • Precache your model on both server and client.