From: Samual Lenks Date: Thu, 21 Feb 2013 21:30:02 +0000 (-0500) Subject: Get rid of bcenterprint() X-Git-Tag: xonotic-v0.7.0~62^2~23^2~188 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aac920445a06f02c56ef00e17ee8825724cd595f;p=xonotic%2Fxonotic-data.pk3dir.git Get rid of bcenterprint() --- diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index eeb9cabc4..5759cc6a9 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -443,6 +443,9 @@ void Send_CSQC_Centerprint_Generic_Expire(entity e, float id); MSG_CENTER_NOTIF(CENTER_LMS_CAMPCHECK, 0, 0, "", CPID_LMS_CAMP, XPD(0, 0), _("^K1Don't camp!"), "") \ MSG_CENTER_NOTIF(CENTER_JOIN_NOSPAWNS, 0, 0, "", CPID_PREVENT_JOIN, XPD(0, 0), _("^K1No spawnpoints available!\nHope your team can fix it..."), "") \ MSG_CENTER_NOTIF(CENTER_JOIN_PREVENT, 0, 0, "", CPID_PREVENT_JOIN, XPD(0, 0), _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "") \ + MSG_CENTER_NOTIF(CENTER_OVERTIME_TIME, 0, 1, "f1", CPID_OVERTIME, XPD(0, 0), _("^F2Now playing ^F4OVERTIME^F2!\nAdded ^F4%s ^F2minute(s) to the game!"), "") \ + MSG_CENTER_NOTIF(CENTER_OVERTIME_FRAG, 0, 0, "", CPID_OVERTIME, XPD(0, 0), _("^F2Now playing ^F4OVERTIME^F2!\nKeep fragging until we have a winner!"), _("^F2Now playing ^F4OVERTIME^F2!\nKeep scoring until we have a winner!")) \ + MSG_CENTER_NOTIF(CENTER_RACE_FINISHLAP, 0, 0, "", CPID_RACE_FINISHLAP, XPD(0, 0), _("^F2The race is over, finish your lap!"), "") \ MULTITEAM_CENTER(CENTER_TEAMCHANGE_, 4, 0, 1, "", CPID_TEAMCHANGE, XPD(0, f1), _("^BGChanging to ^TC^TT^BG in ^COUNT"), "") \ MSG_CENTER_NOTIF(CENTER_TEAMCHANGE_SPECTATE, 0, 1, "", CPID_TEAMCHANGE, XPD(0, f1), _("^BGSpectating in ^COUNT"), "") \ MSG_CENTER_NOTIF(CENTER_TEAMCHANGE_AUTO, 0, 1, "", CPID_TEAMCHANGE, XPD(0, f1), _("^BGChanging team in ^COUNT"), "") \ diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 8dc163521..f00e46818 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1676,20 +1676,8 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true tl = autocvar_timelimit; tl += autocvar_timelimit_overtime; cvar_set("timelimit", ftos(tl)); - string minutesPlural; - if (autocvar_timelimit_overtime == 1) - minutesPlural = " ^3minute"; - else - minutesPlural = " ^3minutes"; - - bcenterprint( - strcat( - "^3Now playing ^1OVERTIME^3!\n\n^3Added ^1", - ftos(autocvar_timelimit_overtime), - minutesPlural, - " to the game!" - ) - ); + + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime); } float GetWinningCode(float fraglimitreached, float equality) @@ -2195,9 +2183,9 @@ void CheckRules_World() { checkrules_suddendeathwarning = TRUE; if(g_race && !g_race_qualifying) - bcenterprint("^3Everyone, finish your lap! The race is over!"); + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_RACE_FINISHLAP); else - bcenterprint("^3Now playing ^1OVERTIME^3!\n\n^3Keep fragging until we have a ^1winner^3!"); + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_FRAG); } } else diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 2e7139269..effa386f4 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -107,15 +107,6 @@ string strcat1(string s) = #115; // FRIK_FILE float logfile_open; float logfile; -void bcenterprint(string s) -{ - // TODO replace by MSG_ALL (would show it to spectators too, though)? - entity head; - FOR_EACH_PLAYER(head) - if (clienttype(head) == CLIENTTYPE_REAL) - centerprint(head, s); -} - void GameLogEcho(string s) { string fn;