Advertisement
slownessCollapse

Untitled

Aug 3rd, 2019
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. if (c_config::get().desync == 3 && Globals::LocalPlayer->AnimState()) {
  2. float desync = Globals::LocalPlayer->DesyncValue();
  3. float balance = 1.0f;
  4.  
  5. int type = 2;
  6. if (type == 2)
  7. balance = -1.0f;
  8.  
  9. if (g_pGlobalVars->curtime <= next_lby_update(Globals::pCmd->viewangles.y, Globals::pCmd)) {
  10.  
  11. auto net_channel = g_pEngine->GetNetChannel();
  12.  
  13. if (!net_channel)
  14. return;
  15.  
  16. if (net_channel->m_nChokedPackets >= 2) {
  17. Globals::pCmd->viewangles.y = g_Math.NormalizeYaw(Globals::pCmd->viewangles.y);
  18. return;
  19. }
  20.  
  21.  
  22. if (type == 1)
  23. Globals::pCmd->viewangles.y -= 100.0f;
  24. else
  25. Globals::pCmd->viewangles.y += (balance * 120.0f);
  26. }
  27. else if (type != 1) {
  28. Globals::pCmd->viewangles.y -= (desync + 30.0f) * balance;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement