diff --git a/include/tfmm.hpp b/include/tfmm.hpp index 43236a2d..849fc48b 100644 --- a/include/tfmm.hpp +++ b/include/tfmm.hpp @@ -11,6 +11,7 @@ namespace tfmm { void startQueue(); +void startQueueStandby(); void leaveQueue(); void disconnectAndAbandon(); void abandon(); diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 425727b6..e98a650a 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -357,7 +357,7 @@ CachedEntity *RetrieveBestTarget(bool aimkey_state) CachedEntity *ent; CachedEntity *target_highest_ent = 0; target_highest_score = -256; - if (!hacks::shared::backtrack::isBacktrackEnabled || projectile_mode) + if (!IsBacktracking() || projectile_mode) { for (int i = 0; i < HIGHEST_ENTITY; i++) { diff --git a/src/hacks/AutoJoin.cpp b/src/hacks/AutoJoin.cpp index 723e782f..abff2c40 100644 --- a/src/hacks/AutoJoin.cpp +++ b/src/hacks/AutoJoin.cpp @@ -15,6 +15,7 @@ static settings::Bool autojoin_team{ "autojoin.team", "false" }; static settings::Int autojoin_class{ "autojoin.class", "0" }; static settings::Bool auto_queue{ "autojoin.auto-queue", "false" }; static settings::Bool party_bypass{ "autojoin.party-bypass", "false" }; +static settings::Bool auto_requeue{ "autojoin.auto-requeue", "false" }; namespace hacks::shared::autojoin { @@ -80,7 +81,8 @@ void updateSearch() calld = true; } }*/ - if (!auto_queue) + + if (!auto_queue && !auto_requeue) { #if not ENABLE_VISUALS req_timer.update(); @@ -102,24 +104,40 @@ void updateSearch() re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem(); re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient(); + if (current_user_cmd && gc && gc->BConnectedToMatchServer(false) && - gc->BHaveLiveMatch()) + gc->BHaveLiveMatch()) { #if not ENABLE_VISUALS req_timer.update(); #endif tfmm::leaveQueue(); } - if (gc && !gc->BConnectedToMatchServer(false) && - queuetime.test_and_set(10 * 1000 * 60) && !gc->BHaveLiveMatch()) - tfmm::leaveQueue(); - if (gc && !gc->BConnectedToMatchServer(false) && !gc->BHaveLiveMatch() && - !invites) - if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue()))) - { - logging::Info("Starting queue, Invites %d", invites); - tfmm::startQueue(); - } +// if (gc && !gc->BConnectedToMatchServer(false) && +// queuetime.test_and_set(10 * 1000 * 60) && !gc->BHaveLiveMatch()) +// tfmm::leaveQueue(); + + if (auto_requeue) + { + if (gc && !gc->BConnectedToMatchServer(false) && !gc->BHaveLiveMatch() && + !invites) + if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue()))) + { + logging::Info("Starting queue for standby, Invites %d", invites); + tfmm::startQueueStandby(); + } + } + + if (auto_queue) + { + if (gc && !gc->BConnectedToMatchServer(false) && !gc->BHaveLiveMatch() && + !invites) + if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue()))) + { + logging::Info("Starting queue, Invites %d", invites); + tfmm::startQueue(); + } + } #if not ENABLE_VISUALS if (req_timer.test_and_set(600000)) { diff --git a/src/hacks/CatBot.cpp b/src/hacks/CatBot.cpp index bfa37610..04411925 100644 --- a/src/hacks/CatBot.cpp +++ b/src/hacks/CatBot.cpp @@ -8,6 +8,7 @@ #include #include "common.hpp" #include "hack.hpp" +#include "PlayerTools.hpp" static settings::Bool enable{ "cat-bot.enable", "false" }; @@ -27,6 +28,7 @@ static settings::Int micspam_off{ "cat-bot.micspam.interval-off", "60" }; static settings::Bool auto_crouch{ "cat-bot.auto-crouch", "true" }; static settings::Bool random_votekicks{ "cat-bot.votekicks", "false" }; +static settings::Bool autoReport{ "cat-bot.autoreport", "true" }; namespace hacks::shared::catbot { @@ -211,14 +213,18 @@ void reportall() // server if (!ent) continue; + if (ent == LOCAL_E) + continue; player_info_s info; if (g_IEngine->GetPlayerInfo(i, &info)) { - if (info.friendsID == local.friendsID || - playerlist::AccessData(info.friendsID).state == - playerlist::k_EState::FRIEND || - playerlist::AccessData(info.friendsID).state == - playerlist::k_EState::IPC) +// if (info.friendsID == local.friendsID || +// playerlist::AccessData(info.friendsID).state == +// playerlist::k_EState::FRIEND || +// playerlist::AccessData(info.friendsID).state == +// playerlist::k_EState::IPC) +// continue; + if (player_tools::shouldTargetSteamId(info.friendsID) != player_tools::IgnoreReason::DO_NOT_IGNORE) continue; CSteamID id(info.friendsID, EUniverse::k_EUniversePublic, EAccountType::k_EAccountTypeIndividual); diff --git a/src/hooks/DispatchUserMessage.cpp b/src/hooks/DispatchUserMessage.cpp index 4f13f3be..3a880d1c 100644 --- a/src/hooks/DispatchUserMessage.cpp +++ b/src/hooks/DispatchUserMessage.cpp @@ -255,6 +255,12 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type, sendmsg.test_and_set(5000)) chat_stack::Say("!!meow"); } + else if (state == playerlist::k_EState::CAT) + { + if (*answerIdentify && + sendmsg.test_and_set(60000)) + chat_stack::Say("!!meow"); + } } #endif PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(), diff --git a/src/tfmm.cpp b/src/tfmm.cpp index aed063e9..6a1eea7c 100644 --- a/src/tfmm.cpp +++ b/src/tfmm.cpp @@ -59,13 +59,22 @@ void startQueue() if (*queue == 7) client->LoadSavedCasualCriteria(); client->RequestQueueForMatch((int) queue); - client->RequestQueueForStandby(); + //client->RequestQueueForStandby(); hacks::shared::autojoin::resetQueueTimer(); queuecount++; } else logging::Info("queue_start: CTFPartyClient == null!"); } +void startQueueStandby() +{ + re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient(); + if (client) + { + client->RequestQueueForStandby(); + hacks::shared::autojoin::resetQueueTimer(); + } +} void leaveQueue() { re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();