Entity index: Difference between revisions
Jump to navigation
Jump to search
Note:An entity index is not reliable between frames, as it can be freed from one entity and and reallocated to another at any time. Use
Confirm:An existing entity's index cannot be changed.
TomEdwards (talk | contribs) No edit summary |
TomEdwards (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
An '''entity index''' is a unique [[integer]] given to every entity by the engine. It allows the same entity to be referred to across | An '''entity index''' is a unique [[integer]] given to every entity by the engine. It allows the same entity to be referred to across library boundaries, but will be different on the client and server unless an [[edict]] is used. Within a library, [[pointer]]s are more useful. | ||
[[Entity limit|There can be up to 4096 entities in the index]]. The first 2048 entries are reserved for entities with [[edict]]s, which cross the client/server divide. | [[Entity limit|There can be up to 4096 entities in the index]]. The first 2048 entries are reserved for entities with [[edict]]s, which cross the client/server divide. |
Revision as of 05:38, 19 October 2010
An entity index is a unique integer given to every entity by the engine. It allows the same entity to be referred to across library boundaries, but will be different on the client and server unless an edict is used. Within a library, pointers are more useful.
There can be up to 4096 entities in the index. The first 2048 entries are reserved for entities with edicts, which cross the client/server divide.

CHandle
for long-term storage.Usage
