Replace obscure ternary operator with std::min

This commit is contained in:
FutureRave 2022-03-01 23:40:35 +00:00
parent ae509101b1
commit 95faf2374e
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955

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);
}