#define _spawnfunc_check(fld) \
if (fieldname == #fld) continue;
+ noref entity __spawnfunc_expect;
bool __spawnfunc_unreachable_workaround = true;
#define spawnfunc_1(id) spawnfunc_2(id, FIELDS_UNION)
void __spawnfunc_##id(entity this); \
[[accumulate]] void spawnfunc_##id(entity this) \
{ \
- this = self; \
+ if (self == __spawnfunc_expect) \
+ { \
+ /* engine call */ \
+ __spawnfunc_expect = NULL; \
+ this = self; \
+ } \
+ else \
+ { \
+ assert(this); \
+ } \
if (!this.sourceLocFile) \
{ \
this.sourceLocFile = __FILE__; \
FIELD_SCALAR(fld, modelindex) \
FIELD_SCALAR(fld, modelscale) \
FIELD_SCALAR(fld, model) \
+ FIELD_SCALAR(fld, monsterid) \
FIELD_SCALAR(fld, monster_moveflags) \
+ FIELD_SCALAR(fld, monster_name) \
FIELD_SCALAR(fld, movetype) \
FIELD_SCALAR(fld, netname) \
FIELD_SCALAR(fld, nextthink) \