Stabilize spawnbot command

This commit is contained in:
momo5502 2023-05-13 09:36:02 +02:00
parent fd73e6f88a
commit 2d6a51a23a

View File

@ -2,6 +2,7 @@
#include "loader/component_loader.hpp" #include "loader/component_loader.hpp"
#include "command.hpp" #include "command.hpp"
#include "scheduler.hpp"
#include <utils/hook.hpp> #include <utils/hook.hpp>
#include <utils/io.hpp> #include <utils/io.hpp>
@ -147,6 +148,8 @@ namespace bots
} }
} }
scheduler::once([count]
{
for (size_t i = 0; i < count; ++i) for (size_t i = 0; i < count; ++i)
{ {
if (!game::SV_AddTestClient()) if (!game::SV_AddTestClient())
@ -154,6 +157,7 @@ namespace bots
break; break;
} }
} }
}, scheduler::server);
}); });
} }
}; };