]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of bcenterprint()
authorSamual Lenks <samual@xonotic.org>
Thu, 21 Feb 2013 21:30:02 +0000 (16:30 -0500)
committerSamual Lenks <samual@xonotic.org>
Thu, 21 Feb 2013 21:30:02 +0000 (16:30 -0500)
qcsrc/common/notifications.qh
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc

index eeb9cabc403e53d4a06665fb69358e757ff9137a..5759cc6a97aba9ad841b85d0e80c037c82ffbb41 100644 (file)
@@ -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"), "") \
index 8dc16352106939122306cf40cdfe957fa8e1bb3b..f00e468185f88b74dcba238678b9357499876aaa 100644 (file)
@@ -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
index 2e7139269dd3d06b6b111e85f37398f573fe1b83..effa386f475957589bb80cc4484501a987b92389 100644 (file)
@@ -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;