]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Kill centerprints when intermission starts
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index d924c018e89d795b3789c819a0ca2c3034a2675b..15dce3d80617d16949b0c54f2a077d1dd5f63ea5 100644 (file)
@@ -340,9 +340,6 @@ void cvar_changes_init()
                BADCVAR("gameversion");
                BADPREFIX("gameversion_");
                BADCVAR("sv_namechangetimer");
-#ifndef NO_LEGACY_NETWORKING
-               BADCVAR("sv_use_csqc_players"); // transition
-#endif
 
                // allowed changes to server admins (please sync this to server.cfg)
                // vi commands:
@@ -558,6 +555,8 @@ void spawnfunc___init_dedicated_server(void)
 
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
+
+       print("^1YO SAMUAL, CHECK THIS SHIT OUT MOTHERFUCKER! _init spawnfunc was called!\n");
 }
 
 void Map_MarkAsRecent(string m);
@@ -598,6 +597,8 @@ void spawnfunc_worldspawn (void)
                head = nextent(head);
        }
 
+       server_is_dedicated = (cvar_defstring("is_dedicated") ? TRUE : FALSE);
+
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
@@ -845,7 +846,7 @@ void spawnfunc_worldspawn (void)
        for(i = 0, j = 0; i < MapInfo_count; ++i)
        {
                if(MapInfo_Get_ByID(i))
-                       if not(MapInfo_Map_flags & (MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN))
+                       if not(MapInfo_Map_flags & MapInfo_ForbiddenFlags())
                        {
                                if(mod(i, 2))
                                        col = "^2";
@@ -1597,6 +1598,8 @@ void NextLevel()
        PlayerStats_Shutdown();
        WeaponStats_Shutdown();
 
+       Kill_Notification(NOTIF_ANY, world, MSG_CENTER, 0); // kill all centerprints now
+
        if(autocvar_sv_eventlog)
                GameLogEcho(":gameover");
 
@@ -1679,20 +1682,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)
@@ -2198,9 +2189,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