cat_autoexec_textmode

This commit is contained in:
nullifiedcat 2017-07-31 16:36:51 +03:00
parent 4c97ff621c
commit 80a87136a5
3 changed files with 29 additions and 1 deletions

View File

@ -289,6 +289,9 @@ void hack::Initialize() {
// FIXME [MP]
hacks::shared::killsay::Init();
hack::command_stack().push("exec cat_autoexec");
#ifdef TEXTMODE
hack::command_stack().push("exec cat_autoexec_textmode");
#endif
hack::command_stack().push("cat_killsay_reload");
hack::command_stack().push("cat_spam_reload");
logging::Info("Hooked!");

View File

@ -924,7 +924,6 @@ void OnLevelInit() {
}
}
static CatVar wb_abandon_too_many_bots(CV_INT, "wb_population_control", "0", "Abandon if bots >");
void CheckLivingSpace() {
#if IPC_ENABLED

View File

@ -121,6 +121,32 @@ CatVar server_name(CV_STRING, "ipc_server", "cathook_followbot_server", "IPC ser
peer_t* peer { nullptr };
CatCommand debug_get_ingame_ipc("ipc_debug_dump_server", "Show other bots on server", []() {
std::vector<unsigned> players {};
for (int j = 1; j < 32; j++) {
player_info_s info;
if (g_IEngine->GetPlayerInfo(j, &info)) {
if (info.friendsID)
players.push_back(info.friendsID);
}
}
int count = 0;
unsigned highest = 0;
std::vector<unsigned> botlist {};
for (unsigned i = 1; i < cat_ipc::max_peers; i++) {
if (!ipc::peer->memory->peer_data[i].free) {
for (auto& k : players) {
if (ipc::peer->memory->peer_user_data[i].friendid && k == ipc::peer->memory->peer_user_data[i].friendid) {
botlist.push_back(i);
logging::Info("-> %u (%u)", i, ipc::peer->memory->peer_user_data[i].friendid);
count++;
highest = i;
}
}
}
}
logging::Info("%d other IPC players on server", count);
});
void UpdateServerAddress(bool shutdown) {
if (not peer)