From: bones_was_here Date: Thu, 16 Feb 2023 10:50:28 +0000 (+1000) Subject: Add Q3COMPAT_COMMON to work around #2812 X-Git-Tag: xonotic-v0.8.6~169 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c175fa233cf0a4d85f26587203ebd5432f7bce1a;p=xonotic%2Fxonotic-data.pk3dir.git 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. --- 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"