]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
spawnfuncs: fix alternate worldspawn classnames
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 31 Aug 2017 10:37:27 +0000 (20:37 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 1 Sep 2017 09:53:55 +0000 (19:53 +1000)
qcsrc/lib/_all.inc
qcsrc/lib/spawnfunc.qh

index 6e93c5af36c4db32060301c3eb64ad911f9bf011..9d582091039faa12ac2028efeb9022357be3a631 100644 (file)
@@ -188,7 +188,7 @@ void make_safe_for_remove(entity this);
                if (!_StartFrame_init) {
                        _StartFrame_init = true;
                        float oldtime = time; time = 1;
-                       __spawnfunc_expecting = 2; spawnfunc_worldspawn(NULL);
+                       __spawnfunc_expecting = 2; NULL.__spawnfunc_constructor(NULL);
                        time = oldtime;
         }
         if (_StartFrame) _StartFrame();
index 98922d4876194748d636ca5978abfff084a5ac4e..3434d39982402679f5925fa27121b4ba89846a97 100644 (file)
@@ -99,6 +99,9 @@ noref bool require_spawnfunc_prefix;
                                if (this) { \
                     /* not worldspawn, delay spawn */ \
                     __spawnfunc_defer(this, __spawnfunc_##id); \
+                } else { \
+                    /* world might not be "worldspawn" */ \
+                    this.__spawnfunc_constructor = __spawnfunc_##id; \
                 } \
                        } \
                        if (dospawn) { __spawnfunc_##id(this); } \