Merge remote-tracking branch 'origin/newui' into newui
This commit is contained in:
commit
fcf85f14d2
@ -27,7 +27,8 @@ class HookedFunction
|
|||||||
std::string m_name;
|
std::string m_name;
|
||||||
std::function<void()> m_func;
|
std::function<void()> m_func;
|
||||||
HookedFunctions_types m_type;
|
HookedFunctions_types m_type;
|
||||||
void init(HookedFunctions_types type, std::string name, int priority, std::function<void()> func)
|
void init(HookedFunctions_types type, std::string name, int priority,
|
||||||
|
std::function<void()> func)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -44,6 +45,7 @@ class HookedFunction
|
|||||||
m_type = type;
|
m_type = type;
|
||||||
HookTools::GetHookedFunctions().push_back(this);
|
HookTools::GetHookedFunctions().push_back(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_priority;
|
int m_priority;
|
||||||
void run(HookedFunctions_types type)
|
void run(HookedFunctions_types type)
|
||||||
@ -57,16 +59,19 @@ public:
|
|||||||
m_func();
|
m_func();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HookedFunction(HookedFunctions_types type, std::string name, int priority, std::function<void()> func)
|
HookedFunction(HookedFunctions_types type, std::string name, int priority,
|
||||||
|
std::function<void()> func)
|
||||||
{
|
{
|
||||||
init(type, name, priority, func);
|
init(type, name, priority, func);
|
||||||
}
|
}
|
||||||
HookedFunction(HookedFunctions_types type, int priority, std::function<void()> func)
|
HookedFunction(HookedFunctions_types type, int priority,
|
||||||
|
std::function<void()> func)
|
||||||
{
|
{
|
||||||
static const std::string name("UNNAMED_FUNCTIONS");
|
static const std::string name("UNNAMED_FUNCTIONS");
|
||||||
init(type, name, priority, func);
|
init(type, name, priority, func);
|
||||||
}
|
}
|
||||||
HookedFunction(HookedFunctions_types type, std::string name, std::function<void()> func)
|
HookedFunction(HookedFunctions_types type, std::string name,
|
||||||
|
std::function<void()> func)
|
||||||
{
|
{
|
||||||
int priority = 5;
|
int priority = 5;
|
||||||
init(type, name, priority, func);
|
init(type, name, priority, func);
|
||||||
|
@ -31,7 +31,8 @@ CatCommand test("crit_debug_print", "debug", []() {
|
|||||||
int CritSlots2 = *(unsigned *) (unk1 + (unk2 << 6) + 1788);
|
int CritSlots2 = *(unsigned *) (unk1 + (unk2 << 6) + 1788);
|
||||||
unsigned CritSlots3 = *(unsigned *) (unk1 + (unk2 << 6) + 1788);
|
unsigned CritSlots3 = *(unsigned *) (unk1 + (unk2 << 6) + 1788);
|
||||||
int CritSlots4 = *(int *) (unk1 + (unk2 << 6) + 1788);
|
int CritSlots4 = *(int *) (unk1 + (unk2 << 6) + 1788);
|
||||||
logging::Info("%u %d %d %u %d", unk1, int(CritSlots), CritSlots2, CritSlots3, CritSlots4);
|
logging::Info("%u %d %d %u %d", unk1, int(CritSlots), CritSlots2,
|
||||||
|
CritSlots3, CritSlots4);
|
||||||
});
|
});
|
||||||
int find_next_random_crit_for_weapon(IClientEntity *weapon)
|
int find_next_random_crit_for_weapon(IClientEntity *weapon)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ void CreateMove()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
if (target_entity->m_Type() != ENTITY_PLAYER)
|
if (target_entity->m_Type() == ENTITY_PLAYER)
|
||||||
{
|
{
|
||||||
static effect_chams::EffectChams Effectchams;
|
static effect_chams::EffectChams Effectchams;
|
||||||
hacks::shared::esp::SetEntityColor(target_entity, colors::pink);
|
hacks::shared::esp::SetEntityColor(target_entity, colors::pink);
|
||||||
|
@ -225,7 +225,8 @@ void reportall()
|
|||||||
// playerlist::AccessData(info.friendsID).state ==
|
// playerlist::AccessData(info.friendsID).state ==
|
||||||
// playerlist::k_EState::IPC)
|
// playerlist::k_EState::IPC)
|
||||||
// continue;
|
// continue;
|
||||||
if (player_tools::shouldTargetSteamId(info.friendsID) != player_tools::IgnoreReason::DO_NOT_IGNORE)
|
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);
|
||||||
@ -251,14 +252,17 @@ void smart_crouch()
|
|||||||
for (int i = 0; i < g_IEngine->GetMaxClients(); i++)
|
for (int i = 0; i < g_IEngine->GetMaxClients(); i++)
|
||||||
{
|
{
|
||||||
auto ent = ENTITY(i);
|
auto ent = ENTITY(i);
|
||||||
if (CE_BAD(ent) || ent->m_Type() != ENTITY_PLAYER || ent->m_iTeam() == LOCAL_E->m_iTeam() ||
|
if (CE_BAD(ent) || ent->m_Type() != ENTITY_PLAYER ||
|
||||||
|
ent->m_iTeam() == LOCAL_E->m_iTeam() ||
|
||||||
!(ent->hitboxes.GetHitbox(0)) || !(ent->m_bAlivePlayer()) ||
|
!(ent->hitboxes.GetHitbox(0)) || !(ent->m_bAlivePlayer()) ||
|
||||||
player_tools::shouldTargetSteamId(ent->player_info.friendsID) != player_tools::IgnoreReason::DO_NOT_IGNORE ||
|
player_tools::shouldTargetSteamId(ent->player_info.friendsID) !=
|
||||||
|
player_tools::IgnoreReason::DO_NOT_IGNORE ||
|
||||||
should_ignore_player(ent))
|
should_ignore_player(ent))
|
||||||
continue;
|
continue;
|
||||||
bool failedvis = false;
|
bool failedvis = false;
|
||||||
for (int j = 0; j < 18; j++)
|
for (int j = 0; j < 18; j++)
|
||||||
if (IsVectorVisible(g_pLocalPlayer->v_Eye, ent->hitboxes.GetHitbox(j)->center))
|
if (IsVectorVisible(g_pLocalPlayer->v_Eye,
|
||||||
|
ent->hitboxes.GetHitbox(j)->center))
|
||||||
failedvis = true;
|
failedvis = true;
|
||||||
if (failedvis)
|
if (failedvis)
|
||||||
continue;
|
continue;
|
||||||
@ -286,8 +290,7 @@ void smart_crouch()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add more stuffs
|
// TODO: add more stuffs
|
||||||
static HookedFunction cm(HF_CreateMove, "catbot", 5, []()
|
static HookedFunction cm(HF_CreateMove, "catbot", 5, []() {
|
||||||
{
|
|
||||||
if (!*enable)
|
if (!*enable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -445,7 +445,8 @@ void CreateMove()
|
|||||||
return;
|
return;
|
||||||
if (primary_only && enable)
|
if (primary_only && enable)
|
||||||
UpdateSlot();
|
UpdateSlot();
|
||||||
if (*stay_near && nav_enemy_cd.test_and_set(1000) && (!HasLowAmmo()) & (!HasLowHealth()))
|
if (*stay_near && nav_enemy_cd.test_and_set(1000) &&
|
||||||
|
(!HasLowAmmo()) & (!HasLowHealth()))
|
||||||
NavToEnemy();
|
NavToEnemy();
|
||||||
if (HasLowHealth() && cdr.test_and_set(5000))
|
if (HasLowHealth() && cdr.test_and_set(5000))
|
||||||
{
|
{
|
||||||
|
@ -392,7 +392,8 @@ bool isActive()
|
|||||||
const std::vector<std::string> builtin_default = {
|
const std::vector<std::string> builtin_default = {
|
||||||
"Cathook - more fun than a ball of yarn!", "GNU/Linux is the best OS!",
|
"Cathook - more fun than a ball of yarn!", "GNU/Linux is the best OS!",
|
||||||
"Visit https://github.com/nullworks/cathook for more information!",
|
"Visit https://github.com/nullworks/cathook for more information!",
|
||||||
"Cathook - Free and Open-Source tf2 cheat!", "Cathook - ca(n)t stop me meow!"
|
"Cathook - Free and Open-Source tf2 cheat!",
|
||||||
|
"Cathook - ca(n)t stop me meow!"
|
||||||
};
|
};
|
||||||
const std::vector<std::string> builtin_lennyfaces = {
|
const std::vector<std::string> builtin_lennyfaces = {
|
||||||
"( ͡° ͜ʖ ͡°)", "( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)",
|
"( ͡° ͜ʖ ͡°)", "( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)",
|
||||||
|
@ -464,7 +464,8 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
VectorAngles(vecMove, angMoveReverse);
|
VectorAngles(vecMove, angMoveReverse);
|
||||||
cmd->forwardmove = -flLength;
|
cmd->forwardmove = -flLength;
|
||||||
cmd->sidemove = 0.0f; // Move only backwards, no sidemove
|
cmd->sidemove = 0.0f; // Move only backwards, no sidemove
|
||||||
float res = g_pLocalPlayer->v_OrigViewangles.y - angMoveReverse.y;
|
float res =
|
||||||
|
g_pLocalPlayer->v_OrigViewangles.y - angMoveReverse.y;
|
||||||
while (res > 180)
|
while (res > 180)
|
||||||
res -= 360;
|
res -= 360;
|
||||||
while (res < -180)
|
while (res < -180)
|
||||||
|
@ -46,7 +46,22 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
}
|
}
|
||||||
int loop_index, s, i, j;
|
int loop_index, s, i, j;
|
||||||
char *data, c;
|
char *data, c;
|
||||||
|
if (type == 5)
|
||||||
|
if (buf.GetNumBytesLeft() > 35)
|
||||||
|
{
|
||||||
|
std::string message_name{};
|
||||||
|
for (int i = 0; i < buf.GetNumBytesLeft(); i++)
|
||||||
|
{
|
||||||
|
int byte = buf.ReadByte();
|
||||||
|
if (byte == 0)
|
||||||
|
break;
|
||||||
|
message_name.push_back(byte);
|
||||||
|
}
|
||||||
|
if (message_name.find("TF_Autobalance_TeamChangePending") !=
|
||||||
|
std::string::npos)
|
||||||
|
logging::Info("test, %d %d", int(message_name[0]),
|
||||||
|
(CE_GOOD(LOCAL_E) ? LOCAL_E->m_IDX : -1));
|
||||||
|
}
|
||||||
if (type == 4)
|
if (type == 4)
|
||||||
{
|
{
|
||||||
loop_index = 0;
|
loop_index = 0;
|
||||||
@ -61,7 +76,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
std::string message;
|
std::string message;
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
while ((c = data[j++]) && (loop_index < 128))
|
while ((c = data[j++]) && (loop_index < 150))
|
||||||
{
|
{
|
||||||
loop_index++;
|
loop_index++;
|
||||||
if (clean_chat)
|
if (clean_chat)
|
||||||
@ -77,9 +92,9 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
{
|
{
|
||||||
if (sizeof(*chat_filter) < 10)
|
if (sizeof(*chat_filter) < 10)
|
||||||
{
|
{
|
||||||
std::string tmp = {};
|
std::string tmp{};
|
||||||
std::string tmp2 = {};
|
std::string tmp2{};
|
||||||
int iii = 0;
|
int iii{};
|
||||||
player_info_s info;
|
player_info_s info;
|
||||||
g_IEngine->GetPlayerInfo(LOCAL_E->m_IDX, &info);
|
g_IEngine->GetPlayerInfo(LOCAL_E->m_IDX, &info);
|
||||||
std::string name1 = info.name;
|
std::string name1 = info.name;
|
||||||
@ -120,6 +135,9 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
}
|
}
|
||||||
for (char i : name1)
|
for (char i : name1)
|
||||||
{
|
{
|
||||||
|
if (i == ' ')
|
||||||
|
;
|
||||||
|
continue;
|
||||||
if (iii == 2)
|
if (iii == 2)
|
||||||
{
|
{
|
||||||
iii = 0;
|
iii = 0;
|
||||||
@ -136,6 +154,9 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
iii = 0;
|
iii = 0;
|
||||||
for (char i : name1)
|
for (char i : name1)
|
||||||
{
|
{
|
||||||
|
if (i == ' ')
|
||||||
|
;
|
||||||
|
continue;
|
||||||
if (iii == 3)
|
if (iii == 3)
|
||||||
{
|
{
|
||||||
iii = 0;
|
iii = 0;
|
||||||
@ -171,6 +192,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
}
|
}
|
||||||
std::string message2 = message;
|
std::string message2 = message;
|
||||||
boost::to_lower(message2);
|
boost::to_lower(message2);
|
||||||
|
boost::replace_all(message2, " ", "");
|
||||||
boost::replace_all(message2, "4", "a");
|
boost::replace_all(message2, "4", "a");
|
||||||
boost::replace_all(message2, "3", "e");
|
boost::replace_all(message2, "3", "e");
|
||||||
boost::replace_all(message2, "0", "o");
|
boost::replace_all(message2, "0", "o");
|
||||||
|
@ -23,21 +23,25 @@ DEFINE_HOOKED_METHOD(Shutdown, void, INetChannel *this_, const char *reason)
|
|||||||
logging::Info("Disconnect: %s", reason);
|
logging::Info("Disconnect: %s", reason);
|
||||||
if (strstr(reason, "Generic_Kicked"))
|
if (strstr(reason, "Generic_Kicked"))
|
||||||
{
|
{
|
||||||
if (*die_if_vac) {
|
if (*die_if_vac)
|
||||||
static uintptr_t addr =
|
{
|
||||||
gSignatures.GetClientSignature("C7 04 24 ? ? ? ? 8D 7D ? 31 F6");
|
static uintptr_t addr = gSignatures.GetClientSignature(
|
||||||
|
"C7 04 24 ? ? ? ? 8D 7D ? 31 F6");
|
||||||
static uintptr_t offset0 = uintptr_t(*(uintptr_t *) (addr + 0x3));
|
static uintptr_t offset0 = uintptr_t(*(uintptr_t *) (addr + 0x3));
|
||||||
static uintptr_t offset1 = gSignatures.GetClientSignature(
|
static uintptr_t offset1 = gSignatures.GetClientSignature(
|
||||||
"55 89 E5 83 EC ? 8B 45 ? 8B 80 ? ? ? ? 85 C0 74 ? C7 44 24 ? ? ? ? ? "
|
"55 89 E5 83 EC ? 8B 45 ? 8B 80 ? ? ? ? 85 C0 74 ? C7 44 24 ? "
|
||||||
|
"? ? ? ? "
|
||||||
"89 04 24 E8 ? ? ? ? 85 C0 74 ? 8B 40");
|
"89 04 24 E8 ? ? ? ? 85 C0 74 ? 8B 40");
|
||||||
typedef int (*GetPendingInvites_t)(uintptr_t);
|
typedef int (*GetPendingInvites_t)(uintptr_t);
|
||||||
GetPendingInvites_t GetPendingInvites = GetPendingInvites_t(offset1);
|
GetPendingInvites_t GetPendingInvites =
|
||||||
|
GetPendingInvites_t(offset1);
|
||||||
int invites = GetPendingInvites(offset0);
|
int invites = GetPendingInvites(offset0);
|
||||||
|
|
||||||
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 (gc && !gc->BConnectedToMatchServer(false) && !gc->BHaveLiveMatch() &&
|
if (gc && !gc->BConnectedToMatchServer(false) &&
|
||||||
!invites)
|
!gc->BHaveLiveMatch() && !invites)
|
||||||
if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue())))
|
if (!(pc && pc->BInQueueForMatchGroup(tfmm::getQueue())))
|
||||||
{
|
{
|
||||||
logging::Info("VAC/Matchmaking banned");
|
logging::Info("VAC/Matchmaking banned");
|
||||||
|
@ -35,13 +35,13 @@ static bool identify_stale{ false };
|
|||||||
static std::string api_key{};
|
static std::string api_key{};
|
||||||
|
|
||||||
static CatCommand login("online_login", "Login", [](const CCommand &args) {
|
static CatCommand login("online_login", "Login", [](const CCommand &args) {
|
||||||
if (args.ArgC() != 3)
|
if (args.ArgC() != 2)
|
||||||
{
|
{
|
||||||
logging::Info("\nUsage: online_login <API_KEY> \"<IP:PORT>\"\nKey will "
|
logging::Info("\nUsage: online_login <API_KEY> \nKey will "
|
||||||
"be saved in your data folder");
|
"be saved in your data folder");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::string host(args.Arg(2));
|
std::string host("cathook-online.inkcat.net:8000");
|
||||||
logging::Info("[CO] Host = %s", host.c_str());
|
logging::Info("[CO] Host = %s", host.c_str());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
0
src/settings/Settings.cpp
Executable file → Normal file
0
src/settings/Settings.cpp
Executable file → Normal file
@ -89,7 +89,8 @@ int prevcolor = -1;
|
|||||||
rgba_t EffectChams::ChamsColor(IClientEntity *entity)
|
rgba_t EffectChams::ChamsColor(IClientEntity *entity)
|
||||||
{
|
{
|
||||||
if (!isHackActive() || !*enable)
|
if (!isHackActive() || !*enable)
|
||||||
return colors::empty;;
|
return colors::empty;
|
||||||
|
;
|
||||||
CachedEntity *ent = ENTITY(entity->entindex());
|
CachedEntity *ent = ENTITY(entity->entindex());
|
||||||
if (disco_chams)
|
if (disco_chams)
|
||||||
{
|
{
|
||||||
|
@ -72,8 +72,7 @@ void DrawCheatVisuals()
|
|||||||
GUIColor()); // github commit and date
|
GUIColor()); // github commit and date
|
||||||
AddSideString(hack::GetType(), GUIColor()); // Compile type
|
AddSideString(hack::GetType(), GUIColor()); // Compile type
|
||||||
#if ENABLE_GUI
|
#if ENABLE_GUI
|
||||||
AddSideString(
|
AddSideString("Press 'INSERT' key to open/close cheat menu.",
|
||||||
"Press 'INSERT' key to open/close cheat menu.",
|
|
||||||
GUIColor());
|
GUIColor());
|
||||||
AddSideString("Use mouse to navigate in menu.", GUIColor());
|
AddSideString("Use mouse to navigate in menu.", GUIColor());
|
||||||
#endif
|
#endif
|
||||||
|
3
src/visual/menu/GuiInterface.cpp
Executable file → Normal file
3
src/visual/menu/GuiInterface.cpp
Executable file → Normal file
@ -98,7 +98,8 @@ static void initPlayerlist()
|
|||||||
});
|
});
|
||||||
controller->setOpenSteamCallback([](unsigned steam) {
|
controller->setOpenSteamCallback([](unsigned steam) {
|
||||||
CSteamID id{};
|
CSteamID id{};
|
||||||
id.Set(steam, EUniverse::k_EUniversePublic, EAccountType::k_EAccountTypeIndividual);
|
id.Set(steam, EUniverse::k_EUniversePublic,
|
||||||
|
EAccountType::k_EAccountTypeIndividual);
|
||||||
g_ISteamFriends->ActivateGameOverlayToUser("steamid", id);
|
g_ISteamFriends->ActivateGameOverlayToUser("steamid", id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user