Added Commented InfoPanel
This commit is contained in:
parent
1e1bca0c12
commit
ec41c5a1a8
@ -8,6 +8,7 @@
|
|||||||
#include "Im.hpp"
|
#include "Im.hpp"
|
||||||
#include "Schema.hpp"
|
#include "Schema.hpp"
|
||||||
#include "Playerlist.hpp"
|
#include "Playerlist.hpp"
|
||||||
|
#include "InfoPanel.hpp"
|
||||||
|
|
||||||
#include "../../common.h"
|
#include "../../common.h"
|
||||||
|
|
||||||
@ -335,6 +336,10 @@ void Render() {
|
|||||||
style->Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
|
style->Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
|
||||||
styles_setup = true;
|
styles_setup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Info panel should be rendered even with main gui disabled
|
||||||
|
//RenderInfoPanel();
|
||||||
|
|
||||||
if (!gui_visible) {
|
if (!gui_visible) {
|
||||||
ImGui::GetIO().MouseDrawCursor = false;
|
ImGui::GetIO().MouseDrawCursor = false;
|
||||||
return;
|
return;
|
||||||
@ -342,8 +347,7 @@ void Render() {
|
|||||||
ImGui::GetIO().MouseDrawCursor = true;
|
ImGui::GetIO().MouseDrawCursor = true;
|
||||||
ImGui::SetMouseCursor(ImGuiMouseCursor_Arrow);
|
ImGui::SetMouseCursor(ImGuiMouseCursor_Arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//ImGui::ShowTestWindow();
|
//ImGui::ShowTestWindow();
|
||||||
RenderPlayerlist();
|
RenderPlayerlist();
|
||||||
/*ImGui::Begin("Colors");
|
/*ImGui::Begin("Colors");
|
||||||
|
@ -5,4 +5,69 @@
|
|||||||
* Author: nullifiedcat
|
* Author: nullifiedcat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
#include "../../common.h"
|
||||||
|
#include "../../cvwrapper.h"
|
||||||
|
#include "imgui.h"
|
||||||
|
#include "InfoPanel.hpp"
|
||||||
|
|
||||||
|
namespace menu { namespace im {
|
||||||
|
|
||||||
|
// User settings
|
||||||
|
CatVar enabled(CV_SWITCH, "info_panel_enabled", "0", "Enable Info Panel");
|
||||||
|
CatVar aimbot_enabled(CV_SWITCH, "info_panel_aimbot", "0", "Show Aimbot");
|
||||||
|
CatVar aimkey_enabled(CV_SWITCH, "info_panel_aimkey_toggle", "0", "Show Aimkey Toggle");
|
||||||
|
|
||||||
|
// Main ImGui menu creator
|
||||||
|
void RenderInfoPanel() {
|
||||||
|
|
||||||
|
// Check if info menu is enabled
|
||||||
|
if (!enabled) return;
|
||||||
|
|
||||||
|
// Check if in-game
|
||||||
|
if (!g_IEngine->IsInGame()) return;
|
||||||
|
|
||||||
|
// Menu creation stuff pasted from playerlist
|
||||||
|
if (ImGui::Begin("Info Panel")) {
|
||||||
|
ImGui::SetWindowSize(ImVec2(0, 0));
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 1));
|
||||||
|
|
||||||
|
// The main meat of the info panel
|
||||||
|
if (aimbot_enabled) AddInfoItem(EInfo::AIMBOT, 169);
|
||||||
|
if (aimkey_enabled) AddInfoItem(EInfo::AIMKEY, 269);
|
||||||
|
|
||||||
|
|
||||||
|
ImGui::PopStyleVar();
|
||||||
|
}
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to add individual items to menu
|
||||||
|
void AddInfoItem(EInfo info_type, int id) {
|
||||||
|
|
||||||
|
// Dont know what this does but i just use some numbers with 69 to make it somewhat different
|
||||||
|
ImGui::PushID(id);
|
||||||
|
|
||||||
|
// Switch based on into_type
|
||||||
|
switch (info_type) {
|
||||||
|
case EInfo::AIMBOT:
|
||||||
|
ImGui::Text(format("Aimbot: ", GetCatVar("aimbot_enabled") ? "enabled" : "disabled").c_str());
|
||||||
|
break;
|
||||||
|
case EInfo::AIMKEY:
|
||||||
|
ImGui::Text(format("Fak off nagger").c_str());
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Dont know what this does but im expecting i would need it
|
||||||
|
ImGui::PopID();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper function ripped from schema.cpp due to ussues if i tri to use it directly from there
|
||||||
|
CatVar* GetCatVar(const std::string name) {
|
||||||
|
for (auto var : CatVarList()) {
|
||||||
|
if (var->name == name) return var;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}}*/
|
@ -4,17 +4,25 @@
|
|||||||
* Created on: Jul 7, 2017
|
* Created on: Jul 7, 2017
|
||||||
* Author: nullifiedcat
|
* Author: nullifiedcat
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "../../common.h"
|
#include "../../common.h"
|
||||||
|
#include "../../sdk.h"
|
||||||
|
|
||||||
namespace menu { namespace im {
|
namespace menu { namespace im {
|
||||||
|
|
||||||
struct infopanel_data {
|
// used to determine what var we need to display
|
||||||
// std::vector<CatVar*> variable_watchlist {};
|
enum class EInfo {
|
||||||
|
AIMBOT,
|
||||||
|
AIMKEY
|
||||||
};
|
};
|
||||||
|
|
||||||
void Render(bool ingame);
|
void RenderInfoPanel();
|
||||||
|
void AddInfoItem(EInfo info_type, int id);
|
||||||
|
|
||||||
|
|
||||||
}}
|
std::string GetBoolString(CatVar* value);
|
||||||
|
CatVar* GetCatVar(const std::string name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}}*/
|
||||||
|
@ -1032,4 +1032,4 @@ void DrawText() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
@ -15,13 +15,7 @@ class IClientEntity;
|
|||||||
|
|
||||||
namespace hacks { namespace shared { namespace aimbot {
|
namespace hacks { namespace shared { namespace aimbot {
|
||||||
|
|
||||||
enum class EAimKeyMode {
|
// Used to store aimbot data to prevent calculating it again
|
||||||
DISABLED,
|
|
||||||
PRESS_TO_ENABLE,
|
|
||||||
PRESS_TO_DISABLE,
|
|
||||||
PRESS_TO_TOGGLE
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AimbotCalculatedData_s {
|
struct AimbotCalculatedData_s {
|
||||||
unsigned long predict_tick { 0 };
|
unsigned long predict_tick { 0 };
|
||||||
Vector aim_position { 0 };
|
Vector aim_position { 0 };
|
||||||
@ -30,24 +24,25 @@ struct AimbotCalculatedData_s {
|
|||||||
float fov { 0 };
|
float fov { 0 };
|
||||||
int hitbox { 0 };
|
int hitbox { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
// Variable used to tell when the aimbot has found a target
|
// Functions used to calculate aimbot data, and if already calculated use it
|
||||||
extern bool foundTarget;
|
|
||||||
|
|
||||||
const Vector& PredictEntity(CachedEntity* entity);
|
const Vector& PredictEntity(CachedEntity* entity);
|
||||||
bool VischeckPredictedEntity(CachedEntity* entity);
|
bool VischeckPredictedEntity(CachedEntity* entity);
|
||||||
|
|
||||||
|
|
||||||
|
// Variable used to tell when the aimbot has found a target
|
||||||
|
extern bool foundTarget;
|
||||||
|
|
||||||
|
// Used by esp to set their color
|
||||||
|
extern int target_eid;
|
||||||
|
|
||||||
|
|
||||||
// Functions called by other functions for when certian game calls are run
|
// Functions called by other functions for when certian game calls are run
|
||||||
void CreateMove();
|
void CreateMove();
|
||||||
void DrawText();
|
void DrawText();
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
// Used by esp to set their color
|
// Stuff to make storing functions easy
|
||||||
extern int target_eid;
|
|
||||||
|
|
||||||
float EffectiveTargetingRange();
|
|
||||||
|
|
||||||
|
|
||||||
CachedEntity* CurrentTarget();
|
CachedEntity* CurrentTarget();
|
||||||
bool ShouldAim();
|
bool ShouldAim();
|
||||||
CachedEntity* RetrieveBestTarget(bool aimkey_state);
|
CachedEntity* RetrieveBestTarget(bool aimkey_state);
|
||||||
@ -59,6 +54,7 @@ int ClosestHitbox(CachedEntity* target);
|
|||||||
void slowAim(Vector &inputAngle, Vector userAngle);
|
void slowAim(Vector &inputAngle, Vector userAngle);
|
||||||
bool UpdateAimkey();
|
bool UpdateAimkey();
|
||||||
bool GetCanAim(int mode);
|
bool GetCanAim(int mode);
|
||||||
|
float EffectiveTargetingRange();
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
@ -53,6 +53,8 @@ float idle_time = 0;
|
|||||||
|
|
||||||
// An array for storing the breadcrumbs
|
// An array for storing the breadcrumbs
|
||||||
static Vector breadcrumbs [64];
|
static Vector breadcrumbs [64];
|
||||||
|
// Int for storing length of array
|
||||||
|
constexpr int MAX_CRUMBS = 64;
|
||||||
// Array Bookkeeping vars
|
// Array Bookkeeping vars
|
||||||
int crumbBottom = 0;
|
int crumbBottom = 0;
|
||||||
int crumbTop = 0;
|
int crumbTop = 0;
|
||||||
@ -145,11 +147,8 @@ void DoWalking() {
|
|||||||
} else {
|
} else {
|
||||||
best_target = target_priority;
|
best_target = target_priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Doesnt work for some reason, FIX!!!
|
|
||||||
// If we cant use steam id target, try someone else
|
// If we cant use steam id target, try someone else
|
||||||
if (roaming && CE_BAD(best_target)) {
|
if (roaming && CE_BAD(best_target)) {
|
||||||
|
|
||||||
@ -647,7 +646,7 @@ void CrumbReset() {
|
|||||||
void CrumbTopAdd(Vector crumbToAdd) {
|
void CrumbTopAdd(Vector crumbToAdd) {
|
||||||
|
|
||||||
// Once the crumbs have hit the limit of the array, loop around and over write unused spots
|
// Once the crumbs have hit the limit of the array, loop around and over write unused spots
|
||||||
if (crumbTop == 64) {
|
if (crumbTop == MAX_CRUMBS) {
|
||||||
crumbTop = 0;
|
crumbTop = 0;
|
||||||
} else {
|
} else {
|
||||||
// Else, bump the top number market of the array
|
// Else, bump the top number market of the array
|
||||||
@ -660,7 +659,7 @@ void CrumbTopAdd(Vector crumbToAdd) {
|
|||||||
logging::Info("Crumb Top add");
|
logging::Info("Crumb Top add");
|
||||||
|
|
||||||
// The array can only hold so many crumbs, once it goes over its cap, stop the bot to prevent un-needed movement
|
// The array can only hold so many crumbs, once it goes over its cap, stop the bot to prevent un-needed movement
|
||||||
if (crumbArrayLength > 64) {
|
if (crumbArrayLength > MAX_CRUMBS) {
|
||||||
CrumbReset();
|
CrumbReset();
|
||||||
crumbStopped = true;
|
crumbStopped = true;
|
||||||
logging::Info("Crumb Overload!\nDumping array");
|
logging::Info("Crumb Overload!\nDumping array");
|
||||||
@ -671,7 +670,7 @@ void CrumbTopAdd(Vector crumbToAdd) {
|
|||||||
void CrumbBottomAdd() {
|
void CrumbBottomAdd() {
|
||||||
|
|
||||||
// Once the crumbs have hit the limit of the array, loop around and over write unused spots
|
// Once the crumbs have hit the limit of the array, loop around and over write unused spots
|
||||||
if (crumbBottom == 64) {
|
if (crumbBottom == MAX_CRUMBS) {
|
||||||
crumbBottom = 0;
|
crumbBottom = 0;
|
||||||
} else {
|
} else {
|
||||||
// Else, bump the top number market of the array
|
// Else, bump the top number market of the array
|
||||||
@ -756,10 +755,10 @@ void DrawFollowbot() {
|
|||||||
tmpCrumb2 = crumbBottom + i + 1;
|
tmpCrumb2 = crumbBottom + i + 1;
|
||||||
|
|
||||||
// Correction for array numbers when one goes over our limit
|
// Correction for array numbers when one goes over our limit
|
||||||
if (tmpCrumb1 >= 64)
|
if (tmpCrumb1 >= MAX_CRUMBS)
|
||||||
tmpCrumb1 - 64;
|
tmpCrumb1 - MAX_CRUMBS;
|
||||||
if (tmpCrumb2 >= 64)
|
if (tmpCrumb2 >= MAX_CRUMBS)
|
||||||
tmpCrumb1 - 64;
|
tmpCrumb1 - MAX_CRUMBS;
|
||||||
|
|
||||||
// Take our 2 crumbs and get a position on the screen
|
// Take our 2 crumbs and get a position on the screen
|
||||||
draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt);
|
draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt);
|
||||||
@ -804,10 +803,10 @@ void DrawFollowbot() {
|
|||||||
tmpCrumb2 = crumbBottom + i + 1;
|
tmpCrumb2 = crumbBottom + i + 1;
|
||||||
|
|
||||||
// Correction for array numbers when one goes over our limit
|
// Correction for array numbers when one goes over our limit
|
||||||
if (tmpCrumb1 >= 64)
|
if (tmpCrumb1 >= MAX_CRUMBS)
|
||||||
tmpCrumb1 - 64;
|
tmpCrumb1 - MAX_CRUMBS;
|
||||||
if (tmpCrumb2 >= 64)
|
if (tmpCrumb2 >= MAX_CRUMBS)
|
||||||
tmpCrumb2 - 64;
|
tmpCrumb2 - MAX_CRUMBS;
|
||||||
|
|
||||||
// Take our 2 crumbs and get a position on the screen
|
// Take our 2 crumbs and get a position on the screen
|
||||||
draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt);
|
draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt);
|
||||||
|
Reference in New Issue
Block a user