From: Mario Date: Wed, 9 Dec 2020 13:24:52 +0000 (+1000) Subject: Fix notification choices not working properly (they were still attached to the Client... X-Git-Tag: xonotic-v0.8.5~647 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4cba54b5fe18e84b179085166f760686508367b1;p=xonotic%2Fxonotic-data.pk3dir.git Fix notification choices not working properly (they were still attached to the ClientState) --- diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index d6dff6be9..e6fe8df76 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -1606,7 +1606,7 @@ void Send_Notification( #define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN \ if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) { \ - switch (CS(ent).msg_choice_choices[net_name.nent_choice_idx]) \ + switch (CS_CVAR(ent).msg_choice_choices[net_name.nent_choice_idx]) \ { \ case 1: found_choice = notif.nent_optiona; break; \ case 2: found_choice = notif.nent_optionb; break; \ diff --git a/qcsrc/common/replicate.qh b/qcsrc/common/replicate.qh index 304cf389e..06ed9baf6 100644 --- a/qcsrc/common/replicate.qh +++ b/qcsrc/common/replicate.qh @@ -32,7 +32,7 @@ .float cvar_cl_autoscreenshot; .float cvar_cl_jetpack_jump; .float cvar_cl_movement_track_canjump; - //.float cvar_cl_newusekeysupported; + .float cvar_cl_newusekeysupported; .float cvar_cl_cts_noautoswitch; .bool cvar_cl_weapon_switch_reload; .bool cvar_cl_weapon_switch_fallback_to_impulse; diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index efe336d1f..313945de8 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -172,7 +172,6 @@ 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, 20); // 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); @@ -192,6 +191,9 @@ CLASS(Client, Object) // networked cvars +// not currently handled by ClientState +#if 0 + ATTRIBARRAY(Client, msg_choice_choices, int, 20); // TODO: actually NOTIF_CHOICE_MAX 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); @@ -225,6 +227,7 @@ CLASS(Client, Object) ATTRIB(Client, cvar_cl_cts_noautoswitch, bool, this.cvar_cl_cts_noautoswitch); ATTRIB(Client, cvar_cl_weapon_switch_reload, bool, this.cvar_cl_weapon_switch_reload); ATTRIB(Client, cvar_cl_weapon_switch_fallback_to_impulse, bool, this.cvar_cl_weapon_switch_fallback_to_impulse); +#endif METHOD(Client, m_unwind, bool(Client this));