Skip to content

Commit f27205b

Browse files
committed
fix team menu limit for mvm testing
1 parent 78d055a commit f27205b

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/game/client/tf/vgui/tf_teammenu.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,20 @@ void CTFTeamMenu::OnTick()
811811

812812
int iCurrentTeam = pLocalPlayer->GetTeamNumber();
813813

814+
int iTeamSize = kMVM_DefendersTeamSize;
815+
816+
#ifndef VALVE_PURE
817+
ConVarRef tf_sv_mvm_forced_players("tf_sv_mvm_forced_players");
818+
if (tf_sv_mvm_forced_players.GetInt() > iTeamSize)
819+
{
820+
iTeamSize = tf_sv_mvm_forced_players.GetInt();
821+
}
822+
#endif
823+
814824
if ( ( bUnbalanced && iHeavyTeam == TF_TEAM_RED ) ||
815825
( pRules->WouldChangeUnbalanceTeams( TF_TEAM_RED, iCurrentTeam ) ) ||
816826
( bHighlander && GetGlobalTeam( TF_TEAM_RED )->GetNumPlayers() >= TF_LAST_NORMAL_CLASS - 1 ) ||
817-
( pRules->IsMannVsMachineMode() && ( GetGlobalTeam( TF_TEAM_RED )->GetNumPlayers() >= kMVM_DefendersTeamSize ) ) )
827+
( pRules->IsMannVsMachineMode() && ( GetGlobalTeam( TF_TEAM_RED )->GetNumPlayers() >= iTeamSize ) ) )
818828
{
819829
m_bRedDisabled = true;
820830
}

src/game/server/tf/tf_gc_server.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,10 +1593,6 @@ void CTFGCServerSystem::ClientDisconnected( CSteamID steamIDClient )
15931593
}
15941594
}
15951595

1596-
#ifndef VALVE_PURE
1597-
extern ConVar tf_sv_mvm_forced_players;
1598-
#endif
1599-
16001596
//-----------------------------------------------------------------------------
16011597
void CTFGCServerSystem::PreClientUpdate( )
16021598
{
@@ -1703,6 +1699,7 @@ void CTFGCServerSystem::PreClientUpdate( )
17031699

17041700
int playerCount = kMVM_DefendersTeamSize + spectatorCount;
17051701
#ifndef VALVE_PURE
1702+
ConVarRef tf_sv_mvm_forced_players("tf_sv_mvm_forced_players");
17061703
if ( tf_sv_mvm_forced_players.GetInt() > playerCount )
17071704
{
17081705
playerCount = tf_sv_mvm_forced_players.GetInt();

0 commit comments

Comments
 (0)