From: terencehill Date: Wed, 25 Jul 2018 14:13:40 +0000 (+0200) Subject: Fix "bot connected" message displayed after "bot joined X team". Remove INFO_JOIN_CON... X-Git-Tag: xonotic-v0.8.5~1945 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2fe686c435959d46b3a215ea7b73e8609dfe4f08;p=xonotic%2Fxonotic-data.pk3dir.git Fix "bot connected" message displayed after "bot joined X team". Remove INFO_JOIN_CONNECT_TEAM message since clients can no longer become players on connection. Fix missing notification_INFO_JOIN_CONNECT cvar in a checkbox in the menu --- diff --git a/notifications.cfg b/notifications.cfg index feb9b871b..143b5c0e2 100644 --- a/notifications.cfg +++ b/notifications.cfg @@ -235,7 +235,6 @@ seta notification_INFO_ITEM_WEAPON_PRIMORSEC "0" "0 = off, 1 = print to console, seta notification_INFO_ITEM_WEAPON_UNAVAILABLE "0" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_JETPACK_NOFUEL "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_JOIN_CONNECT "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" -seta notification_INFO_JOIN_CONNECT_TEAM "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_JOIN_PLAY "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_JOIN_PLAY_TEAM "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_KEEPAWAY_DROPPED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index a15ef80d1..db0e0503f 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -388,7 +388,6 @@ MSG_INFO_NOTIF(CONNECTING, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^BG is connecting..."), "") MSG_INFO_NOTIF(JOIN_CONNECT, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 connected"), "") - MULTITEAM_INFO(JOIN_CONNECT_TEAM, 4, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 connected and joined the ^TC^TT team"), "", NAME) MSG_INFO_NOTIF(JOIN_PLAY, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing"), "") MULTITEAM_INFO(JOIN_PLAY_TEAM, 4, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing on the ^TC^TT team"), "", NAME) diff --git a/qcsrc/common/state.qc b/qcsrc/common/state.qc index 37813ef71..772dbccbd 100644 --- a/qcsrc/common/state.qc +++ b/qcsrc/common/state.qc @@ -52,8 +52,6 @@ void ClientState_attach(entity this) entcs_attach(this); anticheat_init(this); W_HitPlotOpen(this); - - bot_clientconnect(this); } void bot_clientdisconnect(entity this); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc index 31cc98215..069b22b02 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc @@ -80,7 +80,7 @@ void XonoticGameMessageSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_allow_chatboxprint", _("Display all info messages in the chatbox"), "-")); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_INFO_QUIT_DISCONNECT", _("Display player statuses in the chatbox"), "-")); - makeMulti(e, "notification_INFO_QUIT_KICK_IDLING notification_INFO_JOIN_CONNECT_TEAM"); + makeMulti(e, "notification_INFO_QUIT_KICK_IDLING notification_INFO_JOIN_CONNECT"); me.TR(me); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications"), "-")); diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 39d2e96d9..909e89768 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1263,6 +1263,10 @@ void ClientConnect(entity this) TRANSMUTE(Client, this); CS(this).version_nagtime = time + 10 + random() * 10; + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_JOIN_CONNECT, this.netname); + + bot_clientconnect(this); + // identify the right forced team if (autocvar_g_campaign) { @@ -1311,11 +1315,6 @@ void ClientConnect(entity this) CS(this).just_joined = true; // stop spamming the eventlog with additional lines when the client connects - if(teamplay && IS_PLAYER(this)) - Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_JOIN_CONNECT_TEAM), this.netname); - else - Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_JOIN_CONNECT, this.netname); - stuffcmd(this, clientstuff, "\n"); stuffcmd(this, "cl_particles_reloadeffects\n"); // TODO do we still need this?