SHARE
TWEET

ggg

a guest Aug 25th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void Real()
  2. {
  3.     if (c_config::get().desync && Globals::LocalPlayer->AnimState()) {
  4.         float desync = (Globals::LocalPlayer->DesyncValue());
  5.         float balance = 1.0f;
  6.  
  7.         int type = rand() % 2;
  8.         if (type == 2)
  9.             balance = -1.0f;
  10.         bool invert;
  11.         if (next_lby_update(Globals::pCmd->viewangles.y, Globals::pCmd)) {
  12.  
  13.             if (type == 1)
  14.                 Globals::pCmd->viewangles.y -= 180.0f;
  15.             else
  16.                 Globals::pCmd->viewangles.y += (balance * 60.0f);
  17.         }
  18.  
  19.         else if (type != 1) {
  20.             int jitter_side = invert ? 1 : -1;
  21.             Globals::pCmd->viewangles.y += 180.0f;
  22.  
  23.             float desync = GetMaxDelta(Globals::LocalPlayer->AnimState());
  24.             float lby_delta = 60.0f - desync + 58.0f;
  25.             float desync_length = 60.0f - lby_delta * 60.0f;
  26.             float jitter = 60.0f * jitter_side;
  27.             auto net_channel = g_pEngine->GetNetChannel();
  28.  
  29.             if (!net_channel)
  30.                 return;
  31.             if (net_channel->m_nChokedPackets >= 10) {
  32.                 Globals::pCmd->viewangles.y = g_Math.NormalizeYaw(Globals::pCmd->viewangles.y);
  33.                 return;
  34.             }
  35.             if (jitter_side == 1)
  36.                 Globals::pCmd->viewangles.y += desync_length;
  37.  
  38.             else if (jitter_side == -1)
  39.                 Globals::pCmd->viewangles.y -= desync_length;
  40.  
  41.  
  42.             int v19 = 0;
  43.             if (g_pGlobalVars->curtime < g_pGlobalVars->curtime <= next_lby_update(Globals::pCmd->viewangles.y, Globals::pCmd)) {
  44.                 v19 = rand() % 30;
  45.             }
  46.             else {
  47.                 m_iJitter = 0;
  48.             }
  49.  
  50.             int v20 = v19 - 1;
  51.             if (v20) {
  52.                 if (v20 == 1) {
  53.                     if (jitter_side == 1)
  54.                         Globals::pCmd->viewangles.y += lby_delta;
  55.                     else
  56.                         Globals::pCmd->viewangles.y += desync - 68;
  57.                 }
  58.             }
  59.             else {
  60.                 if (jitter_side == 1)
  61.                     Globals::pCmd->viewangles.y += desync - 68;
  62.                 else
  63.                     Globals::pCmd->viewangles.y += lby_delta;
  64.                 Globals::bSendPacket = false;
  65.             }
  66.  
  67.             if (++m_iJitter >= 3)
  68.                 m_iJitter = 0;
  69.  
  70.             Globals::pCmd->viewangles.y = g_Math.NormalizeYaw(Globals::pCmd->viewangles.y);
  71.         }
  72.     }
  73. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top