From: terencehill Date: Thu, 10 Feb 2022 01:20:39 +0000 (+0100) Subject: REPLICATE_FIELD -> REPLICATE_INIT X-Git-Tag: xonotic-v0.8.5~204^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bede79a875c769e58cf4cdc7788e1619c0ad0fe1;p=xonotic%2Fxonotic-data.pk3dir.git REPLICATE_FIELD -> REPLICATE_INIT --- diff --git a/qcsrc/common/effects/qc/casings.qh b/qcsrc/common/effects/qc/casings.qh index f43e15a1c..f4884cb23 100644 --- a/qcsrc/common/effects/qc/casings.qh +++ b/qcsrc/common/effects/qc/casings.qh @@ -9,8 +9,8 @@ float autocvar_cl_casings_ticrate = 0.1; #endif #ifdef GAMEQC -REPLICATE_FIELD(bool, cvar_cl_casings); -REPLICATE_FIELD(int, cvar_r_drawviewmodel); +REPLICATE_INIT(bool, cvar_cl_casings); +REPLICATE_INIT(int, cvar_r_drawviewmodel); #endif #ifdef SVQC diff --git a/qcsrc/common/effects/qc/globalsound.qh b/qcsrc/common/effects/qc/globalsound.qh index d9a7eac30..e24496162 100644 --- a/qcsrc/common/effects/qc/globalsound.qh +++ b/qcsrc/common/effects/qc/globalsound.qh @@ -16,9 +16,9 @@ .string m_playersoundstr; ..string m_playersoundfld; -REPLICATE_FIELD(float, cvar_cl_autotaunt); -REPLICATE_FIELD(int, cvar_cl_voice_directional); -REPLICATE_FIELD(float, cvar_cl_voice_directional_taunt_attenuation); +REPLICATE_INIT(float, cvar_cl_autotaunt); +REPLICATE_INIT(int, cvar_cl_voice_directional); +REPLICATE_INIT(float, cvar_cl_voice_directional_taunt_attenuation); REGISTRY(PlayerSounds, BITS(8) - 1) #define REGISTER_PLAYERSOUND(id) \ diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qh b/qcsrc/common/mutators/mutator/buffs/buffs.qh index b5cd426be..163176d5b 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qh +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qh @@ -74,5 +74,5 @@ BUFF_SPAWNFUNCS(random, NULL) #include "all.inc" #ifdef GAMEQC -REPLICATE_FIELD(bool, cvar_cl_buffs_autoreplace); +REPLICATE_INIT(bool, cvar_cl_buffs_autoreplace); #endif diff --git a/qcsrc/common/mutators/mutator/dodging/cl_dodging.qh b/qcsrc/common/mutators/mutator/dodging/cl_dodging.qh index d7c5a5262..319a1d237 100644 --- a/qcsrc/common/mutators/mutator/dodging/cl_dodging.qh +++ b/qcsrc/common/mutators/mutator/dodging/cl_dodging.qh @@ -1,4 +1,4 @@ #pragma once -REPLICATE_FIELD(float, cvar_cl_dodging_timeout); -REPLICATE_FIELD(bool, cvar_cl_dodging); +REPLICATE_INIT(float, cvar_cl_dodging_timeout); +REPLICATE_INIT(bool, cvar_cl_dodging); diff --git a/qcsrc/common/mutators/mutator/dodging/sv_dodging.qh b/qcsrc/common/mutators/mutator/dodging/sv_dodging.qh index e04c2ffbc..45dc67b57 100644 --- a/qcsrc/common/mutators/mutator/dodging/sv_dodging.qh +++ b/qcsrc/common/mutators/mutator/dodging/sv_dodging.qh @@ -1,4 +1,4 @@ #pragma once -REPLICATE_FIELD(bool, cvar_cl_dodging); -REPLICATE_FIELD(float, cvar_cl_dodging_timeout); +REPLICATE_INIT(bool, cvar_cl_dodging); +REPLICATE_INIT(float, cvar_cl_dodging_timeout); diff --git a/qcsrc/common/mutators/mutator/multijump/multijump.qh b/qcsrc/common/mutators/mutator/multijump/multijump.qh index 8073b5583..85cdfb5a5 100644 --- a/qcsrc/common/mutators/mutator/multijump/multijump.qh +++ b/qcsrc/common/mutators/mutator/multijump/multijump.qh @@ -1,5 +1,5 @@ #pragma once #ifdef GAMEQC -REPLICATE_FIELD(int, cvar_cl_multijump); +REPLICATE_INIT(int, cvar_cl_multijump); #endif diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index 957824a77..460c21571 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -130,8 +130,8 @@ Nade Nade_FromProjectile(int proj) .float orb_radius; #ifdef GAMEQC -REPLICATE_FIELD(int, cvar_cl_nade_type); -REPLICATE_FIELD(string, cvar_cl_pokenade_type); +REPLICATE_INIT(int, cvar_cl_nade_type); +REPLICATE_INIT(string, cvar_cl_pokenade_type); #endif #ifdef SVQC diff --git a/qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qh b/qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qh index 881df9ed2..be3a73637 100644 --- a/qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qh +++ b/qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qh @@ -1,5 +1,5 @@ #pragma once #ifdef GAMEQC -REPLICATE_FIELD(bool, cvar_cl_spawn_near_teammate); +REPLICATE_INIT(bool, cvar_cl_spawn_near_teammate); #endif diff --git a/qcsrc/common/physics/player.qh b/qcsrc/common/physics/player.qh index 034393f29..0a5b049f5 100644 --- a/qcsrc/common/physics/player.qh +++ b/qcsrc/common/physics/player.qh @@ -72,9 +72,9 @@ float AdjustAirAccelQW(float accelqw, float factor); bool IsFlying(entity a); #ifdef GAMEQC -REPLICATE_FIELD(string, cvar_cl_physics); -REPLICATE_FIELD(bool, cvar_cl_jetpack_jump); -REPLICATE_FIELD(bool, cvar_cl_movement_track_canjump); +REPLICATE_INIT(string, cvar_cl_physics); +REPLICATE_INIT(bool, cvar_cl_jetpack_jump); +REPLICATE_INIT(bool, cvar_cl_movement_track_canjump); #endif #define PHYS_PL_MAX(s) STAT(PL_MAX, s) diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index 4383ee3eb..d5664d9d6 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -122,8 +122,8 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status); #ifdef GAMEQC -REPLICATE_FIELD(int, cvar_cl_allow_uid2name); -REPLICATE_FIELD(bool, cvar_cl_allow_uidranking); -REPLICATE_FIELD(int, cvar_cl_allow_uidtracking); +REPLICATE_INIT(int, cvar_cl_allow_uid2name); +REPLICATE_INIT(bool, cvar_cl_allow_uidranking); +REPLICATE_INIT(int, cvar_cl_allow_uidtracking); #endif diff --git a/qcsrc/common/replicate.qh b/qcsrc/common/replicate.qh index 65ceecf1f..6115223b4 100644 --- a/qcsrc/common/replicate.qh +++ b/qcsrc/common/replicate.qh @@ -1,13 +1,13 @@ #pragma once #ifdef GAMEQC -REPLICATE_FIELD(bool, cvar_cl_autoswitch); -REPLICATE_FIELD(int, cvar_cl_autoscreenshot); -REPLICATE_FIELD(bool, cvar_cl_clippedspectating); -REPLICATE_FIELD(bool, cvar_cl_cts_noautoswitch); -REPLICATE_FIELD(float, cvar_cl_handicap); -REPLICATE_FIELD(bool, cvar_cl_noantilag); -REPLICATE_FIELD(string, cvar_g_xonoticversion); +REPLICATE_INIT(bool, cvar_cl_autoswitch); +REPLICATE_INIT(int, cvar_cl_autoscreenshot); +REPLICATE_INIT(bool, cvar_cl_clippedspectating); +REPLICATE_INIT(bool, cvar_cl_cts_noautoswitch); +REPLICATE_INIT(float, cvar_cl_handicap); +REPLICATE_INIT(bool, cvar_cl_noantilag); +REPLICATE_INIT(string, cvar_g_xonoticversion); REPLICATE(cvar_cl_autoswitch, bool, "cl_autoswitch"); REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot"); REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating"); diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 08d185e31..682468043 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -394,17 +394,17 @@ ENUMCLASS_END(WFRAME) vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn); void CL_WeaponEntity_SetModel(entity this, string name, bool _anim); -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_INIT(int, cvar_cl_gunalign); +REPLICATE_INIT(bool, cvar_cl_weapon_switch_reload); +REPLICATE_INIT(bool, cvar_cl_weapon_switch_fallback_to_impulse); +REPLICATE_INIT(int, cvar_cl_weaponimpulsemode); -REPLICATE_FIELD(string, cvar_cl_weaponpriority); -REPLICATE_FIELD(string, cvar_cl_weaponpriorities[10]); +REPLICATE_INIT(string, cvar_cl_weaponpriority); +REPLICATE_INIT(string, cvar_cl_weaponpriorities[10]); #ifdef CSQC -REPLICATE_FIELD(bool, cvar_cl_accuracy_data_share); -REPLICATE_FIELD(bool, cvar_cl_accuracy_data_receive); +REPLICATE_INIT(bool, cvar_cl_accuracy_data_share); +REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive); #endif #ifdef SVQC diff --git a/qcsrc/lib/replicate.qh b/qcsrc/lib/replicate.qh index 2083b4166..a7a8d10df 100644 --- a/qcsrc/lib/replicate.qh +++ b/qcsrc/lib/replicate.qh @@ -9,9 +9,9 @@ string strcat1(string s) = #115; // FRIK_FILE const int REPLICATEVARS_SEND_ALL = -1; // sync all cvars with the server (init) const int REPLICATEVARS_CHECK = 0; // check if any cvar has changed and sync it with the server const int REPLICATEVARS_DESTROY = 1; // destroy data associated with cvars (shutdown) -#define REPLICATE_FIELD(type, name) type name +#define REPLICATE_INIT(type, name) type name #elif defined(SVQC) -#define REPLICATE_FIELD(type, name) .type name +#define REPLICATE_INIT(type, name) .type name #endif #ifdef GAMEQC diff --git a/qcsrc/server/weapons/accuracy.qh b/qcsrc/server/weapons/accuracy.qh index a7fb3e11e..d5d9f97d9 100644 --- a/qcsrc/server/weapons/accuracy.qh +++ b/qcsrc/server/weapons/accuracy.qh @@ -20,8 +20,8 @@ float autocvar_sv_accuracy_data_share = 1; -REPLICATE_FIELD(bool, cvar_cl_accuracy_data_share); -REPLICATE_FIELD(bool, cvar_cl_accuracy_data_receive); +REPLICATE_INIT(bool, cvar_cl_accuracy_data_share); +REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive); .entity accuracy; .float accuracy_frags[REGISTRY_MAX(Weapons)];