REGISTER_NET_TEMP(casings)
-
-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");
float autocvar_cl_casings_ticrate = 0.1;
#endif
+#ifdef GAMEQC
+REPLICATE_FIELD(bool, cvar_cl_casings);
+REPLICATE_FIELD(int, cvar_r_drawviewmodel);
+#endif
+
#ifdef SVQC
int autocvar_g_casings;
REGISTER_NET_TEMP(globalsound)
REGISTER_NET_TEMP(playersound)
+ #ifdef GAMEQC
+ REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt");
+ REPLICATE(cvar_cl_voice_directional, int, "cl_voice_directional");
+ REPLICATE(cvar_cl_voice_directional_taunt_attenuation, float, "cl_voice_directional_taunt_attenuation");
+ #endif
+
#ifdef SVQC
/**
* @param from the source entity, its position is sent
.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(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) \
Buff b = REGISTRY_GET(StatusEffect, i);
return strcat(rgb_to_hexcolor(b.m_color), b.m_name);
}
+
+#ifdef GAMEQC
+REPLICATE(cvar_cl_buffs_autoreplace, bool, "cl_buffs_autoreplace");
+#endif
#ifdef GAMEQC
REPLICATE_FIELD(bool, cvar_cl_buffs_autoreplace);
-REPLICATE(cvar_cl_buffs_autoreplace, bool, "cl_buffs_autoreplace");
#endif
#include "cl_dodging.qh"
+
+REPLICATE(cvar_cl_dodging_timeout, float, "cl_dodging_timeout");
+REPLICATE(cvar_cl_dodging, bool, "cl_dodging");
#pragma once
-float cvar_cl_dodging_timeout;
-REPLICATE(cvar_cl_dodging_timeout, float, "cl_dodging_timeout");
-
-float cvar_cl_dodging;
-REPLICATE(cvar_cl_dodging, float, "cl_dodging");
+REPLICATE_FIELD(float, cvar_cl_dodging_timeout);
+REPLICATE_FIELD(bool, cvar_cl_dodging);
#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");
#pragma once
+
+REPLICATE_FIELD(bool, cvar_cl_dodging);
+REPLICATE_FIELD(float, cvar_cl_dodging_timeout);
#ifdef GAMEQC
+REPLICATE(cvar_cl_multijump, bool, "cl_multijump");
+
#ifdef SVQC
#include <server/antilag.qh>
#endif
#ifdef GAMEQC
REPLICATE_FIELD(int, cvar_cl_multijump);
-REPLICATE(cvar_cl_multijump, bool, "cl_multijump");
#endif
#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)
{
switch (proj)
#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
#include "spawn_near_teammate.qh"
+
+#ifdef GAMEQC
+REPLICATE(cvar_cl_spawn_near_teammate, bool, "cl_spawn_near_teammate");
+#endif
#ifdef GAMEQC
REPLICATE_FIELD(bool, cvar_cl_spawn_near_teammate);
-REPLICATE(cvar_cl_spawn_near_teammate, bool, "cl_spawn_near_teammate");
#endif
#include <common/mapobjects/_mod.qh>
#include <common/viewloc.qh>
+#ifdef GAMEQC
+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");
+#endif
+
#ifdef SVQC
#include <common/mapobjects/defs.qh>
#include <common/mapobjects/trigger/viewloc.qh>
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(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");
+#endif
#define PHYS_PL_MAX(s) STAT(PL_MAX, s)
#define PHYS_PL_MIN(s) STAT(PL_MIN, s)
#include <server/world.qh>
#endif
+
+#ifdef GAMEQC
+REPLICATE(cvar_cl_allow_uid2name, int, "cl_allow_uid2name");
+REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking");
+REPLICATE(cvar_cl_allow_uidtracking, int, "cl_allow_uidtracking");
+#endif
+
+#ifdef SVQC
+REPLICATE_APPLYCHANGE("cl_allow_uidtracking", { PlayerStats_GameReport_AddPlayer(this); });
+#endif
+
#ifdef SVQC
void PlayerStats_Prematch()
{
void PlayerStats_PlayerDetail();
void PlayerStats_PlayerDetail_CheckUpdate();
void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status);
+
+#endif
+
+#ifdef GAMEQC
+
+REPLICATE_FIELD(int, cvar_cl_allow_uid2name);
+REPLICATE_FIELD(bool, cvar_cl_allow_uidranking);
+REPLICATE_FIELD(int, cvar_cl_allow_uidtracking);
+
#endif
#pragma once
#ifdef GAMEQC
-// TODO: merge into REPLICATE
REPLICATE_FIELD(bool, cvar_cl_autoswitch);
-REPLICATE_FIELD(int, cvar_cl_allow_uid2name);
-REPLICATE_FIELD(bool, cvar_cl_allow_uidranking);
-REPLICATE_FIELD(int, cvar_cl_allow_uidtracking);
REPLICATE_FIELD(int, cvar_cl_autoscreenshot);
-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_noantilag);
REPLICATE_FIELD(string, cvar_g_xonoticversion);
-#endif
-
-#ifdef GAMEQC
REPLICATE(cvar_cl_autoswitch, bool, "cl_autoswitch");
-REPLICATE(cvar_cl_allow_uid2name, int, "cl_allow_uid2name");
-REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking");
-REPLICATE(cvar_cl_allow_uidtracking, int, "cl_allow_uidtracking");
-#ifdef SVQC
-REPLICATE_APPLYCHANGE("cl_allow_uidtracking", { PlayerStats_GameReport_AddPlayer(this); });
-#endif
REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot");
-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_noantilag, bool, "cl_noantilag");
REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion");
-
#endif
return o;
}
#endif
+
+#ifdef CSQC
+REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share");
+REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
+#endif
+
+#ifdef GAMEQC
+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(cvar_cl_weaponpriority, string, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
+REPLICATE(cvar_cl_weaponpriorities[0], string, "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[1], string, "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[2], string, "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[3], string, "cl_weaponpriority3", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[4], string, "cl_weaponpriority4", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[5], string, "cl_weaponpriority5", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[6], string, "cl_weaponpriority6", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[7], string, "cl_weaponpriority7", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[8], string, "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
+REPLICATE(cvar_cl_weaponpriorities[9], string, "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
+#endif
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_FIELD(string, cvar_cl_weaponpriority);
+REPLICATE_FIELD(string, cvar_cl_weaponpriorities[10]);
+
#ifdef CSQC
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");
-REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
#endif
#ifdef SVQC
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]);
-REPLICATE(cvar_cl_weaponpriority, string, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
-REPLICATE(cvar_cl_weaponpriorities[0], string, "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[1], string, "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[2], string, "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[3], string, "cl_weaponpriority3", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[4], string, "cl_weaponpriority4", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[5], string, "cl_weaponpriority5", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[6], string, "cl_weaponpriority6", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[7], string, "cl_weaponpriority7", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[8], string, "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[9], string, "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
-
#endif
#include <common/mutators/mutator/waypoints/waypointsprites.qh>
#include <common/net_linked.qh>
#include <common/notifications/all.qh>
+#include <common/playerstats.qh>
#include <common/state.qh>
#include <common/stats.qh>
#include <common/vehicles/sv_vehicles.qh>
{
return !warmup_stage && IS_CLIENT(attacker);
}
+
+REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share");
+REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
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");
-REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
.entity accuracy;
.float accuracy_frags[REGISTRY_MAX(Weapons)];
else
W_SwitchToOtherWeapon(this, weaponentity);
}
+
+// fix switchweapon (needed when spectating is disabled, as PutClientInServer comes too early)
+REPLICATE_APPLYCHANGE("cl_weaponpriority",
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ if (this.(weaponentity) && (this.(weaponentity).m_weapon != WEP_Null || slot == 0))
+ this.(weaponentity).m_switchweapon = w_getbestweapon(this, weaponentity);
+ }
+);
// previously used if exists and has ammo, (second) best otherwise
void W_LastWeapon(entity this, .entity weaponentity);
-
-// fix switchweapon (needed when spectating is disabled, as PutClientInServer comes too early)
-REPLICATE_APPLYCHANGE("cl_weaponpriority",
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- if (this.(weaponentity) && (this.(weaponentity).m_weapon != WEP_Null || slot == 0))
- this.(weaponentity).m_switchweapon = w_getbestweapon(this, weaponentity);
- }
-);