}
}
+// this function simply avoids expanding IL_NEW during compilation
+// for each spawning entity
+void g_spawn_queue_spawn() { g_spawn_queue = IL_NEW(); }
+
noref bool __spawnfunc_first;
#define spawnfunc(id) \
if (__spawnfunc_expecting > 1) { __spawnfunc_expecting = 0; } \
else if (__spawnfunc_expecting) { \
/* engine call */ \
- if (!g_spawn_queue) { g_spawn_queue = IL_NEW(); } \
+ if (!g_spawn_queue) g_spawn_queue_spawn(); \
__spawnfunc_expecting = 0; \
this = __spawnfunc_expect; \
__spawnfunc_expect = NULL; \
this.spawnfunc_checked = true; \
if (this) { \
/* not worldspawn, delay spawn */ \
+ /* clear some dangerous fields (TODO: properly support these in the map!) */ \
+ this.think = func_null; \
+ this.nextthink = 0; \
__spawnfunc_defer(this, __spawnfunc_##id); \
} else { \
/* world might not be "worldspawn" */ \