Merge pull request #325 from diamante0018/develop

[bots] Replace obscure ternary operator with std::min
This commit is contained in:
Maurice Heumann 2022-03-02 11:54:21 +01:00 committed by GitHub
commit 815786e3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,9 @@ namespace bots
num_bots = atoi(params.get(1));
}
for (auto i = 0; i < (num_bots > *game::mp::svs_numclients ? *game::mp::svs_numclients : num_bots); i++)
num_bots = std::min(num_bots, *game::mp::svs_numclients);
for (auto i = 0; i < num_bots; i++)
{
scheduler::once(add_bot, scheduler::pipeline::server, 100ms * i);
}