float autocvar_cl_gibs_velocity_scale = 1;
float autocvar_cl_gibs_avelocity_scale = 1;
float autocvar_cl_gibs_velocity_up;
-int autocvar_cl_gunalign;
bool autocvar_cl_hidewaypoints;
bool autocvar_cl_lockview;
bool autocvar_cl_nogibs;
REGISTER_STAT(MOVEVARS_STEPHEIGHT, float, autocvar_sv_stepheight)
REGISTER_STAT(MOVEVARS_AIRACCEL_QW, float)
REGISTER_STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, float)
+
+
+#ifdef CSQC
+noref int autocvar_cl_gunalign;
+#endif
+#ifdef SVQC
+.int cvar_cl_gunalign;
+REPLICATE(cvar_cl_gunalign, int, "cl_gunalign");
+#endif
+REGISTER_STAT(GUNALIGN, int, this.cvar_cl_gunalign)
+#ifdef SVQC
+SPECTATE_COPY(_STAT(GUNALIGN))
+#endif
+
+
#endif
if (this.movedir.x >= 0)
{
-#ifdef SVQC
- int algn = this.owner.cvar_cl_gunalign;
-#else
- int algn = autocvar_cl_gunalign;
-#endif
+ int algn = STAT(GUNALIGN, this.owner);
vector v = this.movedir;
this.movedir = shotorg_adjust(v, false, false, algn);
this.view_ofs = shotorg_adjust(v, false, true, algn) - v;
int W_GetGunAlignment(entity player)
{
-#ifdef SVQC
- int gunalign = player.cvar_cl_gunalign;
-#else
- int gunalign = autocvar_cl_gunalign;
-#endif
+ int gunalign = STAT(GUNALIGN, player);
if(gunalign < 1 || gunalign > 4)
gunalign = 3; // default value
--gunalign;
.string cvar_g_xonoticversion;
.string cvar_cl_weaponpriority;
.string cvar_cl_weaponpriorities[10];
-.float cvar_cl_gunalign;
.float cvar_cl_noantilag;
.string weaponorder_byimpulse;
GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");
- GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
GetCvars_handleFloat(s, f, cvar_cl_allow_uid2name, "cl_allow_uid2name");
GetCvars_handleFloat(s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
GetCvars_handleFloat(s, f, cvar_cl_movement_track_canjump, "cl_movement_track_canjump");