Feature #1847
C++ internal data for thinkers
Description
- renderer per-object state (halo, flare, 3D model, etc.)
- clientside extra data for tracking objects
- the thinker's Doomsday Script instance Record
- any other internal per-object bookkeeping
Having this data as part of a thinker would avoid the need to maintain any hashes or other lookups on the side for such data.
The challenge is that thinkers are managed as POD structs allocated from the memory zone. At a minimum (or as a first step), it would be necessary to add an extra pointer to the mobj struct that points to the C++ instance data, and have this extra instance allocated and deallocated when the object is created and destroyed.
History
#1 Updated by skyjake over 10 years ago
Further motivation: http://etc.skyjake.fi/2014/07/internal-data-for-thinkers/
#2 Updated by skyjake over 10 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
#3 Updated by skyjake over 10 years ago
The mechanism for private thinker data has now been implemented. In the future, all the various thinker types should be revised to take advantage of this (if appropriate). The changes do not preclude use of the old C style struct thinkers.