Added some new stuff owo

This commit is contained in:
julianacat 2017-06-17 22:30:43 -05:00
parent 090b47b4de
commit 1cafa2b505
12 changed files with 95 additions and 6 deletions

View File

@ -249,6 +249,20 @@ void draw::OutlineRect(int x, int y, int w, int h, int color) {
g_ISurface->DrawOutlinedRect(x, y, x + w, y + h); g_ISurface->DrawOutlinedRect(x, y, x + w, y + h);
} }
//Potentially broken circle draw
void draw::DrawCircle(float x, float y, float r, int num_segments, int color) {
if (num_segments < 3 || r == 0 ) return;
g_ISurface->DrawSetColor(*reinterpret_cast<Color*>(&color));
float Step = PI * 2.0 / num_segments;
for (float a = 0; a < (PI*2.0); a += Step) {
float x1 = r * cos(a) + x;
float y1 = r * sin(a) + y;
float x2 = r * cos(a + Step) + x;
float y2 = r * sin(a + Step) + y;
g_ISurface->DrawLine(x1, y1, x2, y2);
}
}
void draw::GetStringLength(unsigned long font, char* string, int& length, int& height) { void draw::GetStringLength(unsigned long font, char* string, int& length, int& height) {
wchar_t buf[512]; wchar_t buf[512];
memset(buf, 0, sizeof(wchar_t) * 512); memset(buf, 0, sizeof(wchar_t) * 512);

View File

@ -100,6 +100,7 @@ void DrawLine(int x, int y, int dx, int dy, int color);
bool WorldToScreen(Vector &origin, Vector &screen); bool WorldToScreen(Vector &origin, Vector &screen);
bool EntityCenterToScreen(CachedEntity* entity, Vector& out); bool EntityCenterToScreen(CachedEntity* entity, Vector& out);
void OutlineRect(int x, int y, int w, int h, int color); void OutlineRect(int x, int y, int w, int h, int color);
void DrawCircle(float cx, float cy, float r, int num_segments, int color);
void GetStringLength(unsigned long font, char* string, int& length, int& height); void GetStringLength(unsigned long font, char* string, int& length, int& height);
std::pair<int, int> GetStringLength(unsigned long font, std::string string); std::pair<int, int> GetStringLength(unsigned long font, std::string string);
//void DrawString(unsigned font_handle, int x, int y, Color color, const char* text, ...); //void DrawString(unsigned font_handle, int x, int y, Color color, const char* text, ...);

View File

@ -625,6 +625,9 @@ static const std::string list_tf2 = R"(
"log" "log"
] ]
] ]
"deboog1"
"deboog2"
"deboog3"
)"; )";
List& MainList() { List& MainList() {

View File

@ -106,6 +106,11 @@ static CatVar slowaim_smoothing(CV_INT, "aimbot_slow_smooth", "10", "Slow Aim Sm
static CatVar slowaim_autoshoot(CV_INT, "aimbot_slow_autoshoot", "10", "Slow Aim Threshhold", "Distance to autoshoot while smooth aiming", 25); static CatVar slowaim_autoshoot(CV_INT, "aimbot_slow_autoshoot", "10", "Slow Aim Threshhold", "Distance to autoshoot while smooth aiming", 25);
static CatVar aimbot_debug(CV_SWITCH, "aimbot_debug", "0", "Aimbot Debug", "Print some internal state info for aimbot"); static CatVar aimbot_debug(CV_SWITCH, "aimbot_debug", "0", "Aimbot Debug", "Print some internal state info for aimbot");
bool slowCanShoot = false; bool slowCanShoot = false;
/*//Salting vars that need to be saved due to them being time based /*//Salting vars that need to be saved due to them being time based
static CatVar slowaim_salting(CV_SWITCH, "aimbot_slow_salt", "1", "Slow Aim Smooth", "Makes the slowaim more random", 5); static CatVar slowaim_salting(CV_SWITCH, "aimbot_slow_salt", "1", "Slow Aim Smooth", "Makes the slowaim more random", 5);
@ -278,6 +283,7 @@ void CreateMove() {
minigun_fix_ticks && (local_state == EAimbotLocalState::GOOD)) { minigun_fix_ticks && (local_state == EAimbotLocalState::GOOD)) {
Aim(ENTITY(last_target)); Aim(ENTITY(last_target));
} }
if (silent) g_pLocalPlayer->bUseSilentAngles = true; if (silent) g_pLocalPlayer->bUseSilentAngles = true;
return; return;
} }
@ -759,5 +765,27 @@ int BestHitbox(CachedEntity* target) {
return -1; return -1;
} }
void Draw() {
//Fov ring to represent when a target will be shot
//Not perfect but does a good job of representing where its supposed to be
if (fov_draw) {
//It cant use fovs greater than 180, so we check for that
if ((int)fov < 180 && fov) {
//Dont show ring while player is dead
if (!LOCAL_E->m_bAlivePlayer) {
//Grab the screen resolution and save to some vars
int width, height;
g_IEngine->GetScreenSize(width, height);
//Grab the cvar for fov_desired and attach to another var
static ConVar *realFov = g_ICvar->FindVar("fov_desired");
//Some math to find radius of the fov circle
float radius = tanf(DEG2RAD((float)fov) / 2) / tanf(DEG2RAD((int)realFov)/ 2) * width;
//Draw a circle with our newfound circle
draw::DrawCircle( width / 2 ,height / 2, radius, 35, GUIColor());
}
}
}
}
}}} }}}

