]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/spawnfunc.qh
Remove legacy Quake bbox expansion: map entities
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / spawnfunc.qh
index 5d35089e5ab1daf83c1441691f5a3538d63c4555..2d9392dada941f7f921fe839bcb67891a8c14148 100644 (file)
@@ -7,7 +7,8 @@
 noref bool require_spawnfunc_prefix;
 .bool spawnfunc_checked;
 /** Not for production use, provides access to a dump of the entity's fields when it is parsed from map data */
-//noref string __fullspawndata;
+noref string __fullspawndata;
+.string fullspawndata;
 
 // Optional type checking; increases compile time too much to be enabled by default
 #if 0
@@ -72,7 +73,7 @@ noref bool require_spawnfunc_prefix;
     void __spawnfunc_spawn(entity prototype)
     {
         entity e = new(clone);
-        copyentity(prototype, e);
+        copyentity_qc(prototype, e);
         IL_PUSH(g_map_entities, e);
         #define X(T, fld, def) { e.fld = e.__spawnfunc_##fld; e.__spawnfunc_##fld = def; }
         SPAWNFUNC_INTERNAL_FIELDS(X);
@@ -172,6 +173,7 @@ noref bool require_spawnfunc_prefix;
                FIELD_SCALAR(fld, monster_name) \
                FIELD_SCALAR(fld, movetype) \
                FIELD_SCALAR(fld, move_movetype) \
+               FIELD_SCALAR(fld, music) \
                FIELD_SCALAR(fld, netname) \
                FIELD_SCALAR(fld, nextthink) \
                FIELD_SCALAR(fld, noalign) \
@@ -179,6 +181,12 @@ noref bool require_spawnfunc_prefix;
                FIELD_SCALAR(fld, noise2) \
                FIELD_SCALAR(fld, noise3) \
                FIELD_SCALAR(fld, noise) \
+               FIELD_SCALAR(fld, notcpm) \
+               FIELD_SCALAR(fld, notfree) \
+               FIELD_SCALAR(fld, notsingle) \
+               FIELD_SCALAR(fld, notta) \
+               FIELD_SCALAR(fld, notteam) \
+               FIELD_SCALAR(fld, notvq3) \
                FIELD_SCALAR(fld, phase) \
                FIELD_SCALAR(fld, platmovetype) \
                FIELD_SCALAR(fld, race_place) \
@@ -286,6 +294,11 @@ noref bool __spawnfunc_first;
                this.classname = #id; \
                if (!this.spawnfunc_checked) { \
                        _checkWhitelisted(this, #id); \
+                       if (__fullspawndata) { \
+                               /* not supported in old DP */ \
+                               /* must be read inside the real spawnfunc */ \
+                               this.fullspawndata = __fullspawndata; \
+                       } \
                        this.spawnfunc_checked = true; \
                        if (this) { \
                                /* not worldspawn, delay spawn */ \