]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Do another bunch of stats
authorMario <mario@smbclan.net>
Fri, 27 Nov 2015 14:13:42 +0000 (00:13 +1000)
committerMario <mario@smbclan.net>
Fri, 27 Nov 2015 14:13:42 +0000 (00:13 +1000)
13 files changed:
qcsrc/client/hud/panel/modicons.qc
qcsrc/client/hud/panel/powerups.qc
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/movetypes/movetypes.qh
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/multijump/multijump.qc
qcsrc/common/physics.qc
qcsrc/common/physics.qh
qcsrc/common/stats.qh
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc

index 11dd96fb43c424ac3cd7d5338f682d2919b837f2..9fe8c8bcfa8e599318a0904f85a824bd96b93d43 100644 (file)
@@ -110,7 +110,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        int redflag, blueflag, yellowflag, pinkflag, neutralflag; // current status
        float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime, yellowflag_statuschange_elapsedtime, pinkflag_statuschange_elapsedtime, neutralflag_statuschange_elapsedtime; // time since the status changed
        bool ctf_oneflag; // one-flag CTF mode enabled/disabled
-       int stat_items = getstati(STAT_CTF_FLAGSTATUS, 0, 24);
+       int stat_items = STAT(CTF_FLAGSTATUS);
        float fs, fs2, fs3, size1, size2;
        vector e1, e2;
 
index 933cb422928e6e6af0daec20b09b148445116b0f..51574a3299bd2643841d72737433713115e4b31a 100644 (file)
@@ -98,7 +98,7 @@ void HUD_Powerups()
                addPowerupItem("Superweapons", "superweapons", autocvar_hud_progressbar_superweapons_color, superTime, 30);
 
        FOREACH(Buffs, it.m_itemid & allBuffs, LAMBDA(
-               addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60);
+               addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, STAT(BUFF_TIME) - time, 99), 60);
        ));
 
        if(!powerupItemsCount)
index 6e828d7ebe8ed55a2c27b296dd4b7c1469f163b7..87adec58b0851a67b1e747068453e35e7cb39839 100644 (file)
@@ -1006,7 +1006,7 @@ void HUD_Crosshair()
 void HUD_Draw()
 {
        if(STAT(FROZEN))
-               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, ((getstatf(STAT_REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * getstatf(STAT_REVIVE_PROGRESS)) + ('0 1 1' * getstatf(STAT_REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, ((STAT(REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * STAT(REVIVE_PROGRESS)) + ('0 1 1' * STAT(REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
        else if (STAT(HEALING_ORB)>time)
                drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, NADE_TYPE_HEAL.m_color, autocvar_hud_colorflash_alpha*STAT(HEALING_ORB_ALPHA), DRAWFLAG_ADDITIVE);
        if(!intermission)
@@ -1015,9 +1015,9 @@ void HUD_Draw()
                DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(NADE_TIMER), '0.25 0.90 1' + ('1 0 0' * STAT(NADE_TIMER)) - ('0 1 1' * STAT(NADE_TIMER)), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
        }
-       else if(getstatf(STAT_REVIVE_PROGRESS))
+       else if(STAT(REVIVE_PROGRESS))
        {
-               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
        }
 
@@ -1136,7 +1136,7 @@ void CSQC_UpdateView(float w, float h)
        if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped
        {
                float vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
-               float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && getstati(STAT_ROUNDLOST));
+               float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && STAT(ROUNDLOST));
                entity gen = world;
 
                if(ons_roundlost)
index 04b5a3f7bf0c7ca7ca8537869afb8804b29239eb..06465187a3d4d28a736b664dc99e4afa051aa44a 100644 (file)
@@ -76,7 +76,7 @@ bool ons_stalemate;
 
 .float teleport_antispam;
 
-.bool ons_roundlost;
+.bool ons_roundlost = _STAT(ROUNDLOST);
 
 // waypoint sprites
 .entity bot_basewaypoint; // generator waypointsprite
@@ -2318,8 +2318,6 @@ void ons_Initialize()
        g_onslaught = true;
        ons_captureshield_force = autocvar_g_onslaught_shield_force;
 
-       addstat(STAT_ROUNDLOST, AS_INT, ons_roundlost);
-
        InitializeEntity(world, ons_DelayedInit, INITPRIO_GAMETYPE);
 }
 
index 60417a9cf4846a39830a09507aab18a9a66d2899..8a4b99c07c0092b8399d12a0edc15656465a078f 100644 (file)
@@ -28,7 +28,7 @@
 float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
 
 #ifdef SVQC
-.int stat_gameplayfix_upvelocityclearsonground;
+.int stat_gameplayfix_upvelocityclearsonground = _STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND);
 
 #define GRAVITY_UNAFFECTED_BY_TICRATE autocvar_sv_gameplayfix_gravityunaffectedbyticrate
 #define UPWARD_VELOCITY_CLEARS_ONGROUND autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag
@@ -36,7 +36,7 @@ float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
 #define TICRATE sys_frametime
 #elif defined(CSQC)
 #define GRAVITY_UNAFFECTED_BY_TICRATE (STAT(MOVEFLAGS) & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
-#define UPWARD_VELOCITY_CLEARS_ONGROUND getstati(STAT_GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND)
+#define UPWARD_VELOCITY_CLEARS_ONGROUND STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND)
 
 #define TICRATE ticrate
 #endif
index ca20d7176cebbddd5dad1f5476a4fe73728c4abf..fbddd037bc140942d562f267f50c152dde95c8d0 100644 (file)
@@ -77,15 +77,13 @@ const vector BUFF_MAX = ('16 16 20');
 #include "../../../gamemodes/all.qh"
 #include "../../../buffs/all.qh"
 
-.float buff_time;
+.float buff_time = _STAT(BUFF_TIME);
 void buffs_DelayedInit();
 
 REGISTER_MUTATOR(buffs, cvar("g_buffs"))
 {
        MUTATOR_ONADD
        {
-               addstat(STAT_BUFF_TIME, AS_FLOAT, buff_time);
-
                InitializeEntity(world, buffs_DelayedInit, INITPRIO_FINDTARGET);
        }
 }
index 00e22af7234a24cf7a915dfb1e02151bf070be50..3ee7e020556627462c5380b4622767bf7981404c 100644 (file)
@@ -13,8 +13,8 @@
 #define PHYS_MULTIJUMP                                 getstati(STAT_MULTIJUMP)
 #define PHYS_MULTIJUMP_SPEED           getstatf(STAT_MULTIJUMP_SPEED)
 #define PHYS_MULTIJUMP_ADD                     getstati(STAT_MULTIJUMP_ADD)
-#define PHYS_MULTIJUMP_MAXSPEED        getstatf(STAT_MULTIJUMP_MAXSPEED)
-#define PHYS_MULTIJUMP_DODGING                 getstati(STAT_MULTIJUMP_DODGING)
+#define PHYS_MULTIJUMP_MAXSPEED        STAT(MULTIJUMP_MAXSPEED)
+#define PHYS_MULTIJUMP_DODGING                 STAT(MULTIJUMP_DODGING)
 
 #elif defined(SVQC)
 
@@ -33,8 +33,8 @@ float autocvar_g_multijump_dodging = 1;
 .float stat_multijump;
 .float stat_multijump_speed;
 .float stat_multijump_add;
-.float stat_multijump_maxspeed;
-.float stat_multijump_dodging;
+.float stat_multijump_maxspeed = _STAT(MULTIJUMP_MAXSPEED);
+.float stat_multijump_dodging = _STAT(MULTIJUMP_DODGING);
 
 void multijump_UpdateStats()
 {SELFPARAM();
@@ -50,8 +50,6 @@ void multijump_AddStats()
        addstat(STAT_MULTIJUMP, AS_INT, stat_multijump);
        addstat(STAT_MULTIJUMP_SPEED, AS_FLOAT, stat_multijump_speed);
        addstat(STAT_MULTIJUMP_ADD, AS_INT, stat_multijump_add);
-       addstat(STAT_MULTIJUMP_MAXSPEED, AS_FLOAT, stat_multijump_maxspeed);
-       addstat(STAT_MULTIJUMP_DODGING, AS_INT, stat_multijump_dodging);
 }
 
 #endif
index cbe41948d722310fca180ce9a443562e14b334b6..835f1dbe82b2b5ae116b476a744dd61fd4eabc5a 100644 (file)
@@ -99,8 +99,6 @@ void Physics_AddStats()
        addstat(STAT_MOVEVARS_STOPSPEED, AS_FLOAT, stat_sv_stopspeed);
        addstat(STAT_MOVEVARS_AIRACCELERATE, AS_FLOAT, stat_sv_airaccelerate);
        addstat(STAT_MOVEVARS_AIRSTOPACCELERATE, AS_FLOAT, stat_sv_airstopaccelerate);
-
-       addstat(STAT_GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND, AS_INT, stat_gameplayfix_upvelocityclearsonground);
 }
 
 void Physics_UpdateStats(float maxspd_mod)
index 344c0f1734f2f17df2ef604b4a1ebf0e3c6463aa..821568411c295026e5410b6cdab126d79ed42703 100644 (file)
@@ -104,21 +104,21 @@ bool IsFlying(entity a);
 
        #define PHYS_DOUBLEJUMP                                         getstati(STAT_DOUBLEJUMP)
 
-       #define PHYS_BUGRIGS                                            getstati(STAT_BUGRIGS)
-       #define PHYS_BUGRIGS_ANGLE_SMOOTHING            getstati(STAT_BUGRIGS_ANGLE_SMOOTHING)
-       #define PHYS_BUGRIGS_PLANAR_MOVEMENT            getstati(STAT_BUGRIGS_PLANAR_MOVEMENT)
-       #define PHYS_BUGRIGS_REVERSE_SPEEDING           getstati(STAT_BUGRIGS_REVERSE_SPEEDING)
-       #define PHYS_BUGRIGS_FRICTION_FLOOR             getstatf(STAT_BUGRIGS_FRICTION_FLOOR)
-       #define PHYS_BUGRIGS_AIR_STEERING                       getstati(STAT_BUGRIGS_AIR_STEERING)
-       #define PHYS_BUGRIGS_FRICTION_BRAKE             getstatf(STAT_BUGRIGS_FRICTION_BRAKE)
-       #define PHYS_BUGRIGS_ACCEL                                      getstatf(STAT_BUGRIGS_ACCEL)
-       #define PHYS_BUGRIGS_SPEED_REF                          getstatf(STAT_BUGRIGS_SPEED_REF)
-       #define PHYS_BUGRIGS_SPEED_POW                          getstatf(STAT_BUGRIGS_SPEED_POW)
-       #define PHYS_BUGRIGS_STEER                                      getstatf(STAT_BUGRIGS_STEER)
-       #define PHYS_BUGRIGS_FRICTION_AIR                       getstatf(STAT_BUGRIGS_FRICTION_AIR)
-       #define PHYS_BUGRIGS_CAR_JUMPING                        getstatf(STAT_BUGRIGS_CAR_JUMPING)
-       #define PHYS_BUGRIGS_REVERSE_SPINNING           getstatf(STAT_BUGRIGS_REVERSE_SPINNING)
-       #define PHYS_BUGRIGS_REVERSE_STOPPING           getstatf(STAT_BUGRIGS_REVERSE_STOPPING)
+       #define PHYS_BUGRIGS                                            STAT(BUGRIGS)
+       #define PHYS_BUGRIGS_ANGLE_SMOOTHING            STAT(BUGRIGS_ANGLE_SMOOTHING)
+       #define PHYS_BUGRIGS_PLANAR_MOVEMENT            STAT(BUGRIGS_PLANAR_MOVEMENT)
+       #define PHYS_BUGRIGS_REVERSE_SPEEDING           STAT(BUGRIGS_REVERSE_SPEEDING)
+       #define PHYS_BUGRIGS_FRICTION_FLOOR             STAT(BUGRIGS_FRICTION_FLOOR)
+       #define PHYS_BUGRIGS_AIR_STEERING                       STAT(BUGRIGS_AIR_STEERING)
+       #define PHYS_BUGRIGS_FRICTION_BRAKE             STAT(BUGRIGS_FRICTION_BRAKE)
+       #define PHYS_BUGRIGS_ACCEL                                      STAT(BUGRIGS_ACCEL)
+       #define PHYS_BUGRIGS_SPEED_REF                          STAT(BUGRIGS_SPEED_REF)
+       #define PHYS_BUGRIGS_SPEED_POW                          STAT(BUGRIGS_SPEED_POW)
+       #define PHYS_BUGRIGS_STEER                                      STAT(BUGRIGS_STEER)
+       #define PHYS_BUGRIGS_FRICTION_AIR                       STAT(BUGRIGS_FRICTION_AIR)
+       #define PHYS_BUGRIGS_CAR_JUMPING                        STAT(BUGRIGS_CAR_JUMPING)
+       #define PHYS_BUGRIGS_REVERSE_SPINNING           STAT(BUGRIGS_REVERSE_SPINNING)
+       #define PHYS_BUGRIGS_REVERSE_STOPPING           STAT(BUGRIGS_REVERSE_STOPPING)
 
        #define PHYS_JUMPSPEEDCAP_MIN                           cvar_string("cl_jumpspeedcap_min")
        #define PHYS_JUMPSPEEDCAP_MAX                           cvar_string("cl_jumpspeedcap_max")
@@ -208,21 +208,21 @@ bool IsFlying(entity a);
        .float stat_gameplayfix_unstickplayers;
        .float stat_gameplayfix_stepdown;
 
-       .float stat_bugrigs;
-       .float stat_bugrigs_angle_smoothing;
-       .float stat_bugrigs_planar_movement;
-       .float stat_bugrigs_reverse_speeding;
-       .float stat_bugrigs_friction_floor;
-       .float stat_bugrigs_air_steering;
-       .float stat_bugrigs_friction_brake;
-       .float stat_bugrigs_accel;
-       .float stat_bugrigs_speed_ref;
-       .float stat_bugrigs_speed_pow;
-       .float stat_bugrigs_steer;
-       .float stat_bugrigs_friction_air;
-       .float stat_bugrigs_car_jumping;
-       .float stat_bugrigs_reverse_spinning;
-       .float stat_bugrigs_reverse_stopping;
+       .float stat_bugrigs = _STAT(BUGRIGS);
+       .float stat_bugrigs_angle_smoothing = _STAT(BUGRIGS_ANGLE_SMOOTHING);
+       .float stat_bugrigs_planar_movement = _STAT(BUGRIGS_PLANAR_MOVEMENT);
+       .float stat_bugrigs_reverse_speeding = _STAT(BUGRIGS_REVERSE_SPEEDING);
+       .float stat_bugrigs_friction_floor = _STAT(BUGRIGS_FRICTION_FLOOR);
+       .float stat_bugrigs_air_steering = _STAT(BUGRIGS_AIR_STEERING);
+       .float stat_bugrigs_friction_brake = _STAT(BUGRIGS_FRICTION_BRAKE);
+       .float stat_bugrigs_accel = _STAT(BUGRIGS_ACCEL);
+       .float stat_bugrigs_speed_ref = _STAT(BUGRIGS_SPEED_REF);
+       .float stat_bugrigs_speed_pow = _STAT(BUGRIGS_SPEED_POW);
+       .float stat_bugrigs_steer = _STAT(BUGRIGS_STEER);
+       .float stat_bugrigs_friction_air = _STAT(BUGRIGS_FRICTION_AIR);
+       .float stat_bugrigs_car_jumping = _STAT(BUGRIGS_CAR_JUMPING);
+       .float stat_bugrigs_reverse_spinning = _STAT(BUGRIGS_REVERSE_SPINNING);
+       .float stat_bugrigs_reverse_stopping = _STAT(BUGRIGS_REVERSE_STOPPING);
 
        // new properties
        .float stat_sv_jumpvelocity;
index afd6bd3c39414996e371a07e299d788a036490ea..4f1d5812a399034eb3323694b82cab5c016d45f4 100644 (file)
@@ -53,7 +53,7 @@ enum {
     STAT_LAST_VECTOR
 };
 
-const int REGISTERED_STATS = 64;
+const int REGISTERED_STATS = 86;
 
 REGISTER_STAT(KH_KEYS, int)
 /** weapon requested to switch to; next WANTED weapon (for HUD) */
@@ -110,32 +110,32 @@ REGISTER_STAT(PLASMA, int)
 REGISTER_STAT(OK_AMMO_CHARGE, float)
 REGISTER_STAT(OK_AMMO_CHARGEPOOL, float)
 REGISTER_STAT(FROZEN, int)
+REGISTER_STAT(REVIVE_PROGRESS, float)
+REGISTER_STAT(ROUNDLOST, int)
+REGISTER_STAT(BUFF_TIME, float)
+REGISTER_STAT(CTF_FLAGSTATUS, int)
+REGISTER_STAT(MULTIJUMP_DODGING, int)
+REGISTER_STAT(MULTIJUMP_MAXSPEED, float)
+REGISTER_STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND, int)
+REGISTER_STAT(BUGRIGS_REVERSE_STOPPING, int)
+REGISTER_STAT(BUGRIGS_REVERSE_SPINNING, int)
+REGISTER_STAT(BUGRIGS_CAR_JUMPING, int)
+REGISTER_STAT(BUGRIGS_FRICTION_AIR, float)
+REGISTER_STAT(BUGRIGS_STEER, float)
+REGISTER_STAT(BUGRIGS_SPEED_POW, float)
+REGISTER_STAT(BUGRIGS_SPEED_REF, float)
+REGISTER_STAT(BUGRIGS_ACCEL, float)
+REGISTER_STAT(BUGRIGS_FRICTION_BRAKE, float)
+REGISTER_STAT(BUGRIGS_AIR_STEERING, int)
+REGISTER_STAT(BUGRIGS_FRICTION_FLOOR, float)
+REGISTER_STAT(BUGRIGS_REVERSE_SPEEDING, int)
+REGISTER_STAT(BUGRIGS_PLANAR_MOVEMENT, int)
+REGISTER_STAT(BUGRIGS_ANGLE_SMOOTHING, int)
+REGISTER_STAT(BUGRIGS, int)
 
 enum {
     STAT_FIRST_MAIN = (STAT_LAST_VECTOR - 1) + REGISTERED_STATS,
 
-    STAT_REVIVE_PROGRESS,
-    STAT_ROUNDLOST,
-    STAT_BUFF_TIME,
-    STAT_CTF_FLAGSTATUS,
-    STAT_MULTIJUMP_DODGING,
-    STAT_MULTIJUMP_MAXSPEED,
-    STAT_GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND,
-    STAT_BUGRIGS_REVERSE_STOPPING,
-    STAT_BUGRIGS_REVERSE_SPINNING,
-    STAT_BUGRIGS_CAR_JUMPING,
-    STAT_BUGRIGS_FRICTION_AIR,
-    STAT_BUGRIGS_STEER,
-    STAT_BUGRIGS_SPEED_POW,
-    STAT_BUGRIGS_SPEED_REF,
-    STAT_BUGRIGS_ACCEL,
-    STAT_BUGRIGS_FRICTION_BRAKE,
-    STAT_BUGRIGS_AIR_STEERING,
-    STAT_BUGRIGS_FRICTION_FLOOR,
-    STAT_BUGRIGS_REVERSE_SPEEDING,
-    STAT_BUGRIGS_PLANAR_MOVEMENT,
-    STAT_BUGRIGS_ANGLE_SMOOTHING,
-    STAT_BUGRIGS,
     STAT_GAMEPLAYFIX_STEPDOWN,
     STAT_MOVEVARS_JUMPSTEP,
     STAT_NOSTEP,
index f6ac5348b23439820e6631a90f3eef03ebe0677f..88a994d8408afe165b155b8a54136cf5f38ecb83 100644 (file)
@@ -514,7 +514,7 @@ const float ACTIVE_TOGGLE   = 3;
 .float weapon_blocked; // weapon use disabled
 
 .float frozen = _STAT(FROZEN); // for freeze attacks
-.float revive_progress;
+.float revive_progress = _STAT(REVIVE_PROGRESS);
 .float revival_time; // time at which player was last revived
 .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
 .entity iceblock;
index 5b5bd90cf48ecffc306eee4c632a21847bd4392c..e0ea152a5d1405f36bccf1cfe454999bc43c971c 100644 (file)
@@ -759,9 +759,6 @@ spawnfunc(worldspawn)
        WepSet_AddStat_InMap();
        Nagger_Init();
 
-       // freeze attacks
-       addstat(STAT_REVIVE_PROGRESS, AS_FLOAT, revive_progress);
-
        // physics
        Physics_AddStats();
 
index d16b1687781fa52df21050715e0c510283348e5c..f0c84257ad0ed06f84b00a2ec692f520fbbe2ab3 100644 (file)
@@ -183,7 +183,7 @@ void havocbot_role_ctf_setrole(entity bot, int role);
 #define CTF_DIFFTEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b))
 
 // networked flag statuses
-.int ctf_flagstatus;
+.int ctf_flagstatus = _STAT(CTF_FLAGSTATUS);
 #endif
 
 const int CTF_RED_FLAG_TAKEN                   = 1;
@@ -2774,8 +2774,6 @@ void ctf_Initialize()
        ctf_captureshield_max_ratio = autocvar_g_ctf_shield_max_ratio;
        ctf_captureshield_force = autocvar_g_ctf_shield_force;
 
-       addstat(STAT_CTF_FLAGSTATUS, AS_INT, ctf_flagstatus);
-
        InitializeEntity(world, ctf_DelayedInit, INITPRIO_GAMETYPE);
 }