From: Mario Date: Thu, 29 Aug 2019 05:44:29 +0000 (+1000) Subject: Merge branch 'master' into terencehill/less_fields X-Git-Tag: xonotic-v0.8.5~1353^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F659%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into terencehill/less_fields # Conflicts: # qcsrc/common/notifications/all.qh --- cbb0a16ac5554caedc4af3d81ff857c40eb9bdb9 diff --cc qcsrc/common/notifications/all.qh index 60b3874de,6eabc9834..ee39b1881 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@@ -822,20 -821,18 +822,20 @@@ Notification Get_Notif_Ent(MSG net_type centername); /* centername */ \ } - #define MSG_CHOICE_NOTIF_TEAM(teamnum, name, cvarname, default, challow, chtype, optiona, optionb) \ - MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, default, challow, chtype, optiona, optionb) + #define MSG_CHOICE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, challow, chtype, optiona, optionb) \ + MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, defaultvalue, challow, chtype, optiona, optionb) - #define MSG_CHOICE_NOTIF(name, default, challow, chtype, optiona, optionb) \ - NOTIF_ADD_AUTOCVAR(CHOICE_##name, default) \ + #define MSG_CHOICE_NOTIF(name, defaultvalue, challow, chtype, optiona, optionb) \ + NOTIF_ADD_AUTOCVAR(CHOICE_##name, defaultvalue) \ NOTIF_ADD_AUTOCVAR(CHOICE_##name##_ALLOWED, challow) \ - MSG_CHOICE_NOTIF_(0, CHOICE_##name, CHOICE_##name, default, challow, chtype, optiona, optionb) + MSG_CHOICE_NOTIF_(0, CHOICE_##name, CHOICE_##name, defaultvalue, challow, chtype, optiona, optionb) - #define MSG_CHOICE_NOTIF_(teamnum, name, cvarname, default, challow, chtype, optiona, optionb) \ + #define MSG_CHOICE_NOTIF_(teamnum, name, cvarname, defaultvalue, challow, chtype, optiona, optionb) \ REGISTER(Notifications, name, m_id, new_pure(msg_choice_notification)) { \ - this.nent_choice_idx = nent_choice_count++; \ + this.nent_choice_idx = nent_choice_count; \ + if (!teamnum || teamnum == NUM_TEAM_4) \ + nent_choice_count++; \ - Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_CHOICE, strtoupper(#name), teamnum); \ + Create_Notification_Entity (this, defaultvalue, ACVNN(cvarname), MSG_CHOICE, strtoupper(#name), teamnum); \ Create_Notification_Entity_Choice(this, ACVNN(cvarname), strtoupper(#name), \ challow, /* challow_def */ \ autocvar_notification_##cvarname##_ALLOWED, /* challow_var */ \