Edict t: Difference between revisions
Dave Gomboc (talk | contribs) (Adding some basic information about edict_t that was posted to hlcoders.) |
Dave Gomboc (talk | contribs) mNo edit summary |
||
Line 5: | Line 5: | ||
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). | 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 | 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 size and behaviour mismatches between parts of the engine you compile when modding and parts of the engine that were pre-compiled by Valve. | ||
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. | 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. |
Revision as of 10:22, 16 September 2008
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 size and behaviour mismatches between parts of the engine you compile when modding and parts of the engine that were pre-compiled by Valve.
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.