Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.99 KB | None | 0 0
  1. case 7: //Domzie's PResolver
  2.                                     bHasAA = ((*flPitch == 90.0f) || (*flPitch == 270.0f));
  3.                                     bSpinbot = false;
  4.                                     int ServerTime = (float)Interfaces::Globals->interval_per_tick * hackManager.pLocal()->GetTickBase() * 1.4000;
  5.                                     bool flip = !flip;
  6.                                     int value = ServerTime % 2;
  7.                                     static bool Turbo = false;
  8.                                     static float lowerDelta[64];
  9.                                     static float lastYaw[64];
  10.                                     static float OldLowerBodyYaws[64];
  11.                                     static float OldYawDeltas[64];
  12.                                     static float bodyeyedelta[64];
  13.  
  14.                                     if (!bShotLastTime[((IClientEntity*)(pStruct))->GetIndex()]
  15.                                         && (fabsf(flYaw - vLast[((IClientEntity*)(pStruct))->GetIndex()].y) > 15.0f) && !bHasAA)
  16.                                     {
  17.                                         flYaw = vLast[((IClientEntity*)(pStruct))->GetIndex()].y;
  18.                                         bShotLastTime[((IClientEntity*)(pStruct))->GetIndex()] = true;
  19.                                     }
  20.                                     else
  21.                                     {
  22.                                         if (bShotLastTime[((IClientEntity*)(pStruct))->GetIndex()]
  23.                                             && (fabsf(flYaw - vLast[((IClientEntity*)(pStruct))->GetIndex()].y) > 15.0f))
  24.                                         {
  25.                                             bShotLastTime[((IClientEntity*)(pStruct))->GetIndex()] = true;
  26.                                             bSpinbot = true;
  27.                                         }
  28.                                         else
  29.                                         {
  30.                                             bShotLastTime[((IClientEntity*)(pStruct))->GetIndex()] = false;
  31.                                         }
  32.                                     }
  33.  
  34.                                     vLast[((IClientEntity*)(pStruct))->GetIndex()].y = flYaw;
  35.  
  36.  
  37.                                     bool bTmp = bJitterFix[((IClientEntity*)(pStruct))->GetIndex()];
  38.  
  39.                                     bJitterFix[((IClientEntity*)(pStruct))->GetIndex()] = (flYaw >= 180.0f && flYaw <= 360.0f);
  40.  
  41.                                     if (bTmp && (flYaw >= 0.0f && flYaw <= 180.0f))
  42.                                     {
  43.                                         flYaw += 359.0f;
  44.                                     }
  45.                                     float curLower = pEntity->GetLowerBodyYaw();
  46.                                     float curYaw = eyeAngles->y;
  47.                                     static bool isMoving;
  48.                                     float PlayerIsMoving = abs(pEntity->GetVelocity().Length());
  49.                                     if (PlayerIsMoving > 0.1) isMoving = true;
  50.                                     else if (PlayerIsMoving <= 0.1) isMoving = false;
  51.  
  52.                                     bodyeyedelta[i] = pEntity->GetEyeAngles().y - pEntity->GetLowerBodyYaw();
  53.                                     NormalizeVector2(bodyeyedelta[i]);
  54.  
  55.                                     if (fabsf(bodyeyedelta[i]) > 15.f) {
  56.                                         if (isMoving) {
  57.                                             eyeAngles->y = pEntity->GetLowerBodyYaw();
  58.                                         }
  59.                                         else {
  60.                                             if (curYaw != lastYaw[i]) {
  61.                                                 eyeAngles->y += bodyeyedelta[i];
  62.                                                 lastYaw[i] = curYaw;
  63.                                                 {
  64.  
  65.                                                     switch (value) {
  66.                                                     case 1:
  67.  
  68.                                                         if (Turbo)
  69.                                                         {
  70.                                                             flYaw -= TLBY / 2 + 135;
  71.                                                             Turbo = !Turbo;
  72.                                                         }
  73.                                                         else
  74.                                                         {
  75.                                                             flYaw += TLBY / 2 + 135;
  76.                                                             Turbo = !Turbo;
  77.                                                         }
  78.                                                         if (flYaw > 5) {
  79.                                                             flYaw = 180;
  80.                                                         }
  81.                                                         float CurYaw = TLBY;
  82.                                                         if (OldLowerBodyYaws[i] != CurYaw) {
  83.                                                             OldYawDeltas[i] = flYaw - CurYaw;
  84.                                                             OldLowerBodyYaws[i] = CurYaw;
  85.                                                             flYaw = CurYaw;
  86.                                                             continue;
  87.                                                         }
  88.                                                         else {
  89.                                                             flYaw = TLBY - OldYawDeltas[i];
  90.                                                         }
  91.                                                     }
  92.                                                     float curLower = pEntity->GetLowerBodyYaw();
  93.                                                     float curYaw = flYaw;
  94.  
  95.                                                     lowerDelta[i] = curYaw - curLower;
  96.                                                     NormalizeVector1337(lowerDelta[i]);
  97.  
  98.                                                     if (fabs(lowerDelta[i]) > 15.f) {
  99.                                                         if (pEntity->isMoving()) {
  100.                                                             flYaw = TLBY;
  101.                                                         }
  102.                                                         else {
  103.                                                             if (curYaw != lastYaw[i]) {
  104.                                                                 flYaw += lowerDelta[i];
  105.                                                                 lastYaw[i] = curYaw;
  106.                                                             }
  107.                                                         }
  108.                                                     }
  109.                                                 }
  110.                                                 /*if (Menu::Window.RageBotTab.AccuracyBrute.GetIndex() == 2)//Monster
  111.                                                 {
  112.                                                     if (Globals::missedshots > 3 && Globals::missedshots < 21)
  113.                                                     {
  114.                                                         if (MeetsLBYReq && lbyupdated)
  115.                                                         {
  116.                                                             pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw();
  117.                                                         }
  118.                                                         else if (!MeetsLBYReq && lbyupdated)
  119.                                                         {
  120.                                                             switch (Globals::Shots % 4)
  121.                                                             {
  122.                                                             case 1:
  123.                                                                 pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 15;
  124.                                                                 break;
  125.                                                             case 2:
  126.                                                                 pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 40;
  127.                                                                 break;
  128.                                                             case 3:
  129.                                                                 pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() + 15;
  130.                                                                 break;
  131.                                                             case 4:
  132.                                                                 pEntity->GetEyeAnglesXY()->y = pEntity->GetLowerBodyYaw() - 40;
  133.                                                                 break;
  134.                                                             }
  135.                                                         }
  136.                                                         else
  137.                                                             pEntity->GetEyeAnglesXY()->y = rand() % 180 - rand() % 35;
  138.                                                     }
  139.  
  140.                                                     else if (Globals::missedshots >= 2 && Globals::missedshots <= 3)
  141.                                                     {
  142.                                                         if (MeetsLBYReq && lbyupdated)
  143.                                                         {
  144.                                                             pEntity->GetEyeAnglesXY()->y = ResolverSetup::finallbydelta[pEntity->GetIndex()];
  145.                                                         }
  146.                                                         else
  147.                                                             pEntity->GetEyeAnglesXY()->y = ResolverSetup::finaldelta[pEntity->GetIndex()];
  148.                                                     }
  149.                                                     else
  150.                                                     {
  151.                                                         if (MeetsLBYReq && lbyupdated)
  152.                                                         {
  153.                                                             bool timer;
  154.                                                             if (timer)
  155.                                                                 pEntity->GetEyeAnglesXY()->y = ResolverSetup::finallbydelta[pEntity->GetIndex()] + rand() % 35;
  156.                                                             else
  157.                                                                 pEntity->GetEyeAnglesXY()->y = ResolverSetup::finallbydelta[pEntity->GetIndex()] - rand() % 35;
  158.                                                             timer = !timer;
  159.                                                         }
  160.                                                         else
  161.                                                         {
  162.                                                             bool timer;
  163.                                                             if (timer)
  164.                                                                 pEntity->GetEyeAnglesXY()->y = ResolverSetup::finaldelta[pEntity->GetIndex()] + rand() % 35;
  165.                                                             else
  166.                                                                 pEntity->GetEyeAnglesXY()->y = ResolverSetup::finaldelta[pEntity->GetIndex()] - rand() % 35;
  167.                                                             timer = !timer;*/
  168.                                             }
  169.                                         }
  170.                                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement