]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/stats.qh
Remove legacy Quake bbox expansion: map entities
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / stats.qh
index b57f41af2b4927d466dd64f4533f0c7103db6511..f0ea92d6345e347c12d40116ed63fac1c8390c68 100644 (file)
@@ -11,7 +11,42 @@ USING(vectori, vector);
 const int STATS_ENGINE_RESERVE = 32;
 // must be listed in ascending order
 #define MAGIC_STATS(_, x) \
+       _(x, MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, 220) \
+       _(x, MOVEVARS_AIRCONTROL_PENALTY, 221) \
+       _(x, MOVEVARS_AIRSPEEDLIMIT_NONQW, 222) \
+       _(x, MOVEVARS_AIRSTRAFEACCEL_QW, 223) \
+       _(x, MOVEVARS_AIRCONTROL_POWER, 224) \
+       _(x, MOVEFLAGS, 225) \
+       _(x, MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, 226) \
+       _(x, MOVEVARS_WARSOWBUNNY_ACCEL, 227) \
+       _(x, MOVEVARS_WARSOWBUNNY_TOPSPEED, 228) \
+       _(x, MOVEVARS_WARSOWBUNNY_TURNACCEL, 229) \
+       _(x, MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, 230) \
+       _(x, MOVEVARS_AIRSTOPACCELERATE, 231) \
+       _(x, MOVEVARS_AIRSTRAFEACCELERATE, 232) \
+       _(x, MOVEVARS_MAXAIRSTRAFESPEED, 233) \
+       _(x, MOVEVARS_AIRCONTROL, 234) \
+       _(x, FRAGLIMIT, 235) \
+       _(x, TIMELIMIT, 236) \
+       _(x, MOVEVARS_WALLFRICTION, 237) \
+       _(x, MOVEVARS_FRICTION, 238) \
+       _(x, MOVEVARS_WATERFRICTION, 239) \
+       _(x, MOVEVARS_TICRATE, 240) \
        _(x, MOVEVARS_TIMESCALE, 241) \
+       _(x, MOVEVARS_GRAVITY, 242) \
+       _(x, MOVEVARS_STOPSPEED, 243) \
+       _(x, MOVEVARS_MAXSPEED, 244) \
+       _(x, MOVEVARS_SPECTATORMAXSPEED, 245) \
+       _(x, MOVEVARS_ACCELERATE, 246) \
+       _(x, MOVEVARS_AIRACCELERATE, 247) \
+       _(x, MOVEVARS_WATERACCELERATE, 248) \
+       _(x, MOVEVARS_ENTGRAVITY, 249) \
+       _(x, MOVEVARS_JUMPVELOCITY, 250) \
+       _(x, MOVEVARS_EDGEFRICTION, 251) \
+       _(x, MOVEVARS_MAXAIRSPEED, 252) \
+       _(x, MOVEVARS_STEPHEIGHT, 253) \
+       _(x, MOVEVARS_AIRACCEL_QW, 254) \
+       _(x, MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, 255) \
        /**/
 
 int g_magic_stats_hole = 0;
@@ -90,8 +125,8 @@ int g_magic_stats_hole = 0;
        .int __stat_null;
        STATIC_INIT(stats)
        {
-           STATS = new(stats);
-           // Prevent engine stats being sent
+               STATS = new_pure(stats);
+               // Prevent engine stats being sent
                int r = STATS_ENGINE_RESERVE;
                for (int i = 0, n = 256 - r; i < n; ++i) {
                        #define X(_, name, id) if (i == id) continue;
@@ -117,10 +152,12 @@ int g_magic_stats_hole = 0;
                        addstat_##T(STAT_##id.m_id, fld); \
                }
        void GlobalStats_update(entity this) {}
+       void GlobalStats_updateglobal() {}
     /** TODO: do we want the global copy to update? */
     #define REGISTER_STAT_3(id, T, expr) \
        REGISTER_STAT_2(id, T); \
        ACCUMULATE void GlobalStats_update(entity this) { STAT(id, this) = (expr); } \
+       ACCUMULATE void GlobalStats_updateglobal() { entity this = STATS; STAT(id, this) = (expr); } \
        STATIC_INIT(worldstat_##id) { entity this = STATS; STAT(id, this) = (expr); }
 #else
        #define REGISTER_STAT_2(id, type)
@@ -131,6 +168,8 @@ REGISTRY(Stats, 256 - STATS_ENGINE_RESERVE)
 REGISTER_REGISTRY(Stats)
 REGISTRY_SORT(Stats)
 REGISTRY_CHECK(Stats)
+
+REGISTRY_DEFINE_GET(Stats, NULL)
 STATIC_INIT(Stats_renumber)
 {
        FOREACH(Stats, true, {