SHARE
TWEET

Untitled

a guest Jul 15th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void CResolver::testing_shit(SDK::CBaseEntity* entity) {
  2.  
  3.     auto local_player = INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer());
  4.     if (!local_player)
  5.         return;
  6.  
  7.     int i = entity->GetIndex();
  8.     GLOBAL::resolver_mode = "none";
  9.     static float MoveReal[65], FakeWalkandslowwalkingfix[65];
  10.     auto animation_state = entity->GetAnimState();
  11.     auto animstate = uintptr_t(local_player->GetAnimState());
  12.     float duckammount = *(float*)(animstate + 0xA4);
  13.     float speedfraction = max(0, min(*reinterpret_cast<float*>(animstate + 0xF8), 1));
  14.     float speedfactor = max(0, min(1, *reinterpret_cast<float*> (animstate + 0xFC)));
  15.     float unk1 = ((*reinterpret_cast<float*> (animstate + 0x11C) * -0.30000001) - 0.19999999) * speedfraction;
  16.     float unk2 = unk1 + 1.f;
  17.     float unk3;
  18.     if (duckammount > 0) {
  19.         unk2 += ((duckammount * speedfactor) * (0.5f - unk2));
  20.     }
  21.     unk3 = *(float*)(animstate + 0x334) * unk2;
  22.    
  23.  
  24.     if (duckammount > 0)
  25.     {
  26.     unk2 += ((duckammount * speedfactor) * (0.5f - unk2));
  27.     }
  28.     unk3 = *(float *)(animation_state + 0x334) * unk2;
  29.  
  30.     auto feet_yaw = animation_state->m_flCurrentFeetYaw;
  31.     float body_yaw = 58.f;animation_state->m_flCurrentTorsoYaw;
  32.     auto move_yaw = 58.f;
  33.     auto goal_feet_yaw = animation_state->m_flGoalFeetYaw;
  34.     auto shit = body_yaw - feet_yaw;
  35.     auto shitv2 = body_yaw + feet_yaw;
  36.  
  37.     auto poses = entity->GetPoseParamaters();
  38.     float feet_yaw_rate = animation_state->m_flFeetYawRate;
  39.     float fff = animation_state->m_flFeetSpeedForwardsOrSideWays;
  40.     float forwardorsideways = animation_state->m_flFeetSpeedUnknownForwardOrSideways;
  41.     float feet_cucle = animation_state->m_flFeetCycle;
  42.     float headheighanimation = animation_state->m_flHeadHeightOrOffsetFromHittingGroundAnimation;
  43.     float new_body_yaw = animation_state->m_flCurrentTorsoYaw;
  44.     auto body_max_rotation = animation_state->pad10[416];
  45.     auto normalized_eye_abs_yaw_diff = fmod((animation_state->m_flEyeYaw - feet_yaw), 360.0);
  46.     auto body_min_rotation = animation_state->pad10[412];
  47.     if (entity->GetVelocity().Length2D() < 35.f)
  48.     {
  49.         if (move_yaw)
  50.         {
  51.             animation_state->m_flEyeYaw = animation_state->m_flEyeYaw + move_yaw + feet_yaw * 32.f && feet_yaw + feet_yaw_rate / 32.f;
  52.         }
  53.         else
  54.         {
  55.             if (feet_yaw && move_yaw)
  56.             {
  57.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw + feet_yaw + feet_yaw_rate * -32.f && goal_feet_yaw + feet_yaw / 32.f;
  58.             }
  59.         }
  60.     }
  61.     else
  62.     {
  63.         if (entity->GetVelocity().Length2D() > 0 && entity->GetFlags() & FL_ONGROUND)
  64.         {
  65.             if (normalized_eye_abs_yaw_diff > 0 || normalized_eye_abs_yaw_diff == 0)
  66.             {
  67.                 body_min_rotation / feet_yaw / 32.f;
  68.             }
  69.             else
  70.             {
  71.                 body_max_rotation / feet_yaw / -32.f;
  72.             }
  73.             if (new_body_yaw == 58.f)
  74.             {
  75.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - body_yaw * -58.f + goal_feet_yaw + feet_yaw_rate + feet_yaw / 32.f;
  76.             }
  77.             else if (new_body_yaw >= -58.f && new_body_yaw == body_yaw)
  78.             {
  79.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - new_body_yaw / 45.f || 58.f && goal_feet_yaw - feet_yaw * 32.f;
  80.             }
  81.             else if (new_body_yaw <= 58.f)
  82.             {
  83.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - body_yaw * 58.f + feet_yaw / -32.f && goal_feet_yaw * 32.f;
  84.             }
  85.             else if (new_body_yaw == 58.f && new_body_yaw <= 58.f)
  86.             {
  87.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - goal_feet_yaw / 29.f + feet_yaw * -32.f && new_body_yaw * 58.f - body_yaw / -58.f;
  88.             }
  89.             else if (new_body_yaw >= -58.f && body_yaw == 58.f)
  90.             {
  91.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - new_body_yaw * 58.f - feet_yaw * -32.f && goal_feet_yaw - 32.f && feet_yaw / -32.f;
  92.             }
  93.         }
  94.         if (is_slow_walking(entity))
  95.         {
  96.             GLOBAL::resolver_mode = "slowwalk";
  97.             if (normalized_eye_abs_yaw_diff > 0 || normalized_eye_abs_yaw_diff == 0)
  98.             {
  99.                 body_min_rotation / move_yaw / -58.f;
  100.             }
  101.             else
  102.             {
  103.                 body_max_rotation / move_yaw / 58.f;
  104.             }
  105.             if (goal_feet_yaw <= -29.f && feet_yaw >= -29.f)
  106.             {
  107.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - move_yaw / 58.f + feet_yaw - goal_feet_yaw * 29.f;
  108.             }
  109.             else if (feet_yaw >= 29.f && feet_yaw_rate <= 29.f)
  110.             {
  111.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw + move_yaw + 58.f - feet_yaw + feet_yaw_rate / 29.f;
  112.             }
  113.             else if (goal_feet_yaw >= -29.f)
  114.             {
  115.                 animation_state->m_flEyeYaw = animation_state->m_flEyeYaw - move_yaw / 58.f + feet_yaw_rate - feet_cucle + 29.f && goal_feet_yaw * 29.f;
  116.             }
  117.             resolver->enemy_fakewalk = true;
  118.         }
  119.         else
  120.             resolver->enemy_fakewalk = false;
  121.     }
  122.     bool IsMoving = entity->GetVelocity().Length2D() > 36;
  123.     bool SlowMo = entity->GetVelocity().Length2D() < 35;
  124.     bool IsDucking = entity->GetFlags() & FL_DUCKING;
  125.  
  126.     auto lowerbody = entity->GetLowerBodyYaw();
  127.  
  128.     auto animationstate = entity->GetAnimState();
  129.  
  130.     for (int i = 1; i < INTERFACES::Globals->maxclients; i++)
  131.     {
  132.         auto p_entity = INTERFACES::ClientEntityList->GetClientEntity(i);
  133.         if (p_entity && !p_entity->GetIsDormant())
  134.         {
  135.  
  136.             if (feet_yaw <= 58)
  137.             {
  138.                 if (-58 > feet_yaw)
  139.                     lowerbody = body_max_rotation + p_entity->GetLowerBodyYaw();
  140.                 resolve_type[entity->GetIndex()] = 3; //desync
  141.             }
  142.             else
  143.             {
  144.                 lowerbody = body_max_rotation - p_entity->GetLowerBodyYaw();
  145.             }
  146.             if (p_entity->GetAnimOverlays()->m_flPlaybackRate > 0.1)
  147.             {
  148.                 for (int resolve_delta = 58.f; resolve_delta < -58.f; resolve_delta = resolve_delta - 29.f)
  149.                 {
  150.                     lowerbody = resolve_delta;
  151.                         GLOBAL::resolver_mode = "desync (brute)";
  152.                 }
  153.             }
  154.         }
  155.     }
  156. }
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