From 73b0133c93e101096ef29528d2c35beced0d46af Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 3 Oct 2015 18:46:22 +1000 Subject: [PATCH] Spawnfuncs: don't check field types, increases compile time too much --- qcsrc/lib/spawnfunc.qh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index c474104d6..00c9be135 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -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; -- 2.39.2