]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use the correct function to get the active gametype in a LOG_FATALF call
authorterencehill <piuntn@gmail.com>
Sun, 24 Mar 2024 21:50:44 +0000 (22:50 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 24 Mar 2024 21:50:44 +0000 (22:50 +0100)
MapInfo_Type_ToString(MapInfo_CurrentGametype()) returns the current gametype that can be changed during the game by the gametype command; GetGametype() returns the active gametype

qcsrc/server/teamplay.qc

index 7d3d646b9c9f68554ff9aff329949eecd6e88741..1cfdbf4a0538da331630210cdfbc92a4ef4333ec 100644 (file)
@@ -795,8 +795,7 @@ int TeamBalance_FindBestTeam(entity balance, entity player, bool ignore_player)
        int team_bits = TeamBalance_FindBestTeams(balance, player, true);
        if (team_bits == 0)
        {
-               LOG_FATALF("No teams available for %s\n",
-                       MapInfo_Type_ToString(MapInfo_CurrentGametype()));
+               LOG_FATALF("No teams available for %s\n", GetGametype());
        }
        RandomSelection_Init();
        for (int i = 1; i <= NUM_TEAMS; ++i)