From: terencehill Date: Sat, 8 Jan 2022 21:07:21 +0000 (+0100) Subject: Move setup of some replicated cvars to the common folder X-Git-Tag: xonotic-v0.8.5~204^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d086aff077a6df7d9d43ea559dc31aac9c1e2016;p=xonotic%2Fxonotic-data.pk3dir.git Move setup of some replicated cvars to the common folder --- diff --git a/qcsrc/common/effects/qc/globalsound.qh b/qcsrc/common/effects/qc/globalsound.qh index af98a24d0..91eae388c 100644 --- a/qcsrc/common/effects/qc/globalsound.qh +++ b/qcsrc/common/effects/qc/globalsound.qh @@ -16,6 +16,11 @@ .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; \ diff --git a/qcsrc/common/physics/player.qh b/qcsrc/common/physics/player.qh index 7bfdeb94f..4e2b656d8 100644 --- a/qcsrc/common/physics/player.qh +++ b/qcsrc/common/physics/player.qh @@ -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) diff --git a/qcsrc/common/replicate.qh b/qcsrc/common/replicate.qh index db1054a74..cd10e5a31 100644 --- a/qcsrc/common/replicate.qh +++ b/qcsrc/common/replicate.qh @@ -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 diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 2bbb2afbe..cde5d56b3 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -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]);