From: Mario Date: Sun, 17 Jan 2016 08:13:35 +0000 (+1000) Subject: Add a new notification for joining a specific team, also fix the unnecessary "connect... X-Git-Tag: xonotic-v0.8.2~1224 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6c2a06243103ad575d9b202dbbf4fb68def1234e;p=xonotic%2Fxonotic-data.pk3dir.git Add a new notification for joining a specific team, also fix the unnecessary "connected and joined the X team" message when client is still spectating --- diff --git a/notifications.cfg b/notifications.cfg index fed20f653..513263b71 100644 --- a/notifications.cfg +++ b/notifications.cfg @@ -102,7 +102,7 @@ seta notification_ANNCE_VOTE_ACCEPT "2" "0 = disabled, 1 = enabled if gentle mod seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled" seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled" -// MSG_INFO notifications (count = 311): +// MSG_INFO notifications (count = 315): seta notification_INFO_CONNECTING "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CTF_CAPTURE_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -293,6 +293,10 @@ seta notification_INFO_JOIN_CONNECT_TEAM_BLUE "2" "0 = off, 1 = print to console seta notification_INFO_JOIN_CONNECT_TEAM_YELLOW "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_PINK "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_RED "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_JOIN_PLAY_TEAM_BLUE "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_JOIN_PLAY_TEAM_YELLOW "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_JOIN_PLAY_TEAM_PINK "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)" seta notification_INFO_KEEPAWAY_PICKUP "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_KEYHUNT_CAPTURE_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -415,7 +419,7 @@ seta notification_INFO_WEAPON_TUBA_SUICIDE "1" "0 = off, 1 = print to console, 2 seta notification_INFO_WEAPON_VAPORIZER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_VORTEX_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" -// MSG_CENTER notifications (count = 221): +// MSG_CENTER notifications (count = 222): seta notification_CENTER_ALONE "1" "0 = off, 1 = centerprint" seta notification_CENTER_ASSAULT_ATTACKING "1" "0 = off, 1 = centerprint" seta notification_CENTER_ASSAULT_DEFENDING "1" "0 = off, 1 = centerprint" @@ -578,6 +582,7 @@ seta notification_CENTER_KEYHUNT_START_PINK "1" "0 = off, 1 = centerprint" seta notification_CENTER_LMS_NOLIVES "1" "0 = off, 1 = centerprint" seta notification_CENTER_MISSING_TEAMS "1" "0 = off, 1 = centerprint" seta notification_CENTER_MISSING_PLAYERS "1" "0 = off, 1 = centerprint" +seta notification_CENTER_INSTAGIB_DOWNGRADE "1" "0 = off, 1 = centerprint" seta notification_CENTER_INSTAGIB_FINDAMMO "1" "0 = off, 1 = centerprint" seta notification_CENTER_INSTAGIB_FINDAMMO_FIRST "1" "0 = off, 1 = centerprint" seta notification_CENTER_INSTAGIB_LIVES_REMAINING "1" "0 = off, 1 = centerprint" @@ -859,4 +864,4 @@ seta notification_show_sprees_info "3" "Show spree information in MSG_INFO messa seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself" seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement" -// Notification counts (total = 797): MSG_ANNCE = 89, MSG_INFO = 311, MSG_CENTER = 221, MSG_MULTI = 152, MSG_CHOICE = 24 +// Notification counts (total = 802): MSG_ANNCE = 89, MSG_INFO = 315, MSG_CENTER = 222, MSG_MULTI = 152, MSG_CHOICE = 24 diff --git a/qcsrc/common/notifications.inc b/qcsrc/common/notifications.inc index a0f3f2f09..978fb865a 100644 --- a/qcsrc/common/notifications.inc +++ b/qcsrc/common/notifications.inc @@ -354,6 +354,7 @@ MSG_INFO_NOTIF(2, INFO_JOIN_CONNECT, 1, 0, "s1", "", "", _("^BG%s^F3 connected"), "") MULTITEAM_INFO(2, INFO_JOIN_CONNECT_TEAM_, 4, 1, 0, "s1", "", "", _("^BG%s^F3 connected and joined the ^TC^TT team"), "") MSG_INFO_NOTIF(1, INFO_JOIN_PLAY, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing"), "") + MULTITEAM_INFO(2, INFO_JOIN_PLAY_TEAM_, 4, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing on the ^TC^TT team"), "") MSG_INFO_NOTIF(1, INFO_KEEPAWAY_DROPPED, 1, 0, "s1", "s1", "notify_balldropped", _("^BG%s^BG has dropped the ball!"), "") MSG_INFO_NOTIF(1, INFO_KEEPAWAY_PICKUP, 1, 0, "s1", "s1", "notify_ballpickedup", _("^BG%s^BG has picked up the ball!"), "") MULTITEAM_INFO(1, INFO_KEYHUNT_CAPTURE_, 4, 1, 0, "s1", "", "", _("^BG%s^BG captured the keys for the ^TC^TT team"), "") diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index e43844bec..3f9fdd41b 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1078,7 +1078,7 @@ void ClientConnect() this.netname_previous = strzone(this.netname); - Send_Notification(NOTIF_ALL, NULL, MSG_INFO, (teamplay ? APP_TEAM_ENT_4(this, INFO_JOIN_CONNECT_TEAM_) : INFO_JOIN_CONNECT), this.netname); + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, ((teamplay && IS_PLAYER(this)) ? APP_TEAM_ENT_4(this, INFO_JOIN_CONNECT_TEAM_) : INFO_JOIN_CONNECT), this.netname); stuffcmd(this, clientstuff, "\n"); stuffcmd(this, "cl_particles_reloadeffects\n"); // TODO do we still need this? @@ -1827,7 +1827,7 @@ void LeaveSpectatorMode() PutClientInServer(); - if(IS_PLAYER(self)) { Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname); } + if(IS_PLAYER(self)) { Send_Notification(NOTIF_ALL, world, MSG_INFO, ((teamplay) ? APP_TEAM_ENT_4(this, INFO_JOIN_PLAY_TEAM_) : INFO_JOIN_PLAY), self.netname); } } else stuffcmd(self, "menu_showteamselect\n"); diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 3261d3eb0..5c052e2d9 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -180,7 +180,7 @@ void ClientCommand_join(float request) self.classname = STR_PLAYER; PlayerScore_Clear(self); Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_PREVENT_JOIN); - Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname); + Send_Notification(NOTIF_ALL, world, MSG_INFO, ((teamplay) ? APP_TEAM_ENT_4(this, INFO_JOIN_PLAY_TEAM_) : INFO_JOIN_PLAY), self.netname); PutClientInServer(); } else