REGISTER_NET_TEMP(casings)
-#if defined(SVQC)
-.bool cvar_cl_casings;
-.int cvar_r_drawviewmodel;
-#elif defined(CSQC)
-bool cvar_cl_casings;
-int cvar_r_drawviewmodel;
-#endif
+
+REPLICATE_FIELD(bool, cvar_cl_casings);
+REPLICATE_FIELD(int, cvar_r_drawviewmodel);
REPLICATE(cvar_cl_casings, bool, "cl_casings");
REPLICATE(cvar_r_drawviewmodel, int, "r_drawviewmodel");
BUFF_SPAWNFUNCS(random, NULL)
#include "all.inc"
+
+#ifdef GAMEQC
+REPLICATE_FIELD(bool, cvar_cl_buffs_autoreplace);
+REPLICATE(cvar_cl_buffs_autoreplace, bool, "cl_buffs_autoreplace");
+#endif
#pragma once
#include "buffs.qh"
-
-float cvar_cl_buffs_autoreplace;
-REPLICATE(cvar_cl_buffs_autoreplace, bool, "cl_buffs_autoreplace");
}
}
-REPLICATE(cvar_cl_buffs_autoreplace, bool, "cl_buffs_autoreplace");
-
MUTATOR_HOOKFUNCTION(buffs, BuildMutatorsString)
{
if(autocvar_g_buffs > 0) // only report as a mutator if they're enabled
const vector BUFF_MIN = ('-16 -16 0');
const vector BUFF_MAX = ('16 16 60');
-// client side options
-.float cvar_cl_buffs_autoreplace;
-
float buff_Available(entity buff);
void buff_RemoveAll(entity actor, int removal_type);
#endif
#ifdef CSQC
- float cvar_cl_dodging_timeout;
- bool cvar_cl_dodging;
bool autocvar_cl_dodging;
#define PHYS_DODGING_FRAMETIME (1 / (frametime <= 0 ? 60 : frametime))
#define PHYS_DODGING_TIMEOUT(s) STAT(DODGING_TIMEOUT)
#define PHYS_DODGING_PRESSED_KEYS(s) (s).pressedkeys
#define PHYS_DODGING_ENABLED(s) autocvar_cl_dodging
#elif defined(SVQC)
- .float cvar_cl_dodging_timeout;
- .bool cvar_cl_dodging;
#define PHYS_DODGING_FRAMETIME sys_frametime
#define PHYS_DODGING_TIMEOUT(s) CS_CVAR(s).cvar_cl_dodging_timeout
#define PHYS_DODGING_PRESSED_KEYS(s) CS(s).pressedkeys
#define PHYS_DODGING_ENABLED(s) CS_CVAR(s).cvar_cl_dodging
#endif
+REPLICATE_FIELD(bool, cvar_cl_dodging);
+REPLICATE_FIELD(float, cvar_cl_dodging_timeout);
+REPLICATE(cvar_cl_dodging_timeout, float, "cl_dodging_timeout");
+REPLICATE(cvar_cl_dodging, bool, "cl_dodging");
+
#ifdef SVQC
bool autocvar_sv_dodging_sound;
#ifdef SVQC
-REPLICATE(cvar_cl_dodging_timeout, float, "cl_dodging_timeout");
-REPLICATE(cvar_cl_dodging, bool, "cl_dodging");
-
void dodging_ResetPlayer(entity this)
{
this.last_dodging_time = 0;
.bool multijump_ready;
#ifdef CSQC
-int cvar_cl_multijump;
int autocvar_cl_multijump = -1;
-
#define PHYS_MULTIJUMP_CLIENT(s) autocvar_cl_multijump
#elif defined(SVQC)
-.int cvar_cl_multijump;
-
#define PHYS_MULTIJUMP_CLIENT(s) CS_CVAR(s).cvar_cl_multijump
#endif
}
}
-REPLICATE(cvar_cl_multijump, int, "cl_multijump");
-
#ifdef SVQC
MUTATOR_HOOKFUNCTION(multijump, BuildMutatorsString)
#pragma once
+
+#ifdef GAMEQC
+REPLICATE_FIELD(int, cvar_cl_multijump);
+REPLICATE(cvar_cl_multijump, bool, "cl_multijump");
+#endif
REGISTER_STAT(NADES_SMALL, int, autocvar_g_nades_nade_small)
#ifdef GAMEQC
-REPLICATE(cvar_cl_nade_type, int, "cl_nade_type");
-REPLICATE(cvar_cl_pokenade_type, string, "cl_pokenade_type");
entity Nade_TrailEffect(int proj, int nade_team)
{
.float orb_lifetime;
.float orb_radius;
+#ifdef GAMEQC
+REPLICATE_FIELD(int, cvar_cl_nade_type);
+REPLICATE_FIELD(string, cvar_cl_pokenade_type);
+REPLICATE(cvar_cl_nade_type, int, "cl_nade_type");
+REPLICATE(cvar_cl_pokenade_type, string, "cl_pokenade_type");
+#endif
+
#ifdef SVQC
.entity nade;
.float nade_special_time;
.string pokenade_type;
.entity nade_damage_target;
-.float cvar_cl_nade_type;
-.string cvar_cl_pokenade_type;
.float toss_time;
.float nade_show_particles;
.float nade_veil_prevalpha;
#endif
#ifdef CSQC
-float cvar_cl_nade_type;
-string cvar_cl_pokenade_type;
bool Projectile_isnade(int proj); // TODO: remove
void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator
#pragma once
-
-float cvar_cl_spawn_near_teammate;
-REPLICATE(cvar_cl_spawn_near_teammate, bool, "cl_spawn_near_teammate");
#pragma once
+#ifdef GAMEQC
+REPLICATE_FIELD(bool, cvar_cl_spawn_near_teammate);
+REPLICATE(cvar_cl_spawn_near_teammate, bool, "cl_spawn_near_teammate");
+#endif
.float msnt_timer;
-.float cvar_cl_spawn_near_teammate;
-
MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
{
if (!teamplay) return;
*/
}
}
-
-REPLICATE(cvar_cl_spawn_near_teammate, bool, "cl_spawn_near_teammate");
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
#ifdef CSQC
-bool cvar_cl_accuracy_data_share;
+REPLICATE_FIELD(bool, cvar_cl_accuracy_data_share);
+REPLICATE_FIELD(bool, cvar_cl_accuracy_data_receive);
REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share");
-bool cvar_cl_accuracy_data_receive;
REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
#endif
float autocvar_sv_accuracy_data_share = 1;
-.bool cvar_cl_accuracy_data_share;
+REPLICATE_FIELD(bool, cvar_cl_accuracy_data_share);
+REPLICATE_FIELD(bool, cvar_cl_accuracy_data_receive);
REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share");
-.bool cvar_cl_accuracy_data_receive;
REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
.entity accuracy;