]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix notification choices not working properly (they were still attached to the Client...
authorMario <zacjardine@y7mail.com>
Wed, 9 Dec 2020 13:24:52 +0000 (23:24 +1000)
committerMario <zacjardine@y7mail.com>
Wed, 9 Dec 2020 13:24:52 +0000 (23:24 +1000)
qcsrc/common/notifications/all.qc
qcsrc/common/replicate.qh
qcsrc/server/client.qh

index d6dff6be9a9c6aa67495dd10082e1d61ee39a63c..e6fe8df76eb3d96028d0f7e292f5efcb40ae6b9b 100644 (file)
@@ -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; \
index 304cf389e739b8412b226740dca5c4940ced2533..06ed9baf6b18fe00b728bdbf5e3d20f7374d5bce 100644 (file)
@@ -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;
index efe336d1f6913d81102492b484daf51601c2908e..313945de81e91d3ae3f6d93e6b5d370ba76591a6 100644 (file)
@@ -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));