C++ internal data for thinkers
- 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.
#1 Updated by skyjake over 9 years ago
Further motivation: http://etc.skyjake.fi/2014/07/internal-data-for-thinkers/