mirror of
https://github.com/diamante0018/BlackOpsPlugin.git
synced 2025-04-21 10:45:43 +00:00
[bots] Fix format
This commit is contained in:
parent
e0c9f9892b
commit
345057f906
@ -47,7 +47,7 @@ const char* sv_bot_name_random_stub() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!bot_names.empty()) {
|
if (!bot_names.empty()) {
|
||||||
static size_t bot_id = 0;
|
static std::size_t bot_id = 0;
|
||||||
bot_id %= bot_names.size();
|
bot_id %= bot_names.size();
|
||||||
const auto& entry = bot_names.at(bot_id++);
|
const auto& entry = bot_names.at(bot_id++);
|
||||||
return entry.first.data();
|
return entry.first.data();
|
||||||
@ -57,8 +57,8 @@ const char* sv_bot_name_random_stub() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int build_connect_string(char* buf, const char* connect_string,
|
int build_connect_string(char* buf, const char* connect_string,
|
||||||
const char* name, const char* xuid, int protocol,
|
const char* name, const char* bd_online_user_id,
|
||||||
int port) {
|
int protocol, int qport) {
|
||||||
// Default
|
// Default
|
||||||
auto clan_tag = "3arc"s;
|
auto clan_tag = "3arc"s;
|
||||||
for (const auto& [bot_name, tag] : bot_names) {
|
for (const auto& [bot_name, tag] : bot_names) {
|
||||||
@ -70,7 +70,7 @@ int build_connect_string(char* buf, const char* connect_string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return _snprintf_s(buf, 0x400, _TRUNCATE, connect_string, name,
|
return _snprintf_s(buf, 0x400, _TRUNCATE, connect_string, name,
|
||||||
clan_tag.data(), xuid, protocol, port);
|
clan_tag.data(), bd_online_user_id, protocol, qport);
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@ -80,12 +80,13 @@ public:
|
|||||||
if (game::current == game::gamemode::zombies)
|
if (game::current == game::gamemode::zombies)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Add custom clantag
|
||||||
utils::hook::set<const char*>(
|
utils::hook::set<const char*>(
|
||||||
0x6B6294,
|
0x6B6294,
|
||||||
"connect "
|
"connect "
|
||||||
"\"\\cg_predictItems\\1\\cl_punkbuster\\0\\cl_"
|
"\"\\cg_predictItems\\1\\cl_punkbuster\\0\\cl_"
|
||||||
"anonymous\\0\\color\\4\\head\\"
|
"anonymous\\0\\color\\4\\head\\default\\"
|
||||||
"default\\model\\multi\\snaps\\20\\rate\\5000\\name\\%s\\clanAbbrev\\%"
|
" model\\multi\\snaps\\20\\rate\\5000\\name\\%s\\clanAbbrev\\%"
|
||||||
"s\\bdOnlineUserID\\%s\\protocol\\%d\\qport\\%d\"");
|
"s\\bdOnlineUserID\\%s\\protocol\\%d\\qport\\%d\"");
|
||||||
|
|
||||||
sv_bot_name_random_hook.create(0x49ED80, &sv_bot_name_random_stub);
|
sv_bot_name_random_hook.create(0x49ED80, &sv_bot_name_random_stub);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user