Remove airstuck

This commit is contained in:
nullifiedcat 2017-04-21 15:59:55 +03:00
parent f149105f79
commit ae0fcb087a
12 changed files with 17 additions and 152 deletions

View File

@ -31,7 +31,7 @@ void GUIVisibleCallback(IConVar* var, const char* pOldValue, float flOldValue) {
CatVar gui_visible(CV_SWITCH, "gui_visible", "0", "GUI Active", "GUI switch (bind it to a key!)"); CatVar gui_visible(CV_SWITCH, "gui_visible", "0", "GUI Active", "GUI switch (bind it to a key!)");
CatVar gui_draw_bounds(CV_SWITCH, "gui_bounds", "0", "Draw Bounds", "Draw GUI elements' bounding boxes"); CatVar gui_draw_bounds(CV_SWITCH, "gui_bounds", "0", "Draw Bounds", "Draw GUI elements' bounding boxes");
CatVar gui_nullcore(CV_SWITCH, "gui_nullcore", "1", "NullCore GUI", "Use NullCoreCheat GUI"); //CatVar gui_nullcore(CV_SWITCH, "gui_nullcore", "1", "NullCore GUI", "Use NullCoreCheat GUI");
CatGUI::CatGUI() { CatGUI::CatGUI() {
root_nullcore = nullptr; root_nullcore = nullptr;

View File

@ -33,7 +33,7 @@ int GUIColor();
extern CatVar gui_visible; extern CatVar gui_visible;
extern CatVar gui_draw_bounds; extern CatVar gui_draw_bounds;
extern CatVar gui_nullcore; constexpr bool gui_nullcore = true;
class CatGUI { class CatGUI {
public: public:

View File

@ -17,7 +17,7 @@ ItemVariable::ItemVariable(CatVar& variable) : Item("ncc_item_variable_" + varia
void ItemVariable::Update() { void ItemVariable::Update() {
Item::Update(); Item::Update();
if (catvar.desc_long.length() && IsHovered()) if (catvar.desc_long.length() && IsHovered() && catvar.desc_long != "no description")
ShowTooltip(catvar.desc_long); ShowTooltip(catvar.desc_long);
} }

View File

@ -37,45 +37,6 @@ void Init() {
font_item = g_ISurface->CreateFont(); font_item = g_ISurface->CreateFont();
g_ISurface->SetFontGlyphSet(font_title, "Verdana Bold", 14, 0, 0, 0, 0x0); g_ISurface->SetFontGlyphSet(font_title, "Verdana Bold", 14, 0, 0, 0, 0x0);
g_ISurface->SetFontGlyphSet(font_item, "Verdana", 12, 0, 0, 0, 0x0); g_ISurface->SetFontGlyphSet(font_item, "Verdana", 12, 0, 0, 0, 0x0);
// TODO add stuff
/*List* aimbot_list = new List("Aim Bot Menu");
aimbot_list->FillWithCatVars({
"aimbot_enabled", "aimbot_fov", "aimbot_aimkey", "aimbot_aimkey_mode", "aimbot_hitboxmode", "aimbot_hitbox",
"aimbot_silent", "aimbot_prioritymode", "aimbot_autoshoot", "aimbot_zoomed", "aimbot_teammates", "aimbot_buildings", "aimbot_respect_cloak",
"aimbot_projectile"
});
List* aimbot_list_projectile = new List("Projectile Aimbot");
aimbot_list_projectile->FillWithCatVars({
"aimbot_huntsman_charge", "aimbot_full_auto_huntsman",
"aimbot_proj_fovpred", "aimbot_proj_vispred", "aimbot_proj_gravity", "aimbot_proj_speed"
});
aimbot_list->AddChild(new ItemSublist("Projectile Aimbot Tweaks", aimbot_list_projectile));
aimbot_list->FillWithCatVars({
"aimbot_only_when_can_shoot", "aimbot_enable_attack_only", "aimbot_maxrange", "aimbot_interp"
});
//aimbot_list->FillWithCatVars(FindCatVars("aimbot_"));
MainList().AddChild(new ItemSublist("Aim Bot", aimbot_list));
List* triggerbot_list = new List("Trigger Bot Menu");
triggerbot_list->FillWithCatVars(FindCatVars("trigger_"));
MainList().AddChild(new ItemSublist("Trigger Bot", triggerbot_list));
//MainList().AddChild(new ItemSublist("Accuracy", nullptr));
// Fake Lag
List* esp_list = new List("ESP Menu");
esp_list->FillWithCatVars(FindCatVars("esp_"));
MainList().AddChild(new ItemSublist("ESP", esp_list));
MainList().Show();
// Radar
/*MainList().AddChild(new ItemSublist("Bunny Hop", nullptr));
MainList().AddChild(new ItemSublist("Air Stuck", nullptr));
// Speed Hack
MainList().AddChild(new ItemSublist("Anti-Aim", nullptr));
// Name Stealer
MainList().AddChild(new ItemSublist("Chat Spam", nullptr));
MainList().AddChild(new ItemSublist("Misc", nullptr));
// Info Panel
MainList().AddChild(new ItemSublist("Ignore Settings", nullptr));
MainList().AddChild(new ItemSublist("Cheat Settings", nullptr));*/
} }
static const std::string list_hl2dm = R"( static const std::string list_hl2dm = R"(
@ -479,7 +440,6 @@ static const std::string list_tf2 = R"(
"gui_rainbow" "gui_rainbow"
"fast_outline" "fast_outline"
"gui_bounds" "gui_bounds"
"gui_nullcore"
"gui_visible" "gui_visible"
] ]
"Miscellaneous" [ "Miscellaneous" [
@ -562,11 +522,6 @@ static const std::string list_tf2 = R"(
"antibackstab_distance" "antibackstab_distance"
"antibackstab_silent" "antibackstab_silent"
] ]
"Airstuck" [
"Airstuck Menu"
"airstuck"
"airstuck_toggle"
]
"bhop_enabled" "bhop_enabled"
"noisemaker" "noisemaker"
"fast_vischeck" "fast_vischeck"

View File

@ -24,7 +24,7 @@ void Root::Update() {
void Root::Draw(int x, int y) { void Root::Draw(int x, int y) {
if (tooltip->IsVisible()) { if (tooltip->IsVisible()) {
tooltip->SetOffset(g_pGUI->m_iMouseX + 8, g_pGUI->m_iMouseY + 8); tooltip->SetOffset(g_pGUI->m_iMouseX + 24, g_pGUI->m_iMouseY + 8);
} }
CBaseContainer::Draw(x, y); CBaseContainer::Draw(x, y);
} }
@ -35,7 +35,7 @@ void Root::Setup() {
AddChild(&menu::ncc::MainList()); AddChild(&menu::ncc::MainList());
AddChild(new Radar()); AddChild(new Radar());
menu::ncc::MainList().Show(); menu::ncc::MainList().Show();
menu::ncc::MainList().SetOffset(500, 500); menu::ncc::MainList().SetOffset(draw::width / 2, draw::height / 2);
} }
void Root::OnKeyPress(ButtonCode_t key, bool repeat) { void Root::OnKeyPress(ButtonCode_t key, bool repeat) {

View File

@ -12,7 +12,7 @@
namespace menu { namespace ncc { namespace menu { namespace ncc {
Tooltip::Tooltip() : CTextLabel("ncc_tooltip") { Tooltip::Tooltip() : CTextLabel("ncc_tooltip") {
SetZIndex(999); SetZIndex(999);
SetPadding(2, 1); SetPadding(2, 1);
SetMaxSize(220, -1); SetMaxSize(220, -1);
SetAutoSize(false); SetAutoSize(false);

View File

@ -1,45 +0,0 @@
/*
* Airstuck.cpp
*
* Created on: Nov 26, 2016
* Author: nullifiedcat
*/
#include "Airstuck.h"
#include "../common.h"
#include "../sdk.h"
#include "../netmessage.h"
namespace hacks { namespace shared { namespace airstuck {
CatVar stuck(CV_KEY, "airstuck", "0", "Airstuck key");
CatVar stuck_toggle(CV_SWITCH, "airstuck_toggle", "0", "Airstuck toggle", "Use this in bot instances/when using phlog to block cart!");
void SendNOP() {
INetChannel* ch = (INetChannel*)g_IEngine->GetNetChannelInfo();
NET_NOP packet;
packet.SetNetChannel(ch);
packet.SetReliable(false);
ch->SendNetMsg(packet);
}
void CreateMove() {
if (IsStuck()) {
if (g_GlobalVars->tickcount % 60 == 0) {
SendNOP();
}
}
}
bool IsStuck() {
if (g_Settings.bInvalid || (g_pUserCmd->buttons & (IN_ATTACK | IN_ATTACK2))) return false;
return (g_IInputSystem->IsButtonDown((ButtonCode_t)int(stuck)) || stuck_toggle);
}
void Reset() {
stuck_toggle = false;
}
}}}

View File

@ -1,24 +0,0 @@
/*
* Airstuck.h
*
* Created on: Nov 26, 2016
* Author: nullifiedcat
*/
#ifndef HACKS_AIRSTUCK_H_
#define HACKS_AIRSTUCK_H_
#include "IHack.h"
namespace hacks { namespace shared { namespace airstuck {
extern CatVar stuck;
void SendNOP();
void CreateMove();
bool IsStuck();
void Reset();
}}}
#endif /* HACKS_AIRSTUCK_H_ */

View File

@ -9,7 +9,6 @@
#define HACKS_HACKLIST_H_ #define HACKS_HACKLIST_H_
#include "Aimbot.h" #include "Aimbot.h"
#include "Airstuck.h"
#include "AntiAim.h" #include "AntiAim.h"
#include "AntiDisguise.h" #include "AntiDisguise.h"
#include "AutoHeal.h" #include "AutoHeal.h"

View File

@ -69,7 +69,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
hooks::hkNetChannel = new hooks::VMTHook(); hooks::hkNetChannel = new hooks::VMTHook();
hooks::hkNetChannel->Init(ch, 0); hooks::hkNetChannel->Init(ch, 0);
hooks::hkNetChannel->HookMethod((void*)CanPacket_hook, hooks::offCanPacket); hooks::hkNetChannel->HookMethod((void*)CanPacket_hook, hooks::offCanPacket);
hooks::hkNetChannel->HookMethod((void*)SendNetMsg_hook, hooks::offSendNetMsg); //hooks::hkNetChannel->HookMethod((void*)SendNetMsg_hook, hooks::offSendNetMsg);
hooks::hkNetChannel->HookMethod((void*)Shutdown_hook, hooks::offShutdown); hooks::hkNetChannel->HookMethod((void*)Shutdown_hook, hooks::offShutdown);
hooks::hkNetChannel->Apply(); hooks::hkNetChannel->Apply();
} }
@ -79,10 +79,6 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
bool time_replaced = false; bool time_replaced = false;
float curtime_old = g_GlobalVars->curtime; float curtime_old = g_GlobalVars->curtime;
if (hacks::shared::airstuck::IsStuck()) {
return ret;
}
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) { if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) {
float servertime = (float)CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick; float servertime = (float)CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick;
g_GlobalVars->curtime = servertime; g_GlobalVars->curtime = servertime;

View File

@ -99,17 +99,15 @@ void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
#endif #endif
} }
if (!hacks::shared::airstuck::IsStuck()) { if (CE_GOOD(g_pLocalPlayer->entity) && !g_Settings.bInvalid) {
if (CE_GOOD(g_pLocalPlayer->entity) && !g_Settings.bInvalid) { // FIXME
// FIXME //if (TF2) SAFE_CALL(hacks::tf2::antibackstab::PaintTraverse());
//if (TF2) SAFE_CALL(hacks::tf2::antibackstab::PaintTraverse()); if (TF) SAFE_CALL(hacks::tf2::antidisguise::Draw());
if (TF) SAFE_CALL(hacks::tf2::antidisguise::Draw()); SAFE_CALL(hacks::shared::misc::Draw());
SAFE_CALL(hacks::shared::misc::Draw()); SAFE_CALL(hacks::shared::esp::Draw());
SAFE_CALL(hacks::shared::esp::Draw()); if (TF) SAFE_CALL(hacks::tf::spyalert::Draw());
if (TF) SAFE_CALL(hacks::tf::spyalert::Draw()); if (TF) SAFE_CALL(hacks::tf::radar::Draw());
if (TF) SAFE_CALL(hacks::tf::radar::Draw()); //hacks::shared::followbot::PrintDebug();
//hacks::shared::followbot::PrintDebug();
}
} }

View File

@ -107,6 +107,7 @@ static CatCommand minus_use_action_slot_item_server("-cat_use_action_slot_item_s
g_IEngine->ServerCmdKeyValues(kv); g_IEngine->ServerCmdKeyValues(kv);
}); });
// Not used anymore..
bool SendNetMsg_hook(void* thisptr, INetMessage& msg, bool bForceReliable = false, bool bVoice = false) { bool SendNetMsg_hook(void* thisptr, INetMessage& msg, bool bForceReliable = false, bool bVoice = false) {
SEGV_BEGIN; SEGV_BEGIN;
if (log_sent && msg.GetType() != 3 && msg.GetType() != 9) { if (log_sent && msg.GetType() != 3 && msg.GetType() != 9) {
@ -122,19 +123,6 @@ bool SendNetMsg_hook(void* thisptr, INetMessage& msg, bool bForceReliable = fals
} }
logging::Info("%i bytes => %s", buffer.GetNumBytesWritten(), bytes.c_str()); logging::Info("%i bytes => %s", buffer.GetNumBytesWritten(), bytes.c_str());
} }
//logging::Info("Sending NetMsg! %i", msg.GetType());
if (hacks::shared::airstuck::IsStuck() && cathook && !g_Settings.bInvalid) {
switch (msg.GetType()) {
case net_NOP:
case net_SignonState:
case net_StringCmd:
case 16: // cmdKeyValues
break;
default:
//logging::Info("Blocked net message %i %s", msg.GetType(), msg.GetName());
return false;
}
}
return ((SendNetMsg_t*)hooks::hkNetChannel->GetMethod(hooks::offSendNetMsg))(thisptr, msg, bForceReliable, bVoice); return ((SendNetMsg_t*)hooks::hkNetChannel->GetMethod(hooks::offSendNetMsg))(thisptr, msg, bForceReliable, bVoice);
SEGV_END; SEGV_END;
return false; return false;
@ -298,7 +286,6 @@ void LevelInit_hook(void* thisptr, const char* newmap) {
((LevelInit_t*) hooks::hkClientMode->GetMethod(hooks::offLevelInit))(thisptr, newmap); ((LevelInit_t*) hooks::hkClientMode->GetMethod(hooks::offLevelInit))(thisptr, newmap);
g_IEngine->ClientCmd_Unrestricted("exec cat_matchexec"); g_IEngine->ClientCmd_Unrestricted("exec cat_matchexec");
hacks::shared::aimbot::Reset(); hacks::shared::aimbot::Reset();
hacks::shared::airstuck::Reset();
// LEVEL_SHUTDOWN(FollowBot); // LEVEL_SHUTDOWN(FollowBot);
//if (TF) LEVEL_INIT(SpyAlert); //if (TF) LEVEL_INIT(SpyAlert);
chat_stack::Reset(); chat_stack::Reset();
@ -311,7 +298,6 @@ void LevelShutdown_hook(void* thisptr) {
((LevelShutdown_t*) hooks::hkClientMode->GetMethod(hooks::offLevelShutdown))(thisptr); ((LevelShutdown_t*) hooks::hkClientMode->GetMethod(hooks::offLevelShutdown))(thisptr);
g_Settings.bInvalid = true; g_Settings.bInvalid = true;
hacks::shared::aimbot::Reset(); hacks::shared::aimbot::Reset();
hacks::shared::airstuck::Reset();
chat_stack::Reset(); chat_stack::Reset();
hacks::shared::spam::Reset(); hacks::shared::spam::Reset();
} }