Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FakeSideLBY(CUserCmd *pCmd, bool &bSendPacket)
- {
- int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); ++i;
- IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
- IClientEntity *pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
- static bool isMoving;
- float PlayerIsMoving = abs(pLocal->GetVelocity().Length());
- if (PlayerIsMoving > 0.1) isMoving = true;
- else if (PlayerIsMoving <= 0.1) isMoving = false;
- int flip = (int)floorf(Interfaces::Globals->curtime / 1.1) % 2;
- static bool bFlipYaw;
- float flInterval = Interfaces::Globals->interval_per_tick;
- float flTickcount = pCmd->tick_count;
- float flTime = flInterval * flTickcount;
- if (std::fmod(flTime, 1) == 0.f)
- bFlipYaw = !bFlipYaw;
- if (PlayerIsMoving <= 0.1)
- {
- if (bSendPacket)
- {
- pCmd->viewangles.y += 180.f;
- }
- else
- {
- if (flip)
- {
- pCmd->viewangles.y += bFlipYaw ? 90.f : -90.f;
- }
- else
- {
- pCmd->viewangles.y -= hackManager.pLocal()->GetLowerBodyYaw() + bFlipYaw ? 90.f : -90.f;
- }
- }
- }
- else if (PlayerIsMoving > 0.1)
- {
- if (bSendPacket)
- {
- pCmd->viewangles.y += 180.f;
- }
- else
- {
- pCmd->viewangles.y += 90.f;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement