mirror of
https://github.com/diamante0018/BlackOpsPlugin.git
synced 2025-07-04 02:01:49 +00:00
Load list only once
This commit is contained in:
@ -39,8 +39,11 @@ void load_bot_data() {
|
||||
}
|
||||
|
||||
const char* sv_bot_name_random_stub() {
|
||||
if (bot_names.empty()) {
|
||||
static auto loaded = false;
|
||||
|
||||
if (bot_names.empty() && !loaded) {
|
||||
load_bot_data();
|
||||
loaded = true;
|
||||
}
|
||||
|
||||
if (!bot_names.empty()) {
|
||||
@ -60,6 +63,7 @@ int build_connect_string(char* buf, const char* connect_string,
|
||||
auto clan_tag = "3arc"s;
|
||||
for (const auto& [bot_name, tag] : bot_names) {
|
||||
if (bot_name == name) {
|
||||
// Found their clantag
|
||||
clan_tag = tag;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user