View File

@ -92,6 +92,7 @@ bool VischeckPredictedEntity(CachedEntity* entity);
void CreateMove(); void CreateMove();
void PaintTraverse(); void PaintTraverse();
void Reset(); void Reset();
void Draw();
extern EAimbotState state; extern EAimbotState state;
extern int target_eid; extern int target_eid;

View File

@ -244,6 +244,7 @@ void DrawBones(CachedEntity* ent, int clr) {
draw::WorldToScreen(boneStart, scnSrt); draw::WorldToScreen(boneStart, scnSrt);
draw::WorldToScreen(boneEnd, scnEnd); draw::WorldToScreen(boneEnd, scnEnd);
draw::DrawLine(scnSrt.x, scnSrt.y, scnEnd.x - scnSrt.x, scnEnd.y - scnSrt.y, clr); draw::DrawLine(scnSrt.x, scnSrt.y, scnEnd.x - scnSrt.x, scnEnd.y - scnSrt.y, clr);
} }
} }

View File

@ -498,6 +498,34 @@ void DoWalking() {
} }
} }
/*static CatVar crumbDraw(CV_SWITCH, "fb_crumb_draw", "1", "Draw Crumbs", "Draws the path made for the followbot");
void DrawCrumbs() {
Vector scnSrt, scnEnd;
int tmpCrumb;
for (int i = 0; i < crumbArrayLength; i++) {
tmpCrumb = crumbBottom + i;
if (tmpCrumb >= 55)
tmpCrumb - 55;
draw::WorldToScreen(breadcrumbs[tmpCrumb], scnSrt);
if (tmpCrumb >= 54)
draw::WorldToScreen(breadcrumbs[tmpCrumb - 54], scnEnd);
else
draw::WorldToScreen(breadcrumbs[tmpCrumb + 1], scnEnd);
draw::DrawLine(scnSrt.x, scnSrt.y, scnEnd.x - scnSrt.x, scnEnd.y - scnSrt.y, colors::white);
logging::Info("draw");
}
}
void Draw() {
//if (!bot) return;
if (crumbDraw) {
if (crumbArrayLength >= 2)
void DrawCrumbs();
}
}*/
}}} }}}
#endif #endif

View File

@ -31,6 +31,7 @@ void DoWalking();
void PrintDebug(); void PrintDebug();
void AddMessageHandlers(ipc::peer_t* peer); void AddMessageHandlers(ipc::peer_t* peer);
void AfterCreateMove(); void AfterCreateMove();
//void Draw();
}}} }}}

View File

