Requeue and cryptochat ignore stuff

This commit is contained in:
TotallyNotElite 2018-09-02 17:25:11 +02:00
parent 6cb255e0cd
commit b02656e342
6 changed files with 59 additions and 19 deletions

View File

@ -11,6 +11,7 @@ namespace tfmm
{
void startQueue();
void startQueueStandby();
void leaveQueue();
void disconnectAndAbandon();
void abandon();

View File

@ -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++)
{

View File

@ -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))
{

View File

@ -8,6 +8,7 @@
#include <settings/Bool.hpp>
#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);

View File

@ -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(),

View File

@ -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();