From 7930eb9b799e5c3961ac67f4191c4008123441bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 1 Aug 2024 21:33:48 +0200 Subject: [PATCH] Use `!=` instead of `<` to future-proof `sv_team` Assume that this branch should apply to all team modes except `SV_TEAM_FORCED_SOLO` also when new team modes would get added after `SV_TEAM_FORCED_SOLO` in the future, as the values will never be changed and there is no relation between the order of the numeric values and the behavior. --- src/game/server/teams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index 30762fe8b..200e39741 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -172,7 +172,7 @@ void CGameTeams::OnCharacterStart(int ClientId) } } - if(g_Config.m_SvTeam < SV_TEAM_FORCED_SOLO && g_Config.m_SvMaxTeamSize != 2 && g_Config.m_SvPauseable) + if(g_Config.m_SvTeam != SV_TEAM_FORCED_SOLO && g_Config.m_SvMaxTeamSize != 2 && g_Config.m_SvPauseable) { for(int i = 0; i < MAX_CLIENTS; ++i) {