From: Mario Date: Tue, 18 Jul 2017 13:00:05 +0000 (+1000) Subject: Merge branch 'master' into Mario/cs_clientcvars X-Git-Tag: xonotic-v0.8.5~2532^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=926ed1b0236982412cf330acad1298e0581e4e6e;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into Mario/cs_clientcvars # Conflicts: # qcsrc/common/state.qc # qcsrc/server/client.qh --- 926ed1b0236982412cf330acad1298e0581e4e6e diff --cc qcsrc/common/state.qc index 730b1faf8,d3fd1d3bf..3bd6c60ae --- a/qcsrc/common/state.qc +++ b/qcsrc/common/state.qc @@@ -69,7 -69,10 +69,11 @@@ void PlayerScore_Detach(entity this) void ClientState_detach(entity this) { + GetCvars(this, -1); // free cvars TODO: is this still needed now that it's stored on the clientstate entity? + accuracy_free(this); // TODO: needs to be before CS() is deleted! + PlayerScore_Detach(this); // what ^they^ said + W_HitPlotClose(this); + ClientData_Detach(this); delete(CS(this)); this._cs = NULL; diff --cc qcsrc/server/client.qh index b4c8afa82,e23c69bae..51dcb8614 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@@ -101,36 -101,12 +101,42 @@@ CLASS(Client, Object 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); + + // 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); METHOD(Client, m_unwind, bool(Client this)); diff --cc qcsrc/server/weapons/accuracy.qc index 169d24e36,bee961bc0..05a46f196 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@@ -20,10 -20,10 +20,10 @@@ bool accuracy_send(entity this, entity entity a = this.owner; if (IS_SPEC(a)) a = a.enemy; - a = a.accuracy; + a = CS(a).accuracy; if (to != a.owner) - if (!autocvar_sv_accuracy_data_share && !a.owner.cvar_cl_accuracy_data_share) + if (!autocvar_sv_accuracy_data_share && !CS(a.owner).cvar_cl_accuracy_data_share) sf = 0; // note: zero sendflags can never be sent... so we can use that to say that we send no accuracy! WriteInt24_t(MSG_ENTITY, sf);