CBaseEntity

From Valve Developer Community
Jump to: navigation, 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 three times.
  • Precache your model on both server and client.