Edict t

From Valve Developer Community
Revision as of 10:21, 16 September 2008 by Dave Gomboc (talk | contribs) (Adding some basic information about edict_t that was posted to hlcoders.)
Jump to navigation Jump to search

Template:Wrongtitle

Stub

This article or section is a stub. You can help by expanding it.

Purpose: The engine's internal representation of an entity, including some basic collision and position info and a pointer to the class wrapped on top of the structure.

An edict, an abbreviation of "entity dictionary" attributed to John Carmack, is a way to store basic properties about an entity (e.g., location, rotation).

Do not attempt to change the class definition of edict_t when modding. As a member of the HL Coders list put it, "messing with them will cause the magic smoke to evaporate from your compiler." The Source engine is compiled with a specific edict structure. Mod code cannot add or remove properties because it would cause a size mismatch between what parts of the engine that you don't have source code for expect.

http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg01215.html suggests that it's not a good idea to rely upon a destructor being called for this class either. The naming of this class ("edict_t", as opposed to "edict") suggests this also.

Related content

CBaseEdict