]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Spawnfuncs: don't check field types, increases compile time too much
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 3 Oct 2015 08:46:22 +0000 (18:46 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 3 Oct 2015 08:48:44 +0000 (18:48 +1000)
qcsrc/lib/spawnfunc.qh

index c474104d6eadf6c509634885d24559c60a814d11..00c9be13541f25f842018dd58a1ea5fda0732152 100644 (file)
@@ -5,6 +5,8 @@
 noref bool require_spawnfunc_prefix;
 .bool spawnfunc_checked;
 
+// Optional type checking; increases compile time too much to be enabled by default
+#if 0
 bool entityfieldassignablefromeditor(int i) {
     switch (entityfieldtype(i)) {
         case FIELD_STRING:
@@ -17,6 +19,9 @@ bool entityfieldassignablefromeditor(int i) {
 
 #define _spawnfunc_checktypes(fld) if (fieldname == #fld) \
     if (!entityfieldassignablefromeditor(i)) LOG_FATALF("Entity field '%s' cannot be whitelisted\n", fieldname);
+#else
+#define _spawnfunc_checktypes(fld)
+#endif
 #define _spawnfunc_check(fld) if (fieldname == #fld) \
     continue;