]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Nullify the think function on map entities, works around some crashes in certain...
authorMario <mario.mario@y7mail.com>
Fri, 13 Nov 2020 14:03:02 +0000 (00:03 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 13 Nov 2020 14:03:28 +0000 (00:03 +1000)
qcsrc/lib/spawnfunc.qh

index 5c1cfac379a440723d76e44b1f842fdf36706039..d254364cefe2d38a4ecd228183d8d65a3043508d 100644 (file)
@@ -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" */ \