From: Mario Date: Fri, 13 Nov 2020 14:03:02 +0000 (+1000) Subject: Nullify the think function on map entities, works around some crashes in certain... X-Git-Tag: xonotic-v0.8.5~676 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae0250d5eefdf37f3135cff03afa9ba27bd0e9c8;p=xonotic%2Fxonotic-data.pk3dir.git Nullify the think function on map entities, works around some crashes in certain maps --- diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index 5c1cfac37..d254364ce 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -283,6 +283,9 @@ noref bool __spawnfunc_first; 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" */ \