mirror of
https://github.com/diamante0018/BlackOpsPlugin.git
synced 2025-04-21 02:35:43 +00:00
Load list only once
This commit is contained in:
parent
68c28ce1c1
commit
b5e4e30ba3
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user