diff --git a/src/client/component/bots.cpp b/src/client/component/bots.cpp index 56d39d01..1677ee50 100644 --- a/src/client/component/bots.cpp +++ b/src/client/component/bots.cpp @@ -2,6 +2,7 @@ #include "loader/component_loader.hpp" #include "command.hpp" +#include "scheduler.hpp" #include #include @@ -147,13 +148,16 @@ namespace bots } } - for (size_t i = 0; i < count; ++i) + scheduler::once([count] { - if (!game::SV_AddTestClient()) + for (size_t i = 0; i < count; ++i) { - break; + if (!game::SV_AddTestClient()) + { + break; + } } - } + }, scheduler::server); }); } };