mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-03-03 17:15:24 +03:00
Add convar to control max MvM robots
This commit is contained in:
parent
c496173cf3
commit
238a15a79d
@ -2626,7 +2626,7 @@ void CPopulationManager::AllocateBots()
|
||||
Warning( "%d bots were already allocated some how before CPopulationManager::AllocateBots was called\n", botVector.Count() );
|
||||
}
|
||||
|
||||
for ( int i = nNumEnemyBots; i < MVM_INVADERS_TEAM_SIZE; ++i )
|
||||
for ( int i = nNumEnemyBots; i < tf_mvm_max_invaders.GetInt(); ++i )
|
||||
{
|
||||
CTFBot* newBot = NextBotCreatePlayerBot< CTFBot >( "TFBot", false );
|
||||
if ( newBot )
|
||||
|
@ -137,8 +137,6 @@ public:
|
||||
bool IsBonusRound() const { return m_bBonusRound; }
|
||||
CBaseCombatCharacter* GetBonusBoss() const { return m_hBonusBoss; }
|
||||
|
||||
enum { MVM_INVADERS_TEAM_SIZE = 22 };
|
||||
|
||||
static bool GetWavesUseReadyBetween() { return true; }
|
||||
|
||||
void SetDefaultEventChangeAttributesName( const char* pszDefaultEventChangeAttributesName ) { m_defaultEventChangeAttributesName = pszDefaultEventChangeAttributesName; }
|
||||
|
@ -1014,7 +1014,7 @@ bool CTFBotSpawner::Spawn( const Vector &rawHere, EntityHandleVector_t *result )
|
||||
|
||||
nNumEnemyBots = botVector.Count();
|
||||
|
||||
if ( nNumEnemyBots >= CPopulationManager::MVM_INVADERS_TEAM_SIZE )
|
||||
if ( nNumEnemyBots >= tf_mvm_max_invaders.GetInt() )
|
||||
{
|
||||
// no room for more
|
||||
if ( tf_populator_debug.GetBool() )
|
||||
@ -1023,10 +1023,10 @@ bool CTFBotSpawner::Spawn( const Vector &rawHere, EntityHandleVector_t *result )
|
||||
}
|
||||
|
||||
// extra guard if we're over full on bots
|
||||
if ( nNumEnemyBots > CPopulationManager::MVM_INVADERS_TEAM_SIZE )
|
||||
if ( nNumEnemyBots > tf_mvm_max_invaders.GetInt() )
|
||||
{
|
||||
// Kick bots until we are at the proper number starting with spectator bots
|
||||
int iNumberToKick = nNumEnemyBots - CPopulationManager::MVM_INVADERS_TEAM_SIZE;
|
||||
int iNumberToKick = nNumEnemyBots - tf_mvm_max_invaders.GetInt();
|
||||
int iKickedBots = 0;
|
||||
|
||||
// loop through spectators and invaders in that order
|
||||
|
@ -741,7 +741,7 @@ bool CMissionPopulator::UpdateMission( CTFBot::MissionType mission )
|
||||
// are there enough free slots?
|
||||
int currentEnemyCount = GetGlobalTeam( TF_TEAM_PVE_INVADERS )->GetNumPlayers();
|
||||
|
||||
if ( currentEnemyCount + m_desiredCount > CPopulationManager::MVM_INVADERS_TEAM_SIZE )
|
||||
if ( currentEnemyCount + m_desiredCount > tf_mvm_max_invaders.GetInt() )
|
||||
{
|
||||
// not enough slots yet
|
||||
if ( tf_populator_debug.GetBool() )
|
||||
@ -1578,7 +1578,7 @@ void CWaveSpawnPopulator::Update( void )
|
||||
|
||||
int currentEnemyCount = GetGlobalTeam( TF_TEAM_PVE_INVADERS )->GetNumPlayers();
|
||||
|
||||
if ( currentEnemyCount + m_spawnCount + m_reservedPlayerSlotCount > CPopulationManager::MVM_INVADERS_TEAM_SIZE )
|
||||
if ( currentEnemyCount + m_spawnCount + m_reservedPlayerSlotCount > tf_mvm_max_invaders.GetInt() )
|
||||
{
|
||||
// no space right now
|
||||
return;
|
||||
|
@ -875,6 +875,7 @@ ConVar tf_raid_allow_overtime( "tf_raid_allow_overtime", "0"/*, FCVAR_CHEAT*/ );
|
||||
|
||||
ConVar tf_mvm_defenders_team_size( "tf_mvm_defenders_team_size", "6", FCVAR_REPLICATED | FCVAR_NOTIFY, "Maximum number of defenders in MvM" );
|
||||
ConVar tf_mvm_max_connected_players( "tf_mvm_max_connected_players", "10", FCVAR_GAMEDLL, "Maximum number of connected real players in MvM" );
|
||||
ConVar tf_mvm_max_invaders( "tf_mvm_max_invaders", "22", FCVAR_GAMEDLL, "Maximum number of invaders in MvM" );
|
||||
|
||||
ConVar tf_mvm_min_players_to_start( "tf_mvm_min_players_to_start", "3", FCVAR_REPLICATED | FCVAR_NOTIFY, "Minimum number of players connected to start a countdown timer" );
|
||||
ConVar tf_mvm_respec_enabled( "tf_mvm_respec_enabled", "1", FCVAR_CHEAT | FCVAR_REPLICATED, "Allow players to refund credits spent on player and item upgrades." );
|
||||
|
@ -97,6 +97,7 @@ class CMannVsMachineUpgrades;
|
||||
//extern ConVar tf_populator_damage_multiplier;
|
||||
|
||||
extern ConVar tf_mvm_defenders_team_size;
|
||||
extern ConVar tf_mvm_max_invaders;
|
||||
|
||||
const int kLadder_TeamSize_6v6 = 6;
|
||||
const int kLadder_TeamSize_9v9 = 9;
|
||||
|
Loading…
x
Reference in New Issue
Block a user