Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Timer delay{};
  2. int val = 0;
  3. int value[32] = { 0 };
  4. void FakeCrouch(CUserCmd *cmd)
  5. {
  6. if (!crouch || !(cmd->buttons & IN_DUCK))
  7. return;
  8. static bool bDoCrouch = false;
  9. static int iCrouchCount = 0;
  10.  
  11. if (iCrouchCount == *dur)
  12. {
  13. iCrouchCount = 0;
  14. bDoCrouch = !bDoCrouch;
  15. }
  16. else
  17. {
  18. iCrouchCount++;
  19. }
  20. if (bDoCrouch)
  21. {
  22. cmd->buttons |= IN_DUCK;
  23. *bSendPackets = true;
  24. }
  25. else
  26. {
  27. if (iCrouchCount + *dursneak < *dur)
  28. cmd->buttons &= ~IN_DUCK;
  29. *bSendPackets = false;
  30. }
  31.  
  32. if ((cmd->buttons & IN_ATTACK))
  33. *bSendPackets = true;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement