From 40a875a1a47b9910ea4cf8b723fb8d8b78053d70 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 28 Nov 2015 00:13:42 +1000 Subject: [PATCH] Do another bunch of stats --- qcsrc/client/hud/panel/modicons.qc | 2 +- qcsrc/client/hud/panel/powerups.qc | 2 +- qcsrc/client/view.qc | 8 +-- .../gamemodes/gamemode/onslaught/onslaught.qc | 4 +- qcsrc/common/movetypes/movetypes.qh | 4 +- qcsrc/common/mutators/mutator/buffs/buffs.qc | 4 +- .../mutators/mutator/multijump/multijump.qc | 10 ++-- qcsrc/common/physics.qc | 2 - qcsrc/common/physics.qh | 60 +++++++++---------- qcsrc/common/stats.qh | 46 +++++++------- qcsrc/server/defs.qh | 2 +- qcsrc/server/g_world.qc | 3 - qcsrc/server/mutators/mutator/gamemode_ctf.qc | 4 +- 13 files changed, 69 insertions(+), 82 deletions(-) diff --git a/qcsrc/client/hud/panel/modicons.qc b/qcsrc/client/hud/panel/modicons.qc index 11dd96fb4..9fe8c8bcf 100644 --- a/qcsrc/client/hud/panel/modicons.qc +++ b/qcsrc/client/hud/panel/modicons.qc @@ -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; diff --git a/qcsrc/client/hud/panel/powerups.qc b/qcsrc/client/hud/panel/powerups.qc index 933cb4229..51574a329 100644 --- a/qcsrc/client/hud/panel/powerups.qc +++ b/qcsrc/client/hud/panel/powerups.qc @@ -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) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 6e828d7eb..87adec58b 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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) diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index 04b5a3f7b..06465187a 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -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); } diff --git a/qcsrc/common/movetypes/movetypes.qh b/qcsrc/common/movetypes/movetypes.qh index 60417a9cf..8a4b99c07 100644 --- a/qcsrc/common/movetypes/movetypes.qh +++ b/qcsrc/common/movetypes/movetypes.qh @@ -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 diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index ca20d7176..fbddd037b 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -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); } } diff --git a/qcsrc/common/mutators/mutator/multijump/multijump.qc b/qcsrc/common/mutators/mutator/multijump/multijump.qc index 00e22af72..3ee7e0205 100644 --- a/qcsrc/common/mutators/mutator/multijump/multijump.qc +++ b/qcsrc/common/mutators/mutator/multijump/multijump.qc @@ -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 diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index cbe41948d..835f1dbe8 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -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) diff --git a/qcsrc/common/physics.qh b/qcsrc/common/physics.qh index 344c0f173..821568411 100644 --- a/qcsrc/common/physics.qh +++ b/qcsrc/common/physics.qh @@ -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; diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index afd6bd3c3..4f1d5812a 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -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, diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index f6ac5348b..88a994d84 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 5b5bd90cf..e0ea152a5 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -759,9 +759,6 @@ spawnfunc(worldspawn) WepSet_AddStat_InMap(); Nagger_Init(); - // freeze attacks - addstat(STAT_REVIVE_PROGRESS, AS_FLOAT, revive_progress); - // physics Physics_AddStats(); diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index d16b16877..f0c84257a 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -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); } -- 2.39.2