From f824452eafe008042109e8ca9452068769c1feab Mon Sep 17 00:00:00 2001 From: julianacat Date: Sun, 18 Jun 2017 00:38:24 -0500 Subject: [PATCH] made working tauntslide --- src/drawing.cpp | 1 - src/hacks/Aimbot.cpp | 2 +- src/hacks/Misc.cpp | 24 ++++++++++++++++-------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/drawing.cpp b/src/drawing.cpp index 74b17c39..a9b93906 100644 --- a/src/drawing.cpp +++ b/src/drawing.cpp @@ -249,7 +249,6 @@ void draw::OutlineRect(int x, int y, int w, int h, int color) { 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)); diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 05a68226..d1f92568 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -674,7 +674,7 @@ EAimbotLocalState ShouldAim() { } return EAimbotLocalState::GOOD; } - +static CatVar fov_draw(CV_SWITCH, "aimbot_fov_draw", "0", "Draw Fov Ring", "Draws a ring to represent your current aimbot fov\nDoesnt change according to zoom fov\nWIP"); void PaintTraverse() { if (!enabled) return; diff --git a/src/hacks/Misc.cpp b/src/hacks/Misc.cpp index 6221df33..bd588541 100644 --- a/src/hacks/Misc.cpp +++ b/src/hacks/Misc.cpp @@ -133,7 +133,7 @@ int StartSceneEvent_hooked(IClientEntity* _this, int sceneInfo, int choreoScene, 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"); +static CatVar tauntslide_moveable(CV_SWITCH, "tauntslide_moveable", "0", "Taunt Slide", "Allows free movement while taunting with movable taunts\nOnly works in tf2\nWIP"); void CreateMove() { static bool flswitch = false; @@ -145,15 +145,23 @@ void CreateMove() { static bool changed = false; 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(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; - + //Check to prevent crashing + if (CE_GOOD(LOCAL_E)) { + //If the local player is taunting + if (HasCondition(LOCAL_E)) { + logging::Info("sLIDDING "); + //Grab Camera angle + static QAngle cameraAngle; + g_IEngine->GetViewAngles(cameraAngle); + //Set userAngle = camera angles + g_pUserCmd->viewangles.y = cameraAngle[1]; + //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)) {