From 96fcefaa014de6faa1c1113871a80a6bc2ad6368 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Sun, 31 Dec 2017 10:54:15 +0300 Subject: [PATCH] I think that works --- src/hacks/Aimbot.cpp | 2 ++ src/hacks/CatBot.cpp | 9 ++++++++- src/hooks/others.cpp | 2 +- src/ipc.cpp | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index d2da5429..ed50d77a 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -548,6 +548,8 @@ bool IsTargetStateGood(CachedEntity *entity) return false; } } + if (hacks::shared::catbot::should_ignore_player(entity)) + return false; // Preform hitbox prediction int hitbox = BestHitbox(entity); AimbotCalculatedData_s &cd = calculated_data_array[entity->m_IDX]; diff --git a/src/hacks/CatBot.cpp b/src/hacks/CatBot.cpp index c1862219..9b85164b 100644 --- a/src/hacks/CatBot.cpp +++ b/src/hacks/CatBot.cpp @@ -56,6 +56,7 @@ void on_killed_by(int userid) //if (human_detecting_map[steamID].has_bot_name) human_detecting_map[steamID].treacherous_kills++; + logging::Info("Treacherous kill #%d: %s [U:1:%u]", human_detecting_map[steamID].treacherous_kills, player->player_info.name, player->player_info.friendsID); } void do_random_votekick() @@ -79,7 +80,12 @@ void do_random_votekick() if (targets.empty()) return; - hack::ExecuteCommand("callvote kick " + std::to_string(targets[rand() % targets.size()])); + int target = targets[rand() % targets.size()]; + player_info_s info; + if (!g_IEngine->GetPlayerInfo(g_IEngine->GetPlayerForUserID(target), &info)) + return; + logging::Info("Calling vote to kick '%s' [U:1:%u] (%d / %u)", info.name, info.friendsID, target, targets.size()); + hack::ExecuteCommand("callvote kick " + std::to_string(target) + " cheating"); } void update_catbot_list() @@ -96,6 +102,7 @@ void update_catbot_list() { if (human_detecting_map.find(info.friendsID) == human_detecting_map.end()) { + logging::Info("Found bot %s [U:1:%u]", info.name, info.friendsID); human_detecting_map.insert(std::make_pair(info.friendsID, catbot_user_state{ 0 })); } } diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp index 6d31562d..ea28dde0 100644 --- a/src/hooks/others.cpp +++ b/src/hooks/others.cpp @@ -604,6 +604,7 @@ void FrameStageNotify_hook(void *_this, int stage) #endif if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START && !g_Settings.bInvalid) { + hacks::shared::catbot::update(); angles::Update(); hacks::shared::anticheat::CreateMove(); if (hitrate_check) @@ -614,7 +615,6 @@ void FrameStageNotify_hook(void *_this, int stage) if (resolver && cathook && !g_Settings.bInvalid && stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) { - hacks::shared::catbot::update(); PROF_SECTION(FSN_resolver); for (int i = 1; i < 32 && i < HIGHEST_ENTITY; i++) { diff --git a/src/ipc.cpp b/src/ipc.cpp index ad79b8f0..54e78a18 100644 --- a/src/ipc.cpp +++ b/src/ipc.cpp @@ -249,6 +249,8 @@ void UpdateTemporaryData() { data.ingame.good = false; } + if (g_IEngine->GetLevelName()) + update_mapname(); } }