From ae0250d5eefdf37f3135cff03afa9ba27bd0e9c8 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 14 Nov 2020 00:03:02 +1000 Subject: [PATCH] Nullify the think function on map entities, works around some crashes in certain maps --- qcsrc/lib/spawnfunc.qh | 3 +++ 1 file changed, 3 insertions(+) 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" */ \ -- 2.39.2