diff --git a/cathook/src/hack.cpp b/cathook/src/hack.cpp index c7dd8b51..3e5a2fab 100644 --- a/cathook/src/hack.cpp +++ b/cathook/src/hack.cpp @@ -216,11 +216,6 @@ void Hk_Shutdown(void* thisptr, const char* reason) { bool hack::Hk_CreateMove(void* thisptr, float inputSample, CUserCmd* cmd) { SEGV_BEGIN; - if (g_pLocalPlayer->entity) { - if (g_pLocalPlayer->bWasZoomed) { - SetEntityValue(g_pLocalPlayer->entity, netvar.iCond, g_pLocalPlayer->cond_0 |= cond::zoomed); - } - } bool ret = ((CreateMove_t*)hooks::hkClientMode->GetMethod(hooks::offCreateMove))(thisptr, inputSample, cmd); if (!interfaces::engineClient->IsInGame()) { hack::invalidated = true; @@ -269,12 +264,6 @@ bool hack::Hk_CreateMove(void* thisptr, float inputSample, CUserCmd* cmd) { ret = false; } }*/ - if (g_pLocalPlayer->entity) { - if (g_Settings.bNoZoom->GetBool()) { - SetEntityValue(g_pLocalPlayer->entity, netvar.iCond, g_pLocalPlayer->cond_0 &= ~cond::zoomed); - } - } - hack::invalidated = false; if (g_pLocalPlayer->bUseSilentAngles) { Vector vsilent(cmd->forwardmove, cmd->sidemove, cmd->upmove); diff --git a/cathook/src/hacks/Aimbot.cpp b/cathook/src/hacks/Aimbot.cpp index c4fe8d82..71d46488 100644 --- a/cathook/src/hacks/Aimbot.cpp +++ b/cathook/src/hacks/Aimbot.cpp @@ -393,7 +393,7 @@ bool Aimbot::Aim(IClientEntity* entity, CUserCmd* cmd) { } if (!smoothed && this->v_bAutoShoot->GetBool()) { if (g_pLocalPlayer->clazz == tf_class::tf_sniper) { - if (g_pLocalPlayer->cond_0 & cond::zoomed) { + if (g_pLocalPlayer->bZoomed) { if (this->v_iAutoShootCharge->GetBool()) { int rifleHandle = GetEntityValue(local, netvar.hActiveWeapon); IClientEntity* rifle = interfaces::entityList->GetClientEntity(rifleHandle & 0xFFF); diff --git a/cathook/src/hacks/Misc.cpp b/cathook/src/hacks/Misc.cpp index a132c52a..6e6d32d3 100644 --- a/cathook/src/hacks/Misc.cpp +++ b/cathook/src/hacks/Misc.cpp @@ -327,7 +327,7 @@ void Misc::PaintTraverse(void*, unsigned int, bool, bool) { GetProjectileData(g_pLocalPlayer->weapon, speed, gravity); AddSideString(draw::white, draw::black, "Speed: %f", speed); AddSideString(draw::white, draw::black, "Gravity: %f", gravity); - AddSideString(draw::white, draw::black, "IsZoomed: %i", g_pLocalPlayer->bWasZoomed); + AddSideString(draw::white, draw::black, "IsZoomed: %i", g_pLocalPlayer->bZoomed); AddSideString(draw::white, draw::black, "IsThirdPerson: %i", interfaces::iinput->CAM_IsThirdPerson()); //AddSideString(draw::white, draw::black, "???: %f", GetEntityValue(g_pLocalPlayer->entity, netvar.test)); //AddSideString(draw::white, draw::black, "VecPunchAngle: %f %f %f", pa.x, pa.y, pa.z); diff --git a/cathook/src/hacks/Trigger.cpp b/cathook/src/hacks/Trigger.cpp index c9871bd2..e87ced47 100644 --- a/cathook/src/hacks/Trigger.cpp +++ b/cathook/src/hacks/Trigger.cpp @@ -107,7 +107,7 @@ bool Triggerbot::CreateMove(void* thisptr, float sampl, CUserCmd* cmd) { } if (!bodyshot && (g_pLocalPlayer->clazz == tf_class::tf_sniper) && this->v_bZoomedOnly->GetBool() && - !((g_pLocalPlayer->cond_0 & cond::zoomed) && CanHeadshot(g_pLocalPlayer->entity))) { + !((g_pLocalPlayer->bZoomed) && CanHeadshot(g_pLocalPlayer->entity))) { return true; } //IClientEntity* weapon; diff --git a/cathook/src/localplayer.cpp b/cathook/src/localplayer.cpp index f5cfe2df..644e5659 100644 --- a/cathook/src/localplayer.cpp +++ b/cathook/src/localplayer.cpp @@ -20,8 +20,8 @@ void LocalPlayer::Update() { clazz = GetEntityValue(entity, netvar.iClass); health = GetEntityValue(entity, netvar.iHealth); this->bUseSilentAngles = false; - bZoomed = GetEntityValue(entity, netvar.iFOV) != GetEntityValue(entity, netvar.iDefaultFOV); - if (cond_0 & cond::zoomed) { + bZoomed = GetEntityValue(entity, netvar.iFOV) == 20; //!= GetEntityValue(entity, netvar.iDefaultFOV); + if (bZoomed) { if (flZoomBegin == 0.0f) flZoomBegin = interfaces::gvars->curtime; } else { flZoomBegin = 0.0f;