Original Post — Direct link
over 2 years ago - /u/Scriptacus - Direct link

What likely happened here is that, from the server's perspective, you took damage from the other player before your shot was fired.

The issue is that taking damage has secondary effects including tagging (movement slowdown) and view punch, both of which can potentially affect your aim. Clients basically run in the future, where you're predicting your own aim and shots, but you can't predict damage that you take since that happens in real time on the server, and the effects from it are sent to the client after the fact.

Example; you fired your weapon on frame 650, but the server is still only on frame 645 (your prediction has you running 5 frames in the future in this example). The server gets a weapon firing message from your opponent on frame 648 and verifies (via reconciliation) that the shot did indeed hit you on frame 648. The server then applies the secondary effects from the damage, which include things that affect your aim. The server receives the message from you saying that you fired on frame 650 and finds that your shot missed; you and the server don't agree about your aim direction on frame 650 because the server is taking the secondary effects into account, even though your client didn't know about them at the time of firing. This is called a misprediction.

The only way to "fix" this particular issue (secondary effects from taking damage) is to either remove view punch and tagging entirely, or delay their application on the server. Either of these would flip the situation in your clip on it's head; the other player would clearly have unloaded a few rounds into your face on his own client, only to have you bullseye him with a Kraber shot while taking damage.

https://www.gabrielgambetta.com/client-side-prediction-server-reconciliation.html