]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move setup of some replicated cvars to the common folder
authorterencehill <piuntn@gmail.com>
Sat, 8 Jan 2022 21:07:21 +0000 (22:07 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 8 Jan 2022 21:18:34 +0000 (22:18 +0100)
qcsrc/common/effects/qc/globalsound.qh
qcsrc/common/physics/player.qh
qcsrc/common/replicate.qh
qcsrc/common/weapons/all.qh

index af98a24d025e7e4668c5f1a33f5eb3520fbb95c3..91eae388c49d3d1e0e577dbc900ebae9d22a210f 100644 (file)
 .string m_playersoundstr;
 ..string m_playersoundfld;
 
+REPLICATE_FIELD(int, cvar_cl_voice_directional);
+REPLICATE_FIELD(float, cvar_cl_voice_directional_taunt_attenuation);
+REPLICATE(cvar_cl_voice_directional, int, "cl_voice_directional");
+REPLICATE(cvar_cl_voice_directional_taunt_attenuation, float, "cl_voice_directional_taunt_attenuation");
+
 REGISTRY(PlayerSounds, BITS(8) - 1)
 #define REGISTER_PLAYERSOUND(id) \
        .string _playersound_##id; \
index 7bfdeb94f209e32b45fe32fa8bd25d16f55cef57..4e2b656d812a484f83e9dac82591064b833c690c 100644 (file)
@@ -71,6 +71,13 @@ float AdjustAirAccelQW(float accelqw, float factor);
 
 bool IsFlying(entity a);
 
+REPLICATE_FIELD(string, cvar_cl_physics);
+REPLICATE_FIELD(bool, cvar_cl_jetpack_jump);
+REPLICATE_FIELD(bool, cvar_cl_movement_track_canjump);
+REPLICATE(cvar_cl_physics, string, "cl_physics");
+REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump");
+REPLICATE(cvar_cl_movement_track_canjump, bool, "cl_movement_track_canjump");
+
 #define PHYS_PL_MAX(s)                                         STAT(PL_MAX, s)
 #define PHYS_PL_MIN(s)                                         STAT(PL_MIN, s)
 #define PHYS_PL_CROUCH_MAX(s)                          STAT(PL_CROUCH_MAX, s)
index db1054a743e84c50dbe6147f0b34db33cd39afca..cd10e5a31865b9fd608a3eff91569ceebebd44aa 100644 (file)
@@ -11,15 +11,7 @@ REPLICATE_FIELD(float, cvar_cl_autotaunt);
 REPLICATE_FIELD(bool, cvar_cl_clippedspectating);
 REPLICATE_FIELD(bool, cvar_cl_cts_noautoswitch);
 REPLICATE_FIELD(float, cvar_cl_handicap);
-REPLICATE_FIELD(bool, cvar_cl_jetpack_jump);
-REPLICATE_FIELD(bool, cvar_cl_movement_track_canjump);
 REPLICATE_FIELD(bool, cvar_cl_noantilag);
-REPLICATE_FIELD(string, cvar_cl_physics);
-REPLICATE_FIELD(int, cvar_cl_voice_directional);
-REPLICATE_FIELD(float, cvar_cl_voice_directional_taunt_attenuation);
-REPLICATE_FIELD(bool, cvar_cl_weapon_switch_reload);
-REPLICATE_FIELD(bool, cvar_cl_weapon_switch_fallback_to_impulse);
-REPLICATE_FIELD(int, cvar_cl_weaponimpulsemode);
 REPLICATE_FIELD(string, cvar_g_xonoticversion);
 #endif
 
@@ -36,15 +28,7 @@ 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_handicap, float, "cl_handicap");
-REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump");
-REPLICATE(cvar_cl_movement_track_canjump, bool, "cl_movement_track_canjump");
 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_weapon_switch_reload, bool, "cl_weapon_switch_reload");
-REPLICATE(cvar_cl_weapon_switch_fallback_to_impulse, bool, "cl_weapon_switch_fallback_to_impulse");
-REPLICATE(cvar_cl_weaponimpulsemode, int, "cl_weaponimpulsemode");
 REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion");
 
 #endif
index 2bbb2afbec9c8696511f5dd0072c076a7ccbb173..cde5d56b3739f4b66efb88e123cac99d5a69d01e 100644 (file)
@@ -411,7 +411,13 @@ string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
 #endif
 
 REPLICATE_FIELD(int, cvar_cl_gunalign);
+REPLICATE_FIELD(bool, cvar_cl_weapon_switch_reload);
+REPLICATE_FIELD(bool, cvar_cl_weapon_switch_fallback_to_impulse);
+REPLICATE_FIELD(int, cvar_cl_weaponimpulsemode);
 REPLICATE(cvar_cl_gunalign, int, "cl_gunalign");
+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");
+REPLICATE(cvar_cl_weaponimpulsemode, int, "cl_weaponimpulsemode");
 
 REPLICATE_FIELD(string, cvar_cl_weaponpriority);
 REPLICATE_FIELD(string, cvar_cl_weaponpriorities[10]);