]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add Q3COMPAT_COMMON to work around #2812
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 16 Feb 2023 10:50:28 +0000 (20:50 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 16 Feb 2023 10:55:32 +0000 (20:55 +1000)
This is needed in a number of MRs whose scope doesn't include changing
the design of the STAT macro.

qcsrc/common/stats.qh

index 53f78cc5ad2d8b3b077441f9f0d8f5291c63a5e0..c093b62826d020269e45b7792c642bf56bc65341 100644 (file)
@@ -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"