CBaseEntity

From Valve Developer Community
Revision as of 22:21, 29 December 2011 by Nickgn12 (talk | contribs)
Jump to navigation Jump to search

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.