Jump to content

Desync tutorial


Aqua
 Share

Recommended Posts

So in your createmove, or somewhere in your aa function that is called in createmove, you want to check if you are sending a packet (usually bSendPacket). If it is true, you do your real (just viewangles.yaw += base_angle,  or something like that). If you aren't sending a packet, then you do your fake. A good way to do this is viewangles.yaw += base_angle + get_max_delta * side. If you don't have a get max desync delta function, just google it lol. Seriously.

 

Anyway, doing it this way will not get you to desync while standing still I believe (or at least, not very much). There are a few ways we can fix this:

1) Micro movements

2) Breaking lby

I will talk about micromovements.

If you are standing still, you want to set your sidemove to a very low value (like 2.0f  - can be positive or negative, doesn't really matter)

 

here's an example:

 

cmd->viewangles.yaw += bSendPacket ? 0.f /*base angle*/ : get_max_delta() * side;

if (local_player.velocity().2d() == 0 || local_player.velocity().z == 0)

{
    cmd->sidemove = cmd->tick_count % 2 ? 2.f : -2.f; // alternates every other tick so we're not just walking, we're going left and right and generally not moving too far
}

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...