]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qh
Port the weapon priority cvars to ClientState
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qh
index 74c8bb174a53356b3db43ef821e9658a09cd2f7d..9674872c0faa42bd6bc0c1a466204a0c166d9b08 100644 (file)
@@ -1,5 +1,8 @@
 #pragma once
 
+#include "utils.qh"
+#include <common/sounds/all.qh>
+
 void ClientState_attach(entity this);
 
 IntrusiveList g_players;
@@ -95,6 +98,51 @@ CLASS(Client, Object)
     ATTRIB(Client, zoomstate, bool, this.zoomstate);
     ATTRIB(Client, just_joined, bool, this.just_joined);
     ATTRIB(Client, race_completed, bool, this.race_completed);
+    ATTRIBARRAY(Client, msg_choice_choices, int, 50); // TODO: actually NOTIF_CHOICE_MAX
+    ATTRIB(Client, latency_sum, float, this.latency_sum);
+    ATTRIB(Client, latency_cnt, int, this.latency_cnt);
+    ATTRIB(Client, latency_time, float, this.latency_time);
+    ATTRIB(Client, v_angle_old, vector, this.v_angle_old);
+    ATTRIB(Client, model_randomizer, float, this.model_randomizer);
+    ATTRIB(Client, accuracy, entity, this.accuracy);
+    ATTRIB(Client, hasweapon_complain_spam, float, this.hasweapon_complain_spam);
+    ATTRIB(Client, scorekeeper, entity, this.scorekeeper);
+    ATTRIB(Client, specialcommand_pos, int, this.specialcommand_pos);
+    ATTRIB(Client, hitplotfh, int, this.hitplotfh);
+    ATTRIB(Client, clientdata, entity, this.clientdata);
+    ATTRIB(Client, cmd_floodcount, int, this.cmd_floodcount);
+    ATTRIB(Client, cmd_floodtime, float, this.cmd_floodtime);
+    ATTRIB(Client, wasplayer, bool, this.wasplayer);
+
+    // networked cvars
+
+    ATTRIB(Client, cvar_cl_allow_uid2name, int, this.cvar_cl_allow_uid2name);
+    ATTRIB(Client, cvar_cl_allow_uidtracking, int, this.cvar_cl_allow_uidtracking);
+    ATTRIB(Client, cvar_cl_autotaunt, float, this.cvar_cl_autotaunt);
+    ATTRIB(Client, cvar_cl_voice_directional, int, this.cvar_cl_voice_directional);
+    ATTRIB(Client, cvar_cl_voice_directional_taunt_attenuation, float, this.cvar_cl_voice_directional_taunt_attenuation);
+    ATTRIB(Client, cvar_cl_physics, string, this.cvar_cl_physics);
+    ATTRIB(Client, cvar_cl_buffs_autoreplace, bool, this.cvar_cl_buffs_autoreplace);
+    ATTRIB(Client, cvar_cl_nade_type, int, this.cvar_cl_nade_type);
+    ATTRIB(Client, cvar_cl_pokenade_type, string, this.cvar_cl_pokenade_type);
+    ATTRIB(Client, cvar_cl_spawn_near_teammate, bool, this.cvar_cl_spawn_near_teammate);
+    ATTRIB(Client, cvar_cl_gunalign, int, this.cvar_cl_gunalign);
+    ATTRIB(Client, cvar_cl_handicap, float, this.cvar_cl_handicap);
+    ATTRIB(Client, cvar_cl_clippedspectating, bool, this.cvar_cl_clippedspectating);
+    ATTRIB(Client, cvar_cl_autoscreenshot, int, this.cvar_cl_autoscreenshot);
+    ATTRIB(Client, cvar_cl_jetpack_jump, bool, this.cvar_cl_jetpack_jump);
+    ATTRIB(Client, cvar_cl_newusekeysupported, bool, this.cvar_cl_newusekeysupported);
+    ATTRIB(Client, cvar_cl_noantilag, bool, this.cvar_cl_noantilag);
+    ATTRIB(Client, cvar_cl_movement_track_canjump, bool, this.cvar_cl_movement_track_canjump);
+    ATTRIB(Client, cvar_cl_weaponimpulsemode, int, this.cvar_cl_weaponimpulsemode);
+    ATTRIB(Client, cvar_g_xonoticversion, string, this.cvar_g_xonoticversion);
+    ATTRIB(Client, autoswitch, bool, this.autoswitch);
+    ATTRIB(Client, cvar_cl_dodging_timeout, float, this.cvar_cl_dodging_timeout);
+    ATTRIB(Client, cvar_cl_multijump, bool, this.cvar_cl_multijump);
+    ATTRIB(Client, cvar_cl_accuracy_data_share, bool, this.cvar_cl_accuracy_data_share);
+    ATTRIB(Client, cvar_cl_accuracy_data_receive, bool, this.cvar_cl_accuracy_data_receive);
+    ATTRIBARRAY(Client, cvar_cl_weaponpriorities, string, 10);
+    ATTRIB(Client, cvar_cl_weaponpriority, string, this.cvar_cl_weaponpriority);
 
     METHOD(Client, m_unwind, bool(Client this));
 
@@ -135,10 +183,15 @@ CLASS(Spectator, Client)
 ENDCLASS(Spectator)
 
 CLASS(Player, Client)
-    
+
     // custom
 
     ATTRIB(Player, dual_weapons, vector, this.dual_weapons); // TODO: actually WepSet!
+    ATTRIB(Player, itemkeys, int, this.itemkeys);
+    ATTRIB(Player, ballistics_density, float, this.ballistics_density);
+    ATTRIB(Player, prevstrengthsound, float, this.prevstrengthsound);
+    ATTRIB(Player, prevstrengthsoundattempt, float, this.prevstrengthsoundattempt);
+    ATTRIB(Player, buff_shield, float, this.buff_shield);
 
     INIT(Player) {
         this.classname = STR_PLAYER;