Edict t: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (recat)
(Adding some basic information about edict_t that was posted to hlcoders.)
Line 2: Line 2:
{{stub}}
{{stub}}
'''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.
'''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==
==Related content==
[[CBaseEdict]]
[[CBaseEdict]]
[[Category:Structures]]
[[Category:Structures]]

Revision as of 10:21, 16 September 2008

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