Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CMiscHacks::BhopMovement(CUserCmd* pCmd, Vector& OrigAng)
- {
- if (miscconfig.bCircleStrafer)
- CircleStrafe(pCmd, OrigAng.y);
- static int OldMouseX = OrigAng.y;
- int mousedx = OldMouseX - OrigAng.y;
- OldMouseX = OrigAng.y;
- static Vector LastOrigAng = Normalize(OrigAng);
- if (!(hackManager.pLocal()->GetFlags() & FL_ONGROUND) && pCmd->buttons & IN_JUMP)
- {
- if (!(hackManager.pLocal()->GetFlags() & FL_INWATER))
- if (miscconfig.bAutoJump)
- pCmd->buttons &= ~IN_JUMP;
- if (miscconfig.bAutoStrafe)
- {
- if (hackManager.pLocal()->GetVelocity().Length2D() == 0 && (pCmd->forwardmove == 0 && pCmd->sidemove == 0))
- {
- pCmd->forwardmove = 450.f;
- }
- else if (pCmd->forwardmove == 0 && pCmd->sidemove == 0)
- {
- if (miscconfig.bAutoStrafe == 0)
- {
- pCmd->forwardmove = 0.f;
- pCmd->sidemove = pCmd->mousedx < 0.0f ? -450.f : 450.f;
- }
- else
- {
- if (pCmd->mousedx > 1 || pCmd->mousedx < -1) {
- pCmd->sidemove = pCmd->mousedx < 0.0f ? -450.f : 450.f;
- }
- else {
- pCmd->forwardmove = 4200.0f / hackManager.pLocal()->GetVelocity().Length2D();
- pCmd->sidemove = (pCmd->command_number % 2) == 0 ? -450.f : 450.f;
- if (pCmd->forwardmove > 450.f)
- pCmd->forwardmove = 450.f;
- }
- }
- }
- }
- }
- else if (pCmd->buttons & IN_JUMP)
- pCmd->forwardmove = 450.f;
- LastOrigAng.y = Normalize_y(LastOrigAng.y);
- LastOrigAng = Normalize(OrigAng);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement