From: Mario Date: Wed, 5 Oct 2016 09:13:30 +0000 (+1000) Subject: Port nexball ball held too long by team message to the notifications system, also... X-Git-Tag: xonotic-v0.8.2~556 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=80869a0c1266387f4ffe026fc31930ff4d5eac83;p=xonotic%2Fxonotic-data.pk3dir.git Port nexball ball held too long by team message to the notifications system, also fix ball not properly resetting in this case --- diff --git a/notifications.cfg b/notifications.cfg index 6aa1ee3b7..8583592b9 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 = 316): +// MSG_INFO notifications (count = 320): seta notification_INFO_CA_JOIN_LATE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CA_LEAVE "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)" @@ -311,6 +311,10 @@ seta notification_INFO_LMS_FORFEIT "1" "0 = off, 1 = print to console, 2 = print seta notification_INFO_LMS_NOLIVES "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_MINIGAME_INVITE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_MONSTERS_DISABLED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_NEXBALL_RETURN_HELD_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_NEXBALL_RETURN_HELD_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_NEXBALL_RETURN_HELD_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_NEXBALL_RETURN_HELD_YELLOW "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_ONSLAUGHT_CAPTURE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_ONSLAUGHT_CPDESTROYED_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_ONSLAUGHT_CPDESTROYED_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -882,4 +886,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 = 816): MSG_ANNCE = 89, MSG_INFO = 316, MSG_CENTER = 230, MSG_MULTI = 153, MSG_CHOICE = 28 +// Notification counts (total = 820): MSG_ANNCE = 89, MSG_INFO = 320, MSG_CENTER = 230, MSG_MULTI = 153, MSG_CHOICE = 28 diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 1d2555e95..163d7b81c 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -103,9 +103,9 @@ void nexball_setstatus(entity this) { if(this.ballcarried.teamtime && (this.ballcarried.teamtime < time)) { - bprint("The ", Team_ColoredFullName(this.team), " held the ball for too long.\n"); - DropBall(this.ballcarried, this.ballcarried.owner.origin, '0 0 0'); + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_NEXBALL_RETURN_HELD)); entity e = this.ballcarried; + DropBall(this.ballcarried, this.ballcarried.owner.origin, '0 0 0'); ResetBall(e); } else @@ -255,7 +255,7 @@ void ResetBall(entity this) if(this.cnt < 2) // step 1 { if(time == this.teamtime) - bprint("The ", Team_ColoredFullName(this.team), " held the ball for too long.\n"); + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_NEXBALL_RETURN_HELD)); settouch(this, func_null); set_movetype(this, MOVETYPE_NOCLIP); diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index e6be6b100..43a94c80e 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -387,6 +387,8 @@ MSG_INFO_NOTIF(MONSTERS_DISABLED, 1, 0, 0, "", "", "", _("^BGMonsters are currently disabled"), "") + MULTITEAM_INFO(NEXBALL_RETURN_HELD, 4, 1, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG team held the ball for too long"), "", NAME) + MSG_INFO_NOTIF(ONSLAUGHT_CAPTURE, 1, 2, 0, "s1 s2", "", "", _("^BG%s^BG captured %s^BG control point"), "") MULTITEAM_INFO(ONSLAUGHT_CPDESTROYED, 4, 1, 2, 0, "s1 s2", "", "", _("^TC^TT^BG team %s^BG control point has been destroyed by %s"), "", NAME) MULTITEAM_INFO(ONSLAUGHT_GENDESTROYED, 4, 1, 0, 0, "", "", "", _("^TC^TT^BG generator has been destroyed"), "", GENERATOR)