@ -133,6 +133,8 @@ int StartSceneEvent_hooked(IClientEntity* _this, int sceneInfo, int choreoScene,
float last_bucket = 0; float last_bucket = 0;
static CatVar tauntslide_moveable(CV_SWITCH, "tauntslide_moveable", "0", "Taunt Slide", "Allows free movement while taunting with movable taunts\nOnly works in tf2");
void CreateMove() { void CreateMove() {
static bool flswitch = false; static bool flswitch = false;
static IClientEntity *localplayer, *weapon, *last_weapon = nullptr; static IClientEntity *localplayer, *weapon, *last_weapon = nullptr;
@ -143,7 +145,17 @@ void CreateMove() {
static bool changed = false; static bool changed = false;
static ConVar *pNoPush = g_ICvar->FindVar("tf_avoidteammates_pushaway"); static ConVar *pNoPush = g_ICvar->FindVar("tf_avoidteammates_pushaway");
//Only work if the catvar enables it
if (tauntslide_moveable) {
//If the local player is taunting
if (HasCondition<TFCond_Taunting>(LOCAL_E)) {
//Set actual angles = the third person cameras angle
g_pUserCmd->viewangles.y = g_pLocalPlayer->v_OrigViewangles.y;
//Use silent since we dont want to prevent the player from looking around
g_pLocalPlayer->bUseSilentAngles = true;
}
}
if (no_taunt_ticks && CE_GOOD(LOCAL_E)) { if (no_taunt_ticks && CE_GOOD(LOCAL_E)) {
RemoveCondition<TFCond_Taunting>(LOCAL_E); RemoveCondition<TFCond_Taunting>(LOCAL_E);
no_taunt_ticks--; no_taunt_ticks--;

View File

@ -705,6 +705,7 @@ bool IsEntityVisiblePenetration(CachedEntity* entity, int hb) {
void RunEnginePrediction(IClientEntity* ent, CUserCmd *ucmd) { void RunEnginePrediction(IClientEntity* ent, CUserCmd *ucmd) {
if (!ent) return; if (!ent) return;
//if (CE_BAD( ENTITY(ent->entindex()) )) return;
typedef void(*SetupMoveFn)(IPrediction*, IClientEntity *, CUserCmd *, class IMoveHelper *, CMoveData *); typedef void(*SetupMoveFn)(IPrediction*, IClientEntity *, CUserCmd *, class IMoveHelper *, CMoveData *);
typedef void(*FinishMoveFn)(IPrediction*, IClientEntity *, CUserCmd*, CMoveData*); typedef void(*FinishMoveFn)(IPrediction*, IClientEntity *, CUserCmd*, CMoveData*);

View File

@ -198,6 +198,7 @@ void PaintTraverse_hook(void* _this, unsigned int vp, bool fr, bool ar) {
} }
{ {
SAFE_CALL(hacks::shared::aimbot::PaintTraverse()); SAFE_CALL(hacks::shared::aimbot::PaintTraverse());
SAFE_CALL(hacks::shared::aimbot::Draw());
} }
} }

View File

@ -130,8 +130,6 @@ void CreateInterfaces() {
g_ISteamUserStats = g_ISteamClient->GetISteamUserStats(su, sp, "STEAMUSERSTATS_INTERFACE_VERSION011"); g_ISteamUserStats = g_ISteamClient->GetISteamUserStats(su, sp, "STEAMUSERSTATS_INTERFACE_VERSION011");
if (!g_PredictionRandomSeed) { if (!g_PredictionRandomSeed) {
uintptr_t sig = gSignatures.GetClientSignature("89 1C 24 D9 5D D4 FF 90 3C 01 00 00 89 C7 8B 06 89 34 24 C1 E7 08 FF 90 3C 01 00 00 09 C7 33 3D ? ? ? ? 39 BB 34 0B 00 00 74 0E 89 BB 34 0B 00 00 89 3C 24 E8 ? ? ? ? C7 44 24 04 0F 27 00 00"); uintptr_t sig = gSignatures.GetClientSignature("89 1C 24 D9 5D D4 FF 90 3C 01 00 00 89 C7 8B 06 89 34 24 C1 E7 08 FF 90 3C 01 00 00 09 C7 33 3D ? ? ? ? 39 BB 34 0B 00 00 74 0E 89 BB 34 0B 00 00 89 3C 24 E8 ? ? ? ? C7 44 24 04 0F 27 00 00");
logging::Info("Random Seed: 0x%08x", sig + 32);
logging::Info("Random Seed: 0x%08x", *(int**)(sig + 32));
g_PredictionRandomSeed = *reinterpret_cast<int**>(sig + (uintptr_t)32); g_PredictionRandomSeed = *reinterpret_cast<int**>(sig + (uintptr_t)32);
} }
} }