]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/spawnfunc.qh
Add function to access "raw" map entity field values in engines with __fullspawndata...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / spawnfunc.qh
index 7130703ec8e4783e3878c013c109c00f7d63279e..bed384ec69697b1bbf6f0df42b84fc2db2f94f9d 100644 (file)
@@ -7,6 +7,8 @@
 noref bool require_spawnfunc_prefix;
 .bool spawnfunc_checked;
 
+.string fullspawndata;
+
 // Optional type checking; increases compile time too much to be enabled by default
 #if 0
        bool entityfieldassignablefromeditor(int i)
@@ -282,6 +284,11 @@ noref bool __spawnfunc_first;
                } \
                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 */ \