SHARE
TWEET

Untitled

a guest Jan 24th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float MaxDesyncDeltaResolver()
  2. {
  3.     auto animstate = g::pLocalEntity->GetAnimState();
  4.     float v49;
  5.     float v46;
  6.     float v51;
  7.  
  8.     if (animstate->m_flFeetSpeedForwardsOrSideWays >= 0.0)
  9.         v46 = fminf(animstate->m_flFeetSpeedForwardsOrSideWays, 1.0);
  10.     else
  11.         v46 = 0.0;
  12.  
  13.     float v47 = (float)((animstate->m_flStopToFullRunningFraction * -0.30000001f) - 0.19999999f) * v46;
  14.     v49 = v47 + 1.0;
  15.     if (animstate->m_fDuckAmount > 0.0)
  16.     {
  17.         if (animstate->m_flFeetSpeedForwardsOrSideWays >= 0.0)
  18.             v51 = fminf(animstate->m_flFeetSpeedForwardsOrSideWays, 1.0);
  19.         else
  20.             v51 = 0.0;
  21.         float v52 = animstate->m_fDuckAmount * v51;
  22.         v49 = v49 + (float)(v52 * (float)(0.5 - v49));
  23.     }
  24.  
  25.     float v53 = *(float*)(animstate + 0x334) * v49;
  26.     return v53;
  27. }
  28.  
  29.  
  30.  
  31.  
  32.  
  33. // actual resolver
  34.  
  35.  
  36.  
  37. void xyoResolver(C_BaseEntity* pEnt)
  38. {
  39.     if (pEnt->GetTeam() == g::pLocalEntity->GetTeam())
  40.         return;
  41.  
  42.     const auto player_animation_state = pEnt->GetAnimState();
  43.  
  44.     if (!player_animation_state)
  45.         return;
  46.  
  47.     if (g_Settings.iResolver == 1)
  48.     {
  49.         if (pEnt->GetVelocity().Length() > 0.1f || fabs(pEnt->GetVelocity().z) > 100.0f)
  50.         {
  51.             pEnt->GetAnimState()->m_flGoalFeetYaw = ApproachAngle(
  52.                 pEnt->GetAnimState()->m_flEyeYaw,
  53.                 pEnt->GetAnimState()->m_flGoalFeetYaw,
  54.                 ((pEnt->GetAnimState()->m_bOnGround * 20.0f) + 30.0f)
  55.                 * pEnt->GetAnimState()->m_flLastClientSideAnimationUpdateTime);
  56.         }
  57.         else
  58.         {
  59.             pEnt->GetAnimState()->m_flGoalFeetYaw = ApproachAngle(
  60.                 pEnt->GetLBY(),
  61.                 pEnt->GetAnimState()->m_flGoalFeetYaw,
  62.                 pEnt->GetAnimState()->m_flLastClientSideAnimationUpdateTime * 100.0f);
  63.         }
  64.     }
  65.  
  66.     float eye_goalfeet_delta = (pEnt->GetAnimState()->m_flEyeYaw - pEnt->GetAnimState()->m_flGoalFeetYaw);
  67.  
  68.     switch (Globals::missedshots[pEnt->EntIndex] > 1)
  69.     {
  70.     case 1:
  71.         MaxDesyncDeltaResolver();
  72.         break;
  73.     case 2:
  74.         MaxDesyncDeltaResolver();
  75.         eye_goalfeet_delta * 58;
  76.         break;
  77.     case 3:
  78.         MaxDesyncDeltaResolver();
  79.         eye_goalfeet_delta * -58;
  80.         break;
  81.     }
  82. }
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