diff --git a/.gitignore b/.gitignore
index f61acd3c..d7f77315 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,253 @@
-*.d
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+[Xx]64/
+[Xx]86/
+[Bb]uild/
+bld/
+[Bb]in/
+[Oo]bj/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+
+# TODO: Un-comment the next line if you do not want to checkin
+# your web deploy settings because they may include unencrypted
+# passwords
+#*.pubxml
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directory
+AppPackages/
+BundleArtifacts/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# LightSwitch generated files
+GeneratedArtifacts/
+ModelManifest.xml
+
+# Paket dependency manager
+.paket/paket.exe
+
+# FAKE - F# Make
+.fake/
+
+
+## Ignore .o and .d files (objects and dependencies)
*.o
-/bin/*
+*.d
+
+# Don't ignore binary resource files
!res/bin/*
-/core
-Debug/
-.vs/cathook/v15/Browse.VC.db
-TFLOC
-Data Folder
\ No newline at end of file
+
+## Ignore Data Folder symlink
+Data Folder
diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json
deleted file mode 100644
index f8b48885..00000000
--- a/.vs/ProjectSettings.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "CurrentProjectSetting": null
-}
\ No newline at end of file
diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
deleted file mode 100644
index 62afdc15..00000000
--- a/.vs/VSWorkspaceState.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "ExpandedNodes": [
- "",
- "\\src",
- "\\src\\hacks"
- ],
- "PreviewInSolutionExplorer": false
-}
\ No newline at end of file
diff --git a/.vs/cathook/v15/.suo b/.vs/cathook/v15/.suo
deleted file mode 100644
index 831440fc..00000000
Binary files a/.vs/cathook/v15/.suo and /dev/null differ
diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite
deleted file mode 100644
index 0b906d87..00000000
Binary files a/.vs/slnx.sqlite and /dev/null differ
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..fe498407
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at nullifiedcat+contact@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/README.md b/README.md
index 758e0f62..a32d4f0f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,24 @@
# Cathook Multihack
-
+
+
+cathook is a multihack for Team Fortress 2 for Linux. cathook includes some joke features like
+
+* Always/Never spycrab
+* Ignore Hoovy
+* 100% Casual/Comp coin flip hack
+* Encrypted chat
+* Emoji ESP
+* Fidget Spinner crosshair
+
+and a lot of useful features, including
+
+* Anti Backstab with option to say "No" voice command when spy tries to backstab you
+* Heal Arrows hack (overheal an enemy for 1200 health with single huntsman arrow, you can also do it with buildings!)
+* Extremely customizable spam (you can make spam lines that'll include name of random dead enemy pyro or sniper)
+* Follow Bots
+* Working crit hack
+
+[FULL LIST OF FEATURES HERE](https://github.com/nullifiedcat/cathook/wiki/List-of-features)
# Discord Server
[Official Discord Server](https://discord.gg/kvNVNSX)
@@ -14,13 +33,13 @@ sudo apt update && sudo apt install build-essential software-properties-common -
Arch dependencies installation::
```bash
-sudo pacman -Syu && sudo pacman -S gdb gdb-common glew1.10 lib32-glew1.10 --noconfirm && yes | sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz
+sudo pacman -Syu && sudo pacman -S gdb gdb-common glew1.10 lib32-glew1.10 rsync --noconfirm && yes | sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz
```
Cathook installation script:
```bash
-git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-data
+git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && bash build-tf2 && bash update-data
```
**Errors while installing?**
diff --git a/banner.png b/banner.png
new file mode 100644
index 00000000..95872206
Binary files /dev/null and b/banner.png differ
diff --git a/cathook.vcxproj.user b/cathook.vcxproj.user
deleted file mode 100644
index 0b0f24d5..00000000
--- a/cathook.vcxproj.user
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- true
-
-
\ No newline at end of file
diff --git a/libcathook.so b/libcathook.so
deleted file mode 100755
index 00d98889..00000000
Binary files a/libcathook.so and /dev/null differ
diff --git a/make-nogui.sh b/make-nogui.sh
index 7acdeb48..fddbff17 100755
--- a/make-nogui.sh
+++ b/make-nogui.sh
@@ -1 +1,2 @@
-make -j4 -e NOGUI=1
\ No newline at end of file
+#!/bin/bash
+make -j4 -e NOGUI=1
diff --git a/simple-ipc b/simple-ipc
index e532876f..94a287d6 160000
--- a/simple-ipc
+++ b/simple-ipc
@@ -1 +1 @@
-Subproject commit e532876ffd707a48389d54ff904dcc40a84f2839
+Subproject commit 94a287d6faa00d44e1084b04e602842849858443
diff --git a/src/EffectGlow.cpp b/src/EffectGlow.cpp
index 3df4bf94..61b6c247 100644
--- a/src/EffectGlow.cpp
+++ b/src/EffectGlow.cpp
@@ -35,7 +35,7 @@ static CatVar buildings(CV_SWITCH, "glow_buildings", "0", "Buildings", "Render g
static CatVar stickies(CV_SWITCH, "glow_stickies", "0", "Stickies", "Render glow on stickybombs");
static CatVar teammate_buildings(CV_SWITCH, "glow_teammate_buildings", "0", "Teammate Buildings", "Render glow on teammates buildings");
static CatVar powerups(CV_SWITCH, "glow_powerups", "1", "Powerups");
-//static CatVar weapons_white(CV_SWITCH, "glow_weapons_white", "1", "White Weapon Glow", "Weapons will glow white");
+static CatVar weapons_white(CV_SWITCH, "glow_weapons_white", "1", "White Weapon Glow", "Weapons will glow white");
struct ShaderStencilState_t
{
@@ -332,7 +332,15 @@ void EffectGlow::DrawEntity(IClientEntity* entity) {
attach = g_IEntityList->GetClientEntity(*(int*)((uintptr_t)entity + netvar.m_Collision - 24) & 0xFFF);
while (attach && passes++ < 32) {
if (attach->ShouldDraw()) {
- attach->DrawModel(1);
+ if (weapons_white && entity->GetClientClass()->m_ClassID == RCC_PLAYER && vfunc(attach, 190, 0)(attach)) {
+ rgba_t mod_original;
+ g_IVRenderView->GetColorModulation(mod_original.rgba);
+ g_IVRenderView->SetColorModulation(colors::white);
+ attach->DrawModel(1);
+ g_IVRenderView->SetColorModulation(mod_original.rgba);
+ }
+ else
+ attach->DrawModel(1);
}
attach = g_IEntityList->GetClientEntity(*(int*)((uintptr_t)attach + netvar.m_Collision - 20) & 0xFFF);
}
diff --git a/src/conditions.h b/src/conditions.h
index 3ef2b189..2717407a 100644
--- a/src/conditions.h
+++ b/src/conditions.h
@@ -255,7 +255,7 @@ inline void CondBitSet(condition_data_s& data) {
template
inline bool HasCondition(CachedEntity* ent) {
IF_GAME (!IsTF()) return false;
- IF_GAME (IsTF2()) {
+ IF_GAME (IsTF2() && cond < condition(96)) {
if (CondBitCheck(CE_VAR(ent, netvar._condition_bits, condition_data_s))) return true;
}
return CondBitCheck(CE_VAR(ent, netvar.iCond, condition_data_s));
diff --git a/src/gui/GUI.cpp b/src/gui/GUI.cpp
index a353745e..44901895 100644
--- a/src/gui/GUI.cpp
+++ b/src/gui/GUI.cpp
@@ -36,6 +36,8 @@ CatVar gui_color_r(CV_INT, "gui_color_r", "255", "Main GUI color (red)", "Define
CatVar gui_color_g(CV_INT, "gui_color_g", "105", "Main GUI color (green)", "Defines green component of main gui color", 0, 255);
CatVar gui_color_b(CV_INT, "gui_color_b", "180", "Main GUI color (blue)", "Defines blue component of main gui color", 0, 255);
+CatVar gui_debug(CV_SWITCH, "gui_debug", "0", "Debug GUI");
+
static CatVar gui_rainbow(CV_SWITCH, "gui_rainbow", "0", "Rainbow GUI", "RGB all the things!!!");
rgba_t GUIColor() {
return gui_rainbow ? colors::RainbowCurrent() : colors::FromRGBA8(int(gui_color_r), int(gui_color_g), int(gui_color_b), 255);
@@ -84,18 +86,19 @@ void CatGUI::Update() {
m_bPressedState[i] = down;
if (m_bKeysInit) {
if (changed) {
- //logging::Info("Key %d changed, now %d", i, down);
+ if (gui_debug) {
+ logging::Info("Key %d changed, now %d", i, down);
+ }
if (i == ButtonCode_t::MOUSE_LEFT) {
if (Visible()) {
// Mouse is pressed.
}
} else if (down) {
if ((i == ButtonCode_t::KEY_INSERT || i == ButtonCode_t::KEY_F11)) {
- if (gui_visible) {
- gui_visible = 0;
- } else {
- gui_visible = 1;
+ if (gui_debug) {
+ logging::Info("GUI key pressed");
}
+ gui_visible = !gui_visible;
}
}
}
diff --git a/src/gui/im/Im.cpp b/src/gui/im/Im.cpp
index 3d2993d7..c3ce75d6 100644
--- a/src/gui/im/Im.cpp
+++ b/src/gui/im/Im.cpp
@@ -29,13 +29,17 @@ void CatVar_Integer(CatVar& var) {
ImGui::PushID(var.id);
int value = var;
- ImGui::PushItemWidth(75.0f);
- if (ImGui::SliderInt(label, &value, minval, maxval)) {
+ ImGui::PushItemWidth(120.0f);
+ int step = var.restricted ? (var.max - var.min) / 50 : 1;
+ if (ImGui::InputInt(label, &value, step, step * 20)) {
var = value;
}
+ /*if (ImGui::SliderInt(label, &value, minval, maxval)) {
+ var = value;
+ }*/
if (ImGui::IsItemHovered() && var.desc_long.size()) {
ImGui::BeginTooltip();
- ImGui::Text(var.desc_long.c_str());
+ ImGui::Text("%s", var.desc_long.c_str());
ImGui::EndTooltip();
}
@@ -56,13 +60,17 @@ void CatVar_Float(CatVar& var) {
ImGui::PushID(var.id);
float value = var;
- ImGui::PushItemWidth(75.0f);
- if (ImGui::SliderFloat(label, &value, minval, maxval)) {
+ ImGui::PushItemWidth(120.0f);
+ float step = var.restricted ? (var.max - var.min) / 50 : 1;
+ if (ImGui::InputFloat(label, &value, step, step * 20)) {
var = value;
}
+ /*if (ImGui::SliderFloat(label, &value, minval, maxval)) {
+ var = value;
+ }*/
if (ImGui::IsItemHovered() && var.desc_long.size()) {
ImGui::BeginTooltip();
- ImGui::Text(var.desc_long.c_str());
+ ImGui::Text("%s", var.desc_long.c_str());
ImGui::EndTooltip();
}
@@ -106,6 +114,12 @@ void CatVar_String(CatVar& var) {
var.SetValue(std::string(buf));
}
+ if (ImGui::IsItemHovered() && var.desc_long.size()) {
+ ImGui::BeginTooltip();
+ ImGui::Text("%s", var.desc_long.c_str());
+ ImGui::EndTooltip();
+ }
+
ImGui::PopID();
}
@@ -114,7 +128,7 @@ void CatVar_Key(CatVar& var) {
if (!keys_array) {
keys_array = new const char*[ButtonCode_t::BUTTON_CODE_COUNT];
for (int i = 0; i < ButtonCode_t::BUTTON_CODE_COUNT; i++) {
- keys_array[i] = g_IInputSystem->ButtonCodeToString((ButtonCode_t)i);
+ keys_array[i] = g_IInputSystem->ButtonCodeToString(ButtonCode_t(i));
}
}
@@ -130,7 +144,7 @@ void CatVar_Key(CatVar& var) {
}
if (ImGui::IsItemHovered() && var.desc_long.size()) {
ImGui::BeginTooltip();
- ImGui::Text(var.desc_long.c_str());
+ ImGui::Text("%s", var.desc_long.c_str());
ImGui::EndTooltip();
}
@@ -150,7 +164,7 @@ void CatVar_Switch(CatVar& var) {
}
if (ImGui::IsItemHovered() && var.desc_long.size()) {
ImGui::BeginTooltip();
- ImGui::Text(var.desc_long.c_str());
+ ImGui::Text("%s", var.desc_long.c_str());
ImGui::EndTooltip();
}
@@ -252,6 +266,72 @@ void imgui_easy_theming(ImVec3 color_for_text, ImVec3 color_for_head, ImVec3 col
void Render() {
static bool styles_setup = false;
if (!styles_setup) {
+ ImGuiStyle * style = &ImGui::GetStyle();
+
+ style->WindowPadding = ImVec2(15, 15);
+ //style->WindowRounding = 5.0f;
+ style->WindowRounding = 1.0f;
+
+ style->FramePadding = ImVec2(5, 5);
+ //style->FrameRounding = 4.0f;
+ style->FrameRounding = 1.0f;
+
+ style->ItemSpacing = ImVec2(12, 8);
+ //style->ItemInnerSpacing = ImVec2(8, 6);
+ style->ItemInnerSpacing = ImVec2(6, 6);
+ style->IndentSpacing = 25.0f;
+ style->ScrollbarSize = 15.0f;
+ //style->ScrollbarRounding = 9.0f;
+ style->ScrollbarRounding = 1.0f;
+
+ style->GrabMinSize = 5.0f;
+ //style->GrabRounding = 3.0f;
+ style->GrabRounding = 1.0f;
+
+
+ style->Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
+ style->Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
+ style->Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
+ style->Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
+ style->Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
+ style->Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f);
+ style->Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
+ style->Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
+ style->Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
+ style->Colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
+ style->Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
+ style->Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
+ style->Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
+ style->Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
+ style->Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
+ style->Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
+ style->Colors[ImGuiCol_ComboBg] = ImVec4(0.19f, 0.18f, 0.21f, 1.00f);
+ style->Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
+ style->Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
+ style->Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
+ style->Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
+ style->Colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
+ style->Colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
+ style->Colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
+ style->Colors[ImGuiCol_Column] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_ColumnHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
+ style->Colors[ImGuiCol_ColumnActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
+ style->Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
+ style->Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
+ style->Colors[ImGuiCol_CloseButton] = ImVec4(0.40f, 0.39f, 0.38f, 0.16f);
+ style->Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.40f, 0.39f, 0.38f, 0.39f);
+ style->Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.40f, 0.39f, 0.38f, 1.00f);
+ style->Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
+ style->Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
+ style->Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
+ style->Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
+ style->Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
+ style->Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
styles_setup = true;
}
if (!gui_visible) {
diff --git a/src/gui/im/InfoPanel.cpp b/src/gui/im/InfoPanel.cpp
new file mode 100644
index 00000000..50dcc3ec
--- /dev/null
+++ b/src/gui/im/InfoPanel.cpp
@@ -0,0 +1,8 @@
+/*
+ * InfoPanel.cpp
+ *
+ * Created on: Jul 7, 2017
+ * Author: nullifiedcat
+ */
+
+
diff --git a/src/gui/im/InfoPanel.hpp b/src/gui/im/InfoPanel.hpp
new file mode 100644
index 00000000..ac574e41
--- /dev/null
+++ b/src/gui/im/InfoPanel.hpp
@@ -0,0 +1,20 @@
+/*
+ * InfoPanel.hpp
+ *
+ * Created on: Jul 7, 2017
+ * Author: nullifiedcat
+ */
+
+#pragma once
+
+#include "../../common.h"
+
+namespace menu { namespace im {
+
+struct infopanel_data {
+ // std::vector variable_watchlist {};
+};
+
+void Render(bool ingame);
+
+}}
diff --git a/src/hack.cpp b/src/hack.cpp
index 6492d795..3746fbca 100644
--- a/src/hack.cpp
+++ b/src/hack.cpp
@@ -106,6 +106,7 @@ std::stack& hack::command_stack() {
class AdvancedEventListener : public IGameEventListener {
public:
virtual void FireGameEvent( KeyValues * event) {
+ if (!event_log) return;
const char* name = event->GetName();
if (!strcmp(name, "player_connect_client")) {
PrintChat("\x07%06X%s\x01 \x07%06X%s\x01 joining", 0xa06ba0, event->GetString("name"), 0x914e65, event->GetString("networkid"));
@@ -125,7 +126,6 @@ public:
int nteam = event->GetInt("team");
const char* oteam_s = teamname(oteam);
const char* nteam_s = teamname(nteam);
- logging::Info("%d -> %d", oteam, nteam);
PrintChat("\x07%06X%s\x01 changed team (\x07%06X%s\x01 -> \x07%06X%s\x01)", 0xa06ba0, event->GetString("name"), colors::chat::team(oteam), oteam_s, colors::chat::team(nteam), nteam_s);
}
}
@@ -270,6 +270,7 @@ void hack::Initialize() {
logging::Info("SDL hooking done");
g_IGameEventManager->AddListener(&adv_event_listener, false);
hacks::shared::anticheat::Init();
+ hacks::tf2::healarrow::Init();
InitSpinner();
logging::Info("Initialized Fidget Spinner");
diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp
index f84f4711..0d4d672c 100644
--- a/src/hacks/Aimbot.cpp
+++ b/src/hacks/Aimbot.cpp
@@ -46,7 +46,7 @@ static CatVar aimkey_mode(aimkey_modes_enum, "aimbot_aimkey_mode", "1", "Aimkey
static CatVar autoshoot(CV_SWITCH, "aimbot_autoshoot", "1", "Autoshoot", "Shoot automatically when the target is locked, isn't compatible with 'Enable when attacking'");
static CatEnum hitbox_mode_enum({ "AUTO-HEAD", "AUTO-CLOSEST", "STATIC" });
static CatVar hitbox_mode(hitbox_mode_enum, "aimbot_hitboxmode", "0", "Hitbox Mode", "Defines hitbox selection mode");
-static CatVar fov(CV_FLOAT, "aimbot_fov", "0", "Aimbot FOV", "FOV range for aimbot to lock targets. \"Smart FOV\" coming eventually.", 360.0f);
+static CatVar fov(CV_FLOAT, "aimbot_fov", "0", "Aimbot FOV", "FOV range for aimbot to lock targets. \"Smart FOV\" coming eventually.", 180.0f);
static CatEnum priority_mode_enum({ "SMART", "FOV", "DISTANCE", "HEALTH" });
static CatVar priority_mode(priority_mode_enum, "aimbot_prioritymode", "0", "Priority mode", "Priority mode.\n"
"SMART: Basically Auto-Threat. Will be tweakable eventually. "
@@ -60,7 +60,6 @@ static CatVar buildings_sentry(CV_SWITCH, "aimbot_buildings_sentry", "1", "Aim S
static CatVar buildings_other(CV_SWITCH, "aimbot_buildings_other", "1", "Aim Other building", "Should aimbot aim at other buildings");
static CatVar stickybot(CV_SWITCH, "aimbot_stickys", "0", "Aim Sticky", "Should aimbot aim at stickys");
static CatVar teammates(CV_SWITCH, "aimbot_teammates", "0", "Aim at teammates", "Aim at your own team. Useful for HL2DM");
-static CatVar teammates_helpful(CV_SWITCH, "aimbot_teammates_helpful", "0", "Use helpful weapons on teammates", "Allows weapons like the crusaders and the rescue ranger to be used on friendly objects");
static CatVar silent(CV_SWITCH, "aimbot_silent", "1", "Silent", "Your screen doesn't get snapped to the point where aimbot aims at");
static CatVar target_lock(CV_SWITCH, "aimbot_target_lock", "0", "Target Lock", "Keeps your previously chosen target untill target check fails");
static CatEnum hitbox_enum({
@@ -298,7 +297,7 @@ CachedEntity* RetrieveBestTarget(bool aimkey_state) {
// We dont have a target currently so we must find one, reset statuses
foundTarget = false;
- target_last = -1;
+ target_last = nullptr;
// Book keeping vars
float target_highest_score, scr;
@@ -354,11 +353,8 @@ bool IsTargetStateGood(CachedEntity* entity) {
if (entity == LOCAL_E) return false;
// Dont aim at dead player
if (!entity->m_bAlivePlayer) return false;
-
- // Dont aim at teammates as well as check if weapon allows teamates
- if (!entity->m_bEnemy && !teammates && !(LOCAL_W->m_iClassID == CL_CLASS(CTFCrossbow) && teammates_helpful)) {
- return false;
- }
+ // Dont aim at teammates
+ if (!entity->m_bEnemy && !teammates) return false;
// Check if player is too far away
if (EffectiveTargetingRange()) {
if (entity->m_flDistance > EffectiveTargetingRange()) return false;
@@ -419,7 +415,7 @@ bool IsTargetStateGood(CachedEntity* entity) {
// Check if building aimbot is enabled
if ( !(buildings_other || buildings_sentry) ) return false;
// Check if enemy building
- if (!entity->m_bEnemy && !(LOCAL_W->m_iClassID == CL_CLASS(CTFShotgunBuildingRescue) && teammates_helpful)) return false;
+ if (!entity->m_bEnemy) return false;
// Check if building is within range
if (EffectiveTargetingRange()) {
if (entity->m_flDistance > (int)EffectiveTargetingRange()) return false;
@@ -868,13 +864,12 @@ bool GetCanAim(int mode) {
// Weapons that should attack continuously
bool using_wep_on_list =
- LOCAL_W->m_iClassID == CL_CLASS(CTFPistol_Scout) ||
- LOCAL_W->m_iClassID == CL_CLASS(CTFPistol) ||
- LOCAL_W->m_iClassID == CL_CLASS(CTFMinigun) ||
- LOCAL_W->m_iClassID == CL_CLASS(CTFSyringeGun) ||
- LOCAL_W->m_iClassID == CL_CLASS(CTFSMG) ||
- LOCAL_W->m_iClassID == CL_CLASS(CTFRevolver) ||
- LOCAL_W->m_iClassID == CL_CLASS(CTFFlameThrower);
+ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFPistol_Scout) ||
+ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFMinigun) ||
+ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFSyringeGun) ||
+ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFSMG) ||
+ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFRevolver) ||
+ g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFFlameThrower);
switch (mode) {
case 1: // The first check when the aimbot checks if it can aim or shoot
@@ -917,7 +912,7 @@ CachedEntity* CurrentTarget() {
// Used for when you join and leave maps to reset aimbot vars
void Reset() {
- target_last = -1;
+ target_last = nullptr;
projectile_mode = false;
}
diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp
index bccd932b..4ba4ca9b 100644
--- a/src/hacks/ESP.cpp
+++ b/src/hacks/ESP.cpp
@@ -26,6 +26,7 @@ CatVar item_health_packs(CV_SWITCH, "esp_item_health", "1", "Health packs", "Sho
CatVar item_powerups(CV_SWITCH, "esp_item_powerups", "1", "Powerups", "Show powerups");
CatVar item_money(CV_SWITCH, "esp_money", "1", "MvM money", "Show MvM money");
CatVar item_money_red(CV_SWITCH, "esp_money_red", "1", "Red MvM money", "Show red MvM money");
+CatVar item_spellbooks(CV_SWITCH, "esp_spellbooks", "1", "Spellbooks", "Spell Books");
CatVar entity_id(CV_SWITCH, "esp_entity_id", "1", "Entity ID", "Used with Entity ESP. Shows entityID");
CatVar tank(CV_SWITCH, "esp_show_tank", "1", "Show tank", "Show tank");
CatVar box_esp(CV_SWITCH, "esp_box", "1", "Box", "Draw 2D box with healthbar. fancy.");
@@ -367,6 +368,12 @@ void _FASTCALL ProcessEntity(CachedEntity* ent) {
} else if (item_weapon_spawners && ent->m_ItemType >= ITEM_TF2C_W_FIRST && ent->m_ItemType <= ITEM_TF2C_W_LAST) {
AddEntityString(ent, format(tf2c_weapon_names[ent->m_ItemType - ITEM_TF2C_W_FIRST], " SPAWNER"));
if (CE_BYTE(ent, netvar.bRespawning)) AddEntityString(ent, "-- RESPAWNING --");
+ } else if (item_spellbooks && (ent->m_ItemType == ITEM_SPELL || ent->m_ItemType == ITEM_SPELL_RARE)) {
+ if (ent->m_ItemType == ITEM_SPELL) {
+ AddEntityString(ent, "Spell", colors::green);
+ } else {
+ AddEntityString(ent, "Rare Spell", colors::FromRGBA8(139, 31, 221, 255));
+ }
}
} else if (ent->m_Type == ENTITY_BUILDING && buildings) {
if (!ent->m_bEnemy && !teammates) return;
@@ -591,7 +598,8 @@ std::unordered_map bonelist_map {};
CatEnum emoji_esp({ "None", "Joy", "Thinking" });
CatVar joy_esp(CV_SWITCH, "esp_emoji", "0", "Emoji ESP");
CatVar joy_esp_size(CV_FLOAT, "esp_emoji_size", "32", "Emoji ESP Size");
-CatVar emoji_esp_scaling(CV_SWITCH, "esp_emoji_scaling", "0", "Emoji ESP Scaling");
+CatVar emoji_esp_scaling(CV_SWITCH, "esp_emoji_scaling", "1", "Emoji ESP Scaling");
+CatVar emoji_min_size(CV_INT, "esp_emoji_min_size", "20", "Emoji ESP min size", "Minimum size for an emoji when you use auto scaling");
textures::AtlasTexture joy_texture(64 * 4, textures::atlas_height - 64 * 4, 64, 64);
textures::AtlasTexture thinking_texture(64 * 5, textures::atlas_height - 64 * 4, 64, 64);
@@ -611,6 +619,7 @@ void _FASTCALL ProcessEntityPT(CachedEntity* ent) {
ESPData& ent_data = data[ent->m_IDX];
fg = ent_data.color;
+ if (!fg) fg = ent_data.color = colors::EntityF(ent);
if (!draw::EntityCenterToScreen(ent, screen) && !draw::WorldToScreen(ent->m_vecOrigin, origin_screen)) return;
@@ -641,30 +650,36 @@ void _FASTCALL ProcessEntityPT(CachedEntity* ent) {
}
}
+ if (ent->m_Type == ENTITY_PLAYER) {
+ if (joy_esp) {
+ auto hb = ent->hitboxes.GetHitbox(0);
+ Vector hbm, hbx;
+ if (draw::WorldToScreen(hb->min, hbm) && draw::WorldToScreen(hb->max, hbx)) {
+ Vector head_scr;
+ if (draw::WorldToScreen(hb->center, head_scr)) {
+ float size = emoji_esp_scaling ? fabs(hbm.y - hbx.y) : float(joy_esp_size);
+ if (emoji_esp_scaling && (size < float(emoji_min_size))) {
+ size = float(emoji_min_size);
+ }
+ textures::AtlasTexture* tx = nullptr;
+ if (int(joy_esp) == 1) tx = &joy_texture;
+ if (int(joy_esp) == 2) tx = &thinking_texture;
+ if (tx)
+ tx->Draw(head_scr.x - size / 2, head_scr.y - size / 2, size, size);
+ }
+ }
+ }
+ }
+
if (box_esp) {
switch (ent->m_Type) {
case ENTITY_PLAYER: {
- cloak = IsPlayerInvisible(ent);
+ //cloak = IsPlayerInvisible(ent);
//if (!ent->m_bEnemy && !teammates && playerlist::IsDefault(ent)) break;
//if (!ent->m_bAlivePlayer) break;
if (vischeck && !ent->IsVisible()) transparent = true;
if (!fg) fg = colors::EntityF(ent);
if (transparent) fg = colors::Transparent(fg);
- if (joy_esp) {
- auto hb = ent->hitboxes.GetHitbox(0);
- Vector hbm, hbx;
- if (draw::WorldToScreen(hb->min, hbm) && draw::WorldToScreen(hb->max, hbx)) {
- Vector head_scr;
- if (draw::WorldToScreen(hb->center, head_scr)) {
- float size = emoji_esp_scaling ? fabs(hbm.y - hbx.y) : float(joy_esp_size);
- textures::AtlasTexture* tx = nullptr;
- if (int(joy_esp) == 1) tx = &joy_texture;
- if (int(joy_esp) == 2) tx = &thinking_texture;
- if (tx)
- tx->Draw(head_scr.x - size / 2, head_scr.y - size / 2, size, size);
- }
- }
- }
DrawBox(ent, fg, static_cast(box_healthbar), CE_INT(ent, netvar.iHealth), ent->m_iMaxHealth);
break;
}
diff --git a/src/hacks/HealArrows.cpp b/src/hacks/HealArrows.cpp
index c3e8d046..a05723a2 100644
--- a/src/hacks/HealArrows.cpp
+++ b/src/hacks/HealArrows.cpp
@@ -10,11 +10,51 @@
namespace hacks { namespace tf2 { namespace healarrow {
static CatVar healarrow_charge(CV_FLOAT, "healarrow_charge", "0.25", "Healarrow Charge");
-static CatVar healarrow_timeout(CV_FLOAT, "healarrow_timeout", "12.5", "Healarrow Timeout");
+static CatVar healarrow_timeout(CV_FLOAT, "healarrow_timeout", "2", "Healarrow Timeout");
static CatVar healarrow(CV_SWITCH, "healarrow", "0", "Heal Arrow");
+static CatVar healarrow_callout(CV_SWITCH, "healarrow_callout", "0", "Call Out", "Send a message to chat when you heal someone with an arrow");
+static CatVar healarrow_callout_message(CV_STRING, "healarrow_callout_text", "Hey %%, I've just healed you for $$ HP! Your health is now ##.", "Call Out Text", "Formatting:\n%% - player name\n$$ - healing amount\n## - new health\n@@ - old health");
float healarrow_time = 0.0f;
+class HealArrowListener : public IGameEventListener {
+public:
+ virtual void FireGameEvent(KeyValues* event) {
+ if (!healarrow) return;
+ if (!healarrow_callout) return;
+ if (CE_BAD(LOCAL_W)) return;
+ if (LOCAL_W->m_iClassID != CL_CLASS(CTFCompoundBow)) return;
+ std::string name(event->GetName());
+ if (name == "player_hurt") {
+ int attacker = event->GetInt("attacker");
+ int victim = event->GetInt("userid");
+ int eid = g_IEngine->GetPlayerForUserID(attacker);
+ int vid = g_IEngine->GetPlayerForUserID(victim);
+ if (eid == g_IEngine->GetLocalPlayer()) {
+ int damageamount = event->GetInt("damageamount");
+ if (damageamount < 0) {
+ player_info_s pinfo;
+ if (g_IEngine->GetPlayerInfo(vid, &pinfo)) {
+ std::string msg(healarrow_callout_message.GetString());
+ ReplaceString(msg, "$$", std::to_string(-damageamount));
+ int health = event->GetInt("health");
+ ReplaceString(msg, "##", std::to_string(health));
+ ReplaceString(msg, "@@", std::to_string(health + damageamount));
+ ReplaceString(msg, "%%", pinfo.name);
+ chat_stack::Say(msg);
+ }
+ }
+ }
+ }
+ }
+};
+
+HealArrowListener listener;
+
+void Init() {
+ g_IGameEventManager->AddListener(&listener, false);
+}
+
void CreateMove() {
if (CE_BAD(LOCAL_W)) return;
if (healarrow) {
diff --git a/src/hacks/HealArrows.hpp b/src/hacks/HealArrows.hpp
index 8f1f2a46..9e8bfd02 100644
--- a/src/hacks/HealArrows.hpp
+++ b/src/hacks/HealArrows.hpp
@@ -11,5 +11,6 @@ namespace hacks { namespace tf2 { namespace healarrow {
void CreateMove();
void Draw();
+void Init();
}}}
diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp
index 995dd528..4799835d 100644
--- a/src/hacks/LagExploit.cpp
+++ b/src/hacks/LagExploit.cpp
@@ -57,7 +57,8 @@ bool ExploitActive() {
}
static CatVar mini_lag_exploit(CV_INT, "lagexploit_mini", "0", "Mini Lag Exploit");
-static CatVar instant_weapon_switch(CV_FLOAT, "instant_weapon_switch", "0", "Instant weapon switch");
+static CatVar instant_weapon_switch(CV_SWITCH, "instant_weapon_switch", "0", "Instant weapon switch");
+static CatVar infinite_packs(CV_SWITCH, "infinite_healthpacks", "0", "Infinite Healthpacks", "Activate removecond when standing on healthpack while having not full HP");
void CreateMove() {
if (CE_BAD(LOCAL_E)) return;
@@ -134,24 +135,52 @@ void CreateMove() {
} else {
flag = false;
}
-}
-void GetUserCmd(CUserCmd* cmd, int sequence_number) {
- if (!cmd) return;
- if (!cmd->command_number) return;
+ // Previously was in GetUserCmd
+ // Thanks Blackfire for helping me improve removecond!
+
+ if (!g_pUserCmd) return;
+ if (!g_pUserCmd->command_number) return;
if (!lagMasterSwitch) return;
int amount = int(lagValue);
if (!ExploitActive()) {
amount = int(mini_lag_exploit);
}
+
+ // Infinite healthpacks (I'll probably have to move this somewhere else)
+ if (infinite_packs && CE_GOOD(LOCAL_E) && LOCAL_E->m_iHealth != LOCAL_E->m_iMaxHealth) {
+ ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable();
+ const Vector& max1 = p->OBBMaxs();
+ const Vector& min1 = p->OBBMins();
+ for (int i = 1; i < entity_cache::max; i++) {
+ CachedEntity* e = ENTITY(i);
+ if (e->m_iClassID != CL_CLASS(CBaseAnimating)) continue;
+ if (e->m_ItemType != ITEM_HEALTH_SMALL && e->m_ItemType != ITEM_HEALTH_MEDIUM && e->m_ItemType != ITEM_HEALTH_LARGE) continue;
+ if (e->m_flDistance < 54.0f) amount = 900;
+ // Not working for some reason?
+ /*ICollideable* c = RAW_ENT(e)->GetCollideable();
+ const Vector& max2 = c->OBBMaxs();
+ const Vector& min2 = c->OBBMins();
+ if ( (min1.x <= max2.x && max1.x >= min2.x) &&
+ (min1.y <= max2.y && max1.y >= min2.y) &&
+ (min1.z <= max2.z && max1.z >= min2.z) ) {
+ logging::Info("Collision with %d", i);
+ amount = 900;
+ break;
+ }*/
+ }
+ }
+
if (!amount) return;
- cmd->command_number += amount;
- *(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += amount;
- //*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
+ // Modifying command_number and lastoutgoingcommand turned out to be useless
+
+ //cmd->command_number += amount;
+ //*(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += amount;
+
INetChannel* ch = (INetChannel*)g_IEngine->GetNetChannelInfo();
int& m_nOutSequenceNr = *(int*)((unsigned)ch + offsets::m_nOutSequenceNr());
m_nOutSequenceNr += amount;
}
-}}}
\ No newline at end of file
+}}}
diff --git a/src/hacks/LagExploit.hpp b/src/hacks/LagExploit.hpp
index c3297a2f..2aef6837 100644
--- a/src/hacks/LagExploit.hpp
+++ b/src/hacks/LagExploit.hpp
@@ -17,7 +17,6 @@ namespace hacks { namespace shared { namespace lagexploit {
void CreateMove();
void AddExploitTicks(int ticks);
bool ExploitActive();
-void GetUserCmd(CUserCmd*, int);
}}}
diff --git a/src/hacks/ac/aimbot.cpp b/src/hacks/ac/aimbot.cpp
index 37d7e0dc..a001901f 100644
--- a/src/hacks/ac/aimbot.cpp
+++ b/src/hacks/ac/aimbot.cpp
@@ -10,6 +10,7 @@
namespace ac { namespace aimbot {
+static CatVar enabled(CV_SWITCH, "ac_aimbot", "0", "Detect Aimbot", "Is not recommended");
static CatVar detect_angle(CV_FLOAT, "ac_aimbot_angle", "30", "Aimbot Angle");
static CatVar detections_warning(CV_INT, "ac_aimbot_detections", "3", "Min detections to warn");
@@ -28,6 +29,7 @@ void Init() {
}
void Update(CachedEntity* player) {
+ if (not enabled) return;
auto& data = data_table[player->m_IDX - 1];
if (data.check_timer) {
data.check_timer--;
@@ -58,6 +60,7 @@ void Update(CachedEntity* player) {
}
void Event(KeyValues* event) {
+ if (not enabled) return;
if (!strcmp(event->GetName(), "player_death") || !strcmp(event->GetName(), "player_hurt")) {
int attacker = event->GetInt("attacker");
int victim = event->GetInt("userid");
diff --git a/src/hooks/CreateMove.cpp b/src/hooks/CreateMove.cpp
index 0b3d3fcb..24e88a22 100644
--- a/src/hooks/CreateMove.cpp
+++ b/src/hooks/CreateMove.cpp
@@ -356,7 +356,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
if (CE_GOOD(g_pLocalPlayer->entity)) {
static int fakelag_queue = 0;
if (fakelag_amount) {
- if (fakelag_queue == int(fakelag_amount)) {
+ if (fakelag_queue == int(fakelag_amount) || (g_pUserCmd->buttons & IN_ATTACK)) {
*bSendPackets = true;
} else if (fakelag_queue < int(fakelag_amount)) {
*bSendPackets = false;
diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp
index 34c9a7c4..9d3a0b20 100644
--- a/src/hooks/others.cpp
+++ b/src/hooks/others.cpp
@@ -92,7 +92,6 @@ CUserCmd* GetUserCmd_hook(IInput* _this, int sequence_number) {
ch = (INetChannel*)g_IEngine->GetNetChannelInfo();//*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
*(int*)((unsigned)ch + offsets::m_nOutSequenceNr()) = def->command_number - 1;
}
- hacks::shared::lagexploit::GetUserCmd(def, sequence_number);
return def;
}
@@ -170,15 +169,15 @@ bool SendNetMsg_hook(void* _this, INetMessage& msg, bool bForceReliable = false,
}
static ConVar* sv_player_usercommand_timeout = g_ICvar->FindVar("sv_player_usercommand_timeout");
static float lastcmd = 0.0f;
- if (lastcmd > g_GlobalVars->curtime) {
- lastcmd = g_GlobalVars->curtime;
+ if (lastcmd > g_GlobalVars->absoluteframetime) {
+ lastcmd = g_GlobalVars->absoluteframetime;
}
if (airstuck.KeyDown() && !g_Settings.bInvalid) {
if (CE_GOOD(LOCAL_E)) {
- if (lastcmd + sv_player_usercommand_timeout->GetFloat() - 0.05f < g_GlobalVars->curtime) {
+ if (lastcmd + sv_player_usercommand_timeout->GetFloat() - 0.1f < g_GlobalVars->curtime) {
if (msg.GetType() == clc_Move) return false;
} else {
- lastcmd = g_GlobalVars->curtime;
+ lastcmd = g_GlobalVars->absoluteframetime;
}
}
}
diff --git a/src/itemtypes.cpp b/src/itemtypes.cpp
index 05180f79..f6c7b1e5 100644
--- a/src/itemtypes.cpp
+++ b/src/itemtypes.cpp
@@ -61,6 +61,10 @@ ItemManager::ItemManager() : mapper() {
RegisterModelMapping("models/items/healthkit.mdl", ITEM_HEALTH_MEDIUM);
//RegisterModelMapping("models/pickups/pickup_powerup_reflect.mdl", ITEM_POWERUP_REFLECT);
+ // Spellbooks
+ RegisterModelMapping("models/props_halloween/hwn_spellbook_upright.mdl", ITEM_SPELL);
+ RegisterModelMapping("models/props_halloween/hwn_spellbook_upright_major.mdl", ITEM_SPELL_RARE);
+
RegisterSpecialMapping([](CachedEntity* ent) -> bool {
return ent->m_iClassID == CL_CLASS(CTFAmmoPack);
}, ITEM_AMMO_MEDIUM);
diff --git a/src/itemtypes.h b/src/itemtypes.h
index 3e47eab8..d6d2913f 100644
--- a/src/itemtypes.h
+++ b/src/itemtypes.h
@@ -144,6 +144,9 @@ enum k_EItemType {
ITEM_HL_BATTERY,
+ ITEM_SPELL,
+ ITEM_SPELL_RARE,
+
ITEM_COUNT
};
diff --git a/tf-settings/menu.json b/tf-settings/menu.json
index f3b1178a..6a8797c9 100644
--- a/tf-settings/menu.json
+++ b/tf-settings/menu.json
@@ -9,20 +9,21 @@
"aimbot_autoshoot",
"aimbot_hitboxmode",
"aimbot_fov",
+ "aimbot_fov_draw",
"aimbot_prioritymode",
"aimbot_charge",
{
"type": "list",
"name": "Ignore",
"list": [
- "aimbot_ignore_vaccinator",
"ignore_taunting",
"aimbot_ignore_hoovy",
- "aimbot_ignore_cloak",
"aimbot_buildings_sentry",
"aimbot_buildings_other",
"aimbot_stickys",
- "aimbot_teammates"
+ "aimbot_teammates",
+ "aimbot_ignore_cloak",
+ "aimbot_ignore_vaccinator"
]
},
{
@@ -47,7 +48,6 @@
"aimbot_only_when_can_shoot",
"aimbot_enable_attack_only",
"aimbot_maxrange",
- "aimbot_fov_draw",
"aimbot_slow",
"aimbot_slow_smooth",
"aimbot_slow_autoshoot",
@@ -120,24 +120,25 @@
"type": "list",
"name": "Triggerbot Ignores",
"list": [
- "trigger_ignore_vaccinator",
"trigger_ignore_cloak",
- "trigger_stickys",
- "trigger_teammates",
+ "trigger_ignore_hoovy",
+ "trigger_ignore_vaccinator",
"trigger_buildings_sentry",
- "trigger_buildings_other"
+ "trigger_buildings_other",
+ "trigger_stickys",
+ "trigger_teammates"
]
},
{
"type": "list",
"name": "Triggerbot Preferences",
"list": [
- "trigger_key",
- "trigger_key_mode",
- "trigger_hitboxmode",
- "trigger_charge",
"trigger_zoomed",
- "trigger_maxrange"
+ "trigger_maxrange",
+ "trigger_charge",
+ "trigger_hitboxmode",
+ "trigger_key_mode",
+ "trigger_key"
]
}
]
@@ -178,6 +179,16 @@
"esp_buildings",
"esp_local",
"esp_powerups",
+ {
+ "type": "list",
+ "name": "Emoji ESP",
+ "list": [
+ "esp_emoji",
+ "esp_emoji_size",
+ "esp_emoji_scaling",
+ "esp_emoji_min_size"
+ ]
+ },
{
"type": "list",
"name": "Item ESP",
@@ -335,7 +346,6 @@
"list": [
"chat_newlines",
"clean_chat",
- "chat_crypto",
"killsay",
"killsay_file",
"spam",
@@ -366,10 +376,27 @@
"fb_autoteam"
]
},
+ {
+ "type": "list",
+ "name": "Anti-Cheat",
+ "list": [
+ "ac_enabled",
+ "ac_ignore_local",
+ "ac_chat",
+ "ac_aimbot",
+ "ac_aimbot_detections",
+ "ac_aimbot_angle",
+ "ac_removecond",
+ "ac_removecond_timer",
+ "ac_bhop_count"
+ ]
+ },
{
"type": "list",
"name": "Miscellaneous",
"list": [
+ "events",
+ "chat_crypto",
"airstuck",
"instant_weapon_switch",
"name",
@@ -400,7 +427,20 @@
"removecond_bleeding",
"removecond_stun",
"instant_decloak",
- "instant_rezoom"
+ "instant_rezoom",
+ "lagexploit_mini"
+ ]
+ },
+ {
+ "type": "list",
+ "name": "Fidget Spinner",
+ "list": [
+ "fidgetspinner",
+ "fidgetspinner_scale",
+ "fidgetspinner_decay_speed",
+ "fidgetspinner_speed_scale",
+ "fidgetspinner_speed_cap",
+ "fidgetspinner_min_speed"
]
},
{
@@ -409,7 +449,9 @@
"list": [
"healarrow",
"healarrow_charge",
- "healarrow_timeout"
+ "healarrow_timeout",
+ "healarrow_callout",
+ "healarrow_callout_text"
]
},
{
diff --git a/update-data b/update-data
index a851671e..3d594f93 100755
--- a/update-data
+++ b/update-data
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
echo "Searching for Team Fortress 2"
+echo "Please wait..."
find / -type d -name "Team Fortress 2" 2>/dev/null | while read path; do
if [ -e "$path/tf/gameinfo.txt" ]; then
@@ -10,6 +11,7 @@ find / -type d -name "Team Fortress 2" 2>/dev/null | while read path; do
ln -s "$path/cathook" "Data Folder"
rsync -avh --progress tf-settings/ "$path/cathook"
echo "Symbolic link created (Data Folder)"
+ echo "You can close this window"
read -p "Press ENTER to continue"
fi
fi
diff --git a/update-nobuild b/update-nobuild
index 768c7bd5..9407fc0d 100755
--- a/update-nobuild
+++ b/update-nobuild
@@ -4,6 +4,8 @@ git pull origin master
git submodule update --remote --recursive
make clean
+./update-data
+
## Ask user if they would like to update the menu
#read -r -p "Update menu? (Y/n) " key