I think that works

This commit is contained in:
nullifiedcat 2017-12-31 10:54:15 +03:00
parent ae6f1f2e5f
commit 96fcefaa01
4 changed files with 13 additions and 2 deletions

View File

@ -548,6 +548,8 @@ bool IsTargetStateGood(CachedEntity *entity)
return false; return false;
} }
} }
if (hacks::shared::catbot::should_ignore_player(entity))
return false;
// Preform hitbox prediction // Preform hitbox prediction
int hitbox = BestHitbox(entity); int hitbox = BestHitbox(entity);
AimbotCalculatedData_s &cd = calculated_data_array[entity->m_IDX]; AimbotCalculatedData_s &cd = calculated_data_array[entity->m_IDX];

View File

@ -56,6 +56,7 @@ void on_killed_by(int userid)
//if (human_detecting_map[steamID].has_bot_name) //if (human_detecting_map[steamID].has_bot_name)
human_detecting_map[steamID].treacherous_kills++; 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() void do_random_votekick()
@ -79,7 +80,12 @@ void do_random_votekick()
if (targets.empty()) if (targets.empty())
return; 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() void update_catbot_list()
@ -96,6 +102,7 @@ void update_catbot_list()
{ {
if (human_detecting_map.find(info.friendsID) == human_detecting_map.end()) 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 })); human_detecting_map.insert(std::make_pair(info.friendsID, catbot_user_state{ 0 }));
} }
} }

View File

@ -604,6 +604,7 @@ void FrameStageNotify_hook(void *_this, int stage)
#endif #endif
if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START && !g_Settings.bInvalid) if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START && !g_Settings.bInvalid)
{ {
hacks::shared::catbot::update();
angles::Update(); angles::Update();
hacks::shared::anticheat::CreateMove(); hacks::shared::anticheat::CreateMove();
if (hitrate_check) if (hitrate_check)
@ -614,7 +615,6 @@ void FrameStageNotify_hook(void *_this, int stage)
if (resolver && cathook && !g_Settings.bInvalid && if (resolver && cathook && !g_Settings.bInvalid &&
stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START)
{ {
hacks::shared::catbot::update();
PROF_SECTION(FSN_resolver); PROF_SECTION(FSN_resolver);
for (int i = 1; i < 32 && i < HIGHEST_ENTITY; i++) for (int i = 1; i < 32 && i < HIGHEST_ENTITY; i++)
{ {

View File

@ -249,6 +249,8 @@ void UpdateTemporaryData()
{ {
data.ingame.good = false; data.ingame.good = false;
} }
if (g_IEngine->GetLevelName())
update_mapname();
} }
} }