SHARE
TWEET

Untitled

a guest Dec 5th, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     typedef unsigned long LODWORD;
  2.     auto NetChannel = g_pEngine->GetNetChannelInfo();
  3.     if (!NetChannel)
  4.         return;
  5.     static float predTime[65];
  6.     static bool init[65];
  7.     if (Globals::Shot[pEnt->EntIndex()])
  8.     {
  9.         if (init[pEnt->EntIndex()])
  10.         {
  11.             auto animstate = pEnt->AnimState();
  12.             if (animstate)
  13.             {
  14.                 if (animstate->m_fDuckAmount > 0.0)
  15.                 {
  16.                     auto v29 = 0.0;
  17.                     if (animstate->m_flFeetSpeedUnknownForwardOrSideways < 0.0)
  18.                         v29 = 0.0;
  19.                     else
  20.                         v29 = std::fminf(LODWORD(animstate->m_flFeetSpeedUnknownForwardOrSideways), 0x3F800000);
  21.                 }
  22.                 if (Globals::MissedShots[pEnt->EntIndex()])
  23.                 {
  24.                     float speed;
  25.                     if (*(float*)(animstate + 0xF8) < 0.f)
  26.                     {
  27.                         speed = 0.0;
  28.                     }
  29.                     else
  30.                     {
  31.                         speed = fminf(*(DWORD*)(animstate + 0xF8), 1.0f);
  32.                     }
  33.                     float flYawModifier = (*(float*)(animstate + 0x11C) * -0.30000001 - 0.19999999) * speed;
  34.                     flYawModifier += 1.0f;
  35.  
  36.                     if (*(float*)(animstate + 0xA4) > 0.0 && *(float*)(animstate + 0xFC) >= 0.0)
  37.                         flYawModifier = fminf(*(float*)(uintptr_t(animstate) + 0xFC), 1.0f);
  38.  
  39.                     float m_flMaxBodyYaw = *(float*)(uintptr_t(animstate) + 0x334) * flYawModifier;
  40.                     float m_flMinBodyYaw = *(float*)(uintptr_t(animstate) + 0x330) * flYawModifier;
  41.  
  42.                     float ResolvedYaw = animstate->m_flEyeYaw;
  43.                     float delta = std::abs(animstate->m_flEyeYaw - animstate->m_flGoalFeetYaw);
  44.  
  45.                     if (m_flMaxBodyYaw < delta)
  46.                     {
  47.                         ResolvedYaw = animstate->m_flEyeYaw - std::abs(m_flMaxBodyYaw);
  48.                     }
  49.                     else if (m_flMinBodyYaw > delta)
  50.                     {
  51.                         ResolvedYaw = animstate->m_flEyeYaw + std::abs(m_flMinBodyYaw);
  52.                     }
  53.                     animstate->m_flGoalFeetYaw = normalize_yaw(ResolvedYaw);
  54.                 }
  55.                 else
  56.                     init[pEnt->EntIndex()] = true;
  57.  
  58.                 Globals::Hit[pEnt->EntIndex()] = false;
  59.             }
  60.         }
  61.     }
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top