From 056eeda9111857e6fc5918d23cf2eee04d2a271b Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 7 Jan 2022 00:57:19 +0100 Subject: [PATCH] Remove unused cvar_cl_newusekeysupported field, sort REPLICATE calls --- qcsrc/common/replicate.qh | 15 +++------------ qcsrc/server/client.qc | 9 +++------ qcsrc/server/client.qh | 1 - 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/qcsrc/common/replicate.qh b/qcsrc/common/replicate.qh index 2c362be79..3ee308914 100644 --- a/qcsrc/common/replicate.qh +++ b/qcsrc/common/replicate.qh @@ -24,10 +24,6 @@ REPLICATE_FIELD(int, cvar_cl_weaponimpulsemode); REPLICATE_FIELD(string, cvar_g_xonoticversion); #endif -#ifdef SVQC -.float cvar_cl_newusekeysupported; -#endif - #ifdef GAMEQC REPLICATE(cvar_cl_autoswitch, bool, "cl_autoswitch"); REPLICATE(cvar_cl_allow_uid2name, int, "cl_allow_uid2name"); @@ -36,6 +32,7 @@ REPLICATE(cvar_cl_allow_uidtracking, int, "cl_allow_uidtracking"); REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot"); REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt"); REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating"); +REPLICATE(cvar_cl_cts_noautoswitch, bool, "cl_cts_noautoswitch"); REPLICATE(cvar_cl_gunalign, int, "cl_gunalign"); REPLICATE(cvar_cl_handicap, float, "cl_handicap"); REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump"); @@ -44,15 +41,9 @@ REPLICATE(cvar_cl_noantilag, bool, "cl_noantilag"); REPLICATE(cvar_cl_physics, string, "cl_physics"); REPLICATE(cvar_cl_voice_directional, int, "cl_voice_directional"); REPLICATE(cvar_cl_voice_directional_taunt_attenuation, float, "cl_voice_directional_taunt_attenuation"); -REPLICATE(cvar_cl_weaponimpulsemode, int, "cl_weaponimpulsemode"); -REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion"); -REPLICATE(cvar_cl_cts_noautoswitch, bool, "cl_cts_noautoswitch"); REPLICATE(cvar_cl_weapon_switch_reload, bool, "cl_weapon_switch_reload"); REPLICATE(cvar_cl_weapon_switch_fallback_to_impulse, bool, "cl_weapon_switch_fallback_to_impulse"); -/* -// cvar cl_newusekeysupported doesn't exist -float cvar_cl_newusekeysupported; -REPLICATE(cvar_cl_newusekeysupported, bool, "cl_newusekeysupported"); -*/ +REPLICATE(cvar_cl_weaponimpulsemode, int, "cl_weaponimpulsemode"); +REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion"); #endif diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index edefc0d28..376182266 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2511,12 +2511,9 @@ void PlayerPreThink (entity this) this.last_vehiclecheck = time + 1; } - if(!CS_CVAR(this).cvar_cl_newusekeysupported) // FIXME remove this - it was a stupid idea to begin with, we can JUST use the button - { - if(PHYS_INPUT_BUTTON_USE(this) && !CS(this).usekeypressed) - PlayerUseKey(this); - CS(this).usekeypressed = PHYS_INPUT_BUTTON_USE(this); - } + if(PHYS_INPUT_BUTTON_USE(this) && !CS(this).usekeypressed) + PlayerUseKey(this); + CS(this).usekeypressed = PHYS_INPUT_BUTTON_USE(this); if (IS_REAL_CLIENT(this)) PrintWelcomeMessage(this); diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index fe0d7a8ff..862bfffbe 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -211,7 +211,6 @@ CLASS(Client, Object) ATTRIB(Client, cvar_cl_clippedspectating, bool, this.cvar_cl_clippedspectating); ATTRIB(Client, cvar_cl_autoscreenshot, int, this.cvar_cl_autoscreenshot); ATTRIB(Client, cvar_cl_jetpack_jump, bool, this.cvar_cl_jetpack_jump); - ATTRIB(Client, cvar_cl_newusekeysupported, bool, this.cvar_cl_newusekeysupported); ATTRIB(Client, cvar_cl_noantilag, bool, this.cvar_cl_noantilag); ATTRIB(Client, cvar_cl_movement_track_canjump, bool, this.cvar_cl_movement_track_canjump); ATTRIB(Client, cvar_cl_weaponimpulsemode, int, this.cvar_cl_weaponimpulsemode); -- 2.39.2