From: terencehill Date: Fri, 30 Aug 2019 23:12:46 +0000 (+0200) Subject: Fix #2283 "cl_gunalign fails, weapon always right" X-Git-Tag: xonotic-v0.8.5~1340 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6d4cf410ddf50f5699b510d4dc8f23101e2b1be2;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2283 "cl_gunalign fails, weapon always right" --- diff --git a/qcsrc/client/defs.qh b/qcsrc/client/defs.qh index 7d111f174..5ce4c3e60 100644 --- a/qcsrc/client/defs.qh +++ b/qcsrc/client/defs.qh @@ -115,6 +115,7 @@ bool cvar_cl_allow_uidranking; float cvar_cl_autoscreenshot; float cvar_cl_autotaunt; float cvar_cl_clippedspectating; +int cvar_cl_gunalign; float cvar_cl_handicap; float cvar_cl_jetpack_jump; float cvar_cl_movement_track_canjump; @@ -134,6 +135,7 @@ REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking"); REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot"); REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt"); REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating"); +REPLICATE(cvar_cl_gunalign, int, "cl_gunalign"); REPLICATE(cvar_cl_handicap, float, "cl_handicap"); REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump"); REPLICATE(cvar_cl_movement_track_canjump, bool, "cl_movement_track_canjump"); @@ -147,11 +149,6 @@ 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"); /* -// this is also a STAT -// pointless sending this cvars since server can't change gun alignment during the match -int cvar_cl_gunalign; -REPLICATE(cvar_cl_gunalign, int, "cl_gunalign"); - // cvar cl_newusekeysupported doesn't exist float cvar_cl_newusekeysupported; REPLICATE(cvar_cl_newusekeysupported, bool, "cl_newusekeysupported"); diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 9fc79cdc9..a27e99b62 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -374,14 +374,6 @@ int autocvar_sv_wallclip; #endif REGISTER_STAT(MOVEVARS_WALLCLIP, int, autocvar_sv_wallclip) - -#ifdef CSQC -noref int autocvar_cl_gunalign; -#endif -#ifdef SVQC -.int cvar_cl_gunalign; -#endif - REGISTER_STAT(GUNALIGN, int) #ifdef SVQC SPECTATE_COPYFIELD(_STAT(GUNALIGN)) diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 566d57b57..2c95f7a4b 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -163,6 +163,7 @@ float default_player_alpha; float default_weapon_alpha; .float cvar_cl_handicap; +.int cvar_cl_gunalign; .float cvar_cl_clippedspectating; .float cvar_cl_autoscreenshot; .float cvar_cl_jetpack_jump; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c68d1a679..4cc848b67 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -400,6 +400,8 @@ REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating"); REPLICATE(cvar_cl_handicap, float, "cl_handicap"); +REPLICATE(cvar_cl_gunalign, int, "cl_gunalign"); + REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump"); REPLICATE(cvar_cl_movement_track_canjump, bool, "cl_movement_track_canjump");