From c175fa233cf0a4d85f26587203ebd5432f7bce1a Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Thu, 16 Feb 2023 20:50:28 +1000 Subject: [PATCH] Add Q3COMPAT_COMMON to work around #2812 This is needed in a number of MRs whose scope doesn't include changing the design of the STAT macro. --- qcsrc/common/stats.qh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 53f78cc5a..c093b6282 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -355,6 +355,12 @@ bool autocvar_sv_slick_applygravity; REGISTER_STAT(SLICK_APPLYGRAVITY, bool, autocvar_sv_slick_applygravity) REGISTER_STAT(Q3COMPAT, int, q3compat) +// FIXME: workaround for https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/2812 +#ifdef SVQC + #define Q3COMPAT_COMMON q3compat +#elif defined(CSQC) + #define Q3COMPAT_COMMON STAT(Q3COMPAT) +#endif #ifdef SVQC #include "physics/movetypes/movetypes.qh" -- 2.39.2