made working tauntslide

This commit is contained in:
julianacat 2017-06-18 00:38:24 -05:00
parent 890d33b390
commit f824452eaf
3 changed files with 17 additions and 10 deletions

View File

@ -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*>(&color));

View File

@ -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;

View File

@ -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<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;
//Check to prevent crashing
if (CE_GOOD(LOCAL_E)) {
//If the local player is taunting
if (HasCondition<TFCond_Taunting>(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)) {