From: terencehill Date: Sun, 24 Mar 2024 21:50:44 +0000 (+0100) Subject: Use the correct function to get the active gametype in a LOG_FATALF call X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;ds=sidebyside;h=11a21a1b1e83b7d9a00321d7bf8eaab95de5e879;p=xonotic%2Fxonotic-data.pk3dir.git Use the correct function to get the active gametype in a LOG_FATALF call 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 --- diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 7d3d646b9..1cfdbf4a0 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -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)