I think I was doing something "bad".
I had fieldmap [] defined as such ...
Code: Select all
fields_t fieldmap [] = // System defaults
{
// name stringvalue argnum <-- argum for entities_add command, set with entities_fields command
{ "INVALID", "NONE", SPECIAL_INVALID,EVAL_TEXT64, 0, 0},
{ "name", "NONE", SPECIAL_PTRREF, EVAL_TEXT64, 1, offsetof(entity_t, _name)}, // Special -> name
{ "parent_name","NONE", SPECIAL_RESOLVE,EVAL_TEXT64, 0, offsetof(entity_t, _parent_name)}, // Special -> parent_name (parent, child_count, child_max_nest_level)
{ "model", "NONE", SPECIAL_MGR_M, EVAL_TEXT64, 2, offsetof(entity_t, _model)}, // Special -> model_url, model_manager_slot
{ "texture", "NONE", SPECIAL_MGR_T, EVAL_TEXT64, 3, offsetof(entity_t, _texture)}, // Special -> texture_url, texture_manager_slot
...
But was externing as such:
extern const fields_t* fieldmap;
And I think that was causing the issue. Eventually fieldmap was going to be dynamically allocated, but I hadn't done that yet and I didn't think my extern would hurt anything but apparently it did.
[Yeah, I'm playing around and do some crazy stuff. Investigating inner mysteries ... ]