added option to skip bot_scaling to use bot_static instead for spawning static amount of bots each round if wanted
This commit is contained in:
@@ -1275,7 +1275,15 @@ public void LoadWave(int wave)
|
||||
|
||||
g_iClientRespawnCountNum = kv.GetNum("Respawns", 5);
|
||||
l_iBotQuote = kv.GetNum("bot_scaling", 1);
|
||||
SettingBotQoute(l_iBotQuote);
|
||||
int l_iBotQuoteStatic = kv.GetNum("bot_static", 1);
|
||||
if (l_iBotQuote == 0) //we use static bot amount instead
|
||||
{
|
||||
SettingBotQoute(l_iBotQuoteStatic, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SettingBotQoute(l_iBotQuote, false);
|
||||
}
|
||||
while (!IsEndOfFile(l_hFile) && ReadFileLine(l_hFile, l_cLine, sizeof(l_cLine)))
|
||||
{
|
||||
if (StrContains(l_cLine, l_cJumptokey) == -1 && !l_bKeyIndex)
|
||||
@@ -1418,7 +1426,7 @@ public void LoadWave(int wave)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void SettingBotQoute(int botscale)
|
||||
public void SettingBotQoute(int botscale, bool bot_static)
|
||||
{
|
||||
int l_iPlayers;
|
||||
for (int i = 1; i < MaxClients; i++)
|
||||
@@ -1428,14 +1436,13 @@ public void SettingBotQoute(int botscale)
|
||||
l_iPlayers++;
|
||||
}
|
||||
}
|
||||
if (botscale > 0)
|
||||
if (bot_static)
|
||||
{
|
||||
addBots(l_iPlayers * botscale);
|
||||
addBots(botscale);
|
||||
}
|
||||
else
|
||||
{
|
||||
//bot_scaling 0 should imply we spawn zombie_count amount of bots instead of scaling bots to player amount.
|
||||
addBots(g_iZMCount);
|
||||
addBots(l_iPlayers * botscale);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user