From 271023eb32c0e1a4ce86d9d9db75fdfbde11c5df Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Fri, 26 May 2023 16:50:37 +0000 Subject: [PATCH] Apply SPAWNFUNC_CHECK_FIELDS in the Makefile for customization reasons --- qcsrc/Makefile | 2 ++ qcsrc/lib/spawnfunc.qh | 1 - qcsrc/tools/compilationunits.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/Makefile b/qcsrc/Makefile index ee9e7e64a..f0ebdf881 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -11,6 +11,7 @@ XONOTIC ?= 1 ENABLE_EFFECTINFO ?= 0 ENABLE_DEBUGDRAW ?= 0 ENABLE_DEBUGTRACE ?= 0 +SPAWNFUNC_CHECK_FIELDS ?= 1 BUILD_MOD ?= ifndef ZIP @@ -44,6 +45,7 @@ QCCDEFS ?= \ -DENABLE_EFFECTINFO=$(ENABLE_EFFECTINFO) \ -DENABLE_DEBUGDRAW=$(ENABLE_DEBUGDRAW) \ -DENABLE_DEBUGTRACE=$(ENABLE_DEBUGTRACE) \ + -DSPAWNFUNC_CHECK_FIELDS=$(SPAWNFUNC_CHECK_FIELDS) \ $(if $(BUILD_MOD), -DBUILD_MOD="$(BUILD_MOD)" -I$(BUILD_MOD), ) \ $(QCCDEFS_EXTRA) diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index b63deac97..8e226b391 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -89,7 +89,6 @@ noref string __fullspawndata; // enables/disables warnings if a map entity has a field that doesn't exist // useful for debugging and compatibility testing -#define SPAWNFUNC_CHECK_FIELDS 1 #if SPAWNFUNC_CHECK_FIELDS #define FIELD_SCALAR(fld, n) \ diff --git a/qcsrc/tools/compilationunits.sh b/qcsrc/tools/compilationunits.sh index d13cb6e09..fa08cdcaa 100755 --- a/qcsrc/tools/compilationunits.sh +++ b/qcsrc/tools/compilationunits.sh @@ -34,6 +34,7 @@ declare -a QCCDEFS=( -DENABLE_EFFECTINFO=0 -DENABLE_DEBUGDRAW=0 -DENABLE_DEBUGTRACE=0 + -DSPAWNFUNC_CHECK_FIELDS=1 ) QCCDEFS="${QCCDEFS[@]}" -- 2.39.2