Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float GetMaxDesyncDelta(C_AnimState* animstate)
- {
- float flRunningSpeed = std::clamp(animstate->m_flFeetSpeedForwardsOrSideWays, 0.f, 1.f);
- float flYawModifier = ((animstate->m_flStopToFullRunningFraction * -0.3f) - 0.2f) * flRunningSpeed;
- float flYawModifier2 = flYawModifier + 1.f;
- if (animstate->m_fDuckAmount > 0.f)
- {
- float maxVelocity = std::clamp(animstate->m_flFeetSpeedForwardsOrSideWays, 0.f, 1.f);
- float duckSpeed = animstate->m_fDuckAmount * maxVelocity;
- flYawModifier2 += (duckSpeed * (0.5f - flYawModifier2));
- }
- return *(float*)((uintptr_t)animstate + 0x334) * flYawModifier2;
- }
- void Indicators() {
- if (Globals::LocalPlayer) {
- // if (Globals::LocalPlayer->IsAlive()) {
- if (!Globals::LocalPlayer->AnimState())
- return;
- static int iWidth, iHeight;
- g_pEngine->GetScreenSize(iWidth, iHeight);
- static bool _pressed = true;
- if (c_config::get().indicators)
- {
- // if (Globals::LocalPlayer->IsAlive())
- {
- auto local_player = Globals::pLocalEntity = g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer());
- float desyncAmt = GetMaxDesyncDelta(local_player->AnimState());
- float diffrence = (Globals::RealAngle.y - Globals::LocalPlayer->GetLowerBodyYaw());
- float Velocity = Globals::LocalPlayer->GetVelocity().Length2D();
- int offset = 40;
- Color fake = desyncAmt <= 29 ? Color(255, 0, 0) : (desyncAmt >= 55 ? Color(132, 195, 16) : Color(255 - (desyncAmt * 2.55), desyncAmt * 2.55, 0));
- std::string choke;
- auto NetChannel = g_pEngine->GetNetChannel();
- if (!NetChannel)
- return;
- choke += "CHOKE: " + std::to_string(NetChannel->m_nChokedPackets);
- g_pSurface->DrawT(20, (iHeight - offset - 90), Color(255, 255, 255), Globals::IndicatorFont, false, choke.c_str());
- if (Velocity < 285) // we can make this seperate but im lazy af so no
- g_pSurface->DrawT(11, (iHeight - offset - 50), Color(132, 195, 16), Globals::IndicatorFont, false, "");
- else
- g_pSurface->DrawT(11, (iHeight - offset - 50), Color(132, 195, 16), Globals::IndicatorFont, false, "LC");
- g_pSurface->DrawT(11, (iHeight - offset - 25), fake, Globals::IndicatorFont, false, "CHOKE");
- if (GetAsyncKeyState(c_config::get().fakeduck_bind))
- g_pSurface->DrawT(11, (iHeight - offset - 25), Color(255, 255, 255), Globals::IndicatorFont, false, "DUCK");;
- if (GetAsyncKeyState(c_config::get().fakeduck_bind))
- g_pSurface->DrawT(11, (iHeight - offset - 50), fake, Globals::IndicatorFont, false, "FAKE");
- else
- //if (desyncAmt < 29) && g_Menu.Config.DesyncAngle)
- g_pSurface->DrawT(11, (iHeight - offset - 25), fake, Globals::IndicatorFont, false, "FAKE");
- if (GetAsyncKeyState(c_config::get().baim_bind))
- g_pSurface->DrawT(11, (iHeight - offset - 75), Color(255, 255, 255), Globals::IndicatorFont, false, "BAIM");
- }
- }
- //}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement