Requeue and cryptochat ignore stuff
This commit is contained in:
parent
6cb255e0cd
commit
b02656e342
@ -11,6 +11,7 @@ namespace tfmm
|
|||||||
{
|
{
|
||||||
|
|
||||||
void startQueue();
|
void startQueue();
|
||||||
|
void startQueueStandby();
|
||||||
void leaveQueue();
|
void leaveQueue();
|
||||||
void disconnectAndAbandon();
|
void disconnectAndAbandon();
|
||||||
void abandon();
|
void abandon();
|
||||||
|
@ -357,7 +357,7 @@ CachedEntity *RetrieveBestTarget(bool aimkey_state)
|
|||||||
CachedEntity *ent;
|
CachedEntity *ent;
|
||||||
CachedEntity *target_highest_ent = 0;
|
CachedEntity *target_highest_ent = 0;
|
||||||
target_highest_score = -256;
|
target_highest_score = -256;
|
||||||
if (!hacks::shared::backtrack::isBacktrackEnabled || projectile_mode)
|
if (!IsBacktracking() || projectile_mode)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < HIGHEST_ENTITY; i++)
|
for (int i = 0; i < HIGHEST_ENTITY; i++)
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,7 @@ static settings::Bool autojoin_team{ "autojoin.team", "false" };
|
|||||||
static settings::Int autojoin_class{ "autojoin.class", "0" };
|
static settings::Int autojoin_class{ "autojoin.class", "0" };
|
||||||
static settings::Bool auto_queue{ "autojoin.auto-queue", "false" };
|
static settings::Bool auto_queue{ "autojoin.auto-queue", "false" };
|
||||||
static settings::Bool party_bypass{ "autojoin.party-bypass", "false" };
|
static settings::Bool party_bypass{ "autojoin.party-bypass", "false" };
|
||||||
|
static settings::Bool auto_requeue{ "autojoin.auto-requeue", "false" };
|
||||||
|
|
||||||
namespace hacks::shared::autojoin
|
namespace hacks::shared::autojoin
|
||||||
{
|
{
|
||||||
@ -80,7 +81,8 @@ void updateSearch()
|
|||||||
calld = true;
|
calld = true;
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
if (!auto_queue)
|
|
||||||
|
if (!auto_queue && !auto_requeue)
|
||||||
{
|
{
|
||||||
#if not ENABLE_VISUALS
|
#if not ENABLE_VISUALS
|
||||||
req_timer.update();
|
req_timer.update();
|
||||||
@ -102,6 +104,7 @@ void updateSearch()
|
|||||||
|
|
||||||
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||||
re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient();
|
re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient();
|
||||||
|
|
||||||
if (current_user_cmd && gc && gc->BConnectedToMatchServer(false) &&
|
if (current_user_cmd && gc && gc->BConnectedToMatchServer(false) &&
|
||||||
gc->BHaveLiveMatch())
|
gc->BHaveLiveMatch())
|
||||||
{
|
{
|
||||||
@ -110,9 +113,23 @@ void updateSearch()
|
|||||||
#endif
|
#endif
|
||||||
tfmm::leaveQueue();
|
tfmm::leaveQueue();
|
||||||
}
|
}
|
||||||
if (gc && !gc->BConnectedToMatchServer(false) &&
|
// if (gc && !gc->BConnectedToMatchServer(false) &&
|
||||||
queuetime.test_and_set(10 * 1000 * 60) && !gc->BHaveLiveMatch())
|
// queuetime.test_and_set(10 * 1000 * 60) && !gc->BHaveLiveMatch())
|
||||||
tfmm::leaveQueue();
|
// 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() &&
|
if (gc && !gc->BConnectedToMatchServer(false) && !gc->BHaveLiveMatch() &&
|
||||||
!invites)
|
!invites)
|
||||||
if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue())))
|
if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue())))
|
||||||
@ -120,6 +137,7 @@ void updateSearch()
|
|||||||
logging::Info("Starting queue, Invites %d", invites);
|
logging::Info("Starting queue, Invites %d", invites);
|
||||||
tfmm::startQueue();
|
tfmm::startQueue();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#if not ENABLE_VISUALS
|
#if not ENABLE_VISUALS
|
||||||
if (req_timer.test_and_set(600000))
|
if (req_timer.test_and_set(600000))
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <settings/Bool.hpp>
|
#include <settings/Bool.hpp>
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "hack.hpp"
|
#include "hack.hpp"
|
||||||
|
#include "PlayerTools.hpp"
|
||||||
|
|
||||||
static settings::Bool enable{ "cat-bot.enable", "false" };
|
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 auto_crouch{ "cat-bot.auto-crouch", "true" };
|
||||||
static settings::Bool random_votekicks{ "cat-bot.votekicks", "false" };
|
static settings::Bool random_votekicks{ "cat-bot.votekicks", "false" };
|
||||||
|
static settings::Bool autoReport{ "cat-bot.autoreport", "true" };
|
||||||
|
|
||||||
namespace hacks::shared::catbot
|
namespace hacks::shared::catbot
|
||||||
{
|
{
|
||||||
@ -211,14 +213,18 @@ void reportall()
|
|||||||
// server
|
// server
|
||||||
if (!ent)
|
if (!ent)
|
||||||
continue;
|
continue;
|
||||||
|
if (ent == LOCAL_E)
|
||||||
|
continue;
|
||||||
player_info_s info;
|
player_info_s info;
|
||||||
if (g_IEngine->GetPlayerInfo(i, &info))
|
if (g_IEngine->GetPlayerInfo(i, &info))
|
||||||
{
|
{
|
||||||
if (info.friendsID == local.friendsID ||
|
// if (info.friendsID == local.friendsID ||
|
||||||
playerlist::AccessData(info.friendsID).state ==
|
// playerlist::AccessData(info.friendsID).state ==
|
||||||
playerlist::k_EState::FRIEND ||
|
// playerlist::k_EState::FRIEND ||
|
||||||
playerlist::AccessData(info.friendsID).state ==
|
// playerlist::AccessData(info.friendsID).state ==
|
||||||
playerlist::k_EState::IPC)
|
// playerlist::k_EState::IPC)
|
||||||
|
// continue;
|
||||||
|
if (player_tools::shouldTargetSteamId(info.friendsID) != player_tools::IgnoreReason::DO_NOT_IGNORE)
|
||||||
continue;
|
continue;
|
||||||
CSteamID id(info.friendsID, EUniverse::k_EUniversePublic,
|
CSteamID id(info.friendsID, EUniverse::k_EUniversePublic,
|
||||||
EAccountType::k_EAccountTypeIndividual);
|
EAccountType::k_EAccountTypeIndividual);
|
||||||
|
@ -255,6 +255,12 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
sendmsg.test_and_set(5000))
|
sendmsg.test_and_set(5000))
|
||||||
chat_stack::Say("!!meow");
|
chat_stack::Say("!!meow");
|
||||||
}
|
}
|
||||||
|
else if (state == playerlist::k_EState::CAT)
|
||||||
|
{
|
||||||
|
if (*answerIdentify &&
|
||||||
|
sendmsg.test_and_set(60000))
|
||||||
|
chat_stack::Say("!!meow");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(),
|
PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(),
|
||||||
|
11
src/tfmm.cpp
11
src/tfmm.cpp
@ -59,13 +59,22 @@ void startQueue()
|
|||||||
if (*queue == 7)
|
if (*queue == 7)
|
||||||
client->LoadSavedCasualCriteria();
|
client->LoadSavedCasualCriteria();
|
||||||
client->RequestQueueForMatch((int) queue);
|
client->RequestQueueForMatch((int) queue);
|
||||||
client->RequestQueueForStandby();
|
//client->RequestQueueForStandby();
|
||||||
hacks::shared::autojoin::resetQueueTimer();
|
hacks::shared::autojoin::resetQueueTimer();
|
||||||
queuecount++;
|
queuecount++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
logging::Info("queue_start: CTFPartyClient == null!");
|
logging::Info("queue_start: CTFPartyClient == null!");
|
||||||
}
|
}
|
||||||
|
void startQueueStandby()
|
||||||
|
{
|
||||||
|
re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();
|
||||||
|
if (client)
|
||||||
|
{
|
||||||
|
client->RequestQueueForStandby();
|
||||||
|
hacks::shared::autojoin::resetQueueTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
void leaveQueue()
|
void leaveQueue()
|
||||||
{
|
{
|
||||||
re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();
|
re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();
|
||||||
|
Reference in New Issue
Block a user