MantisBT - Zandronum
View Issue Details
0002295Zandronum[All Projects] Bugpublic2015-06-08 21:002017-10-23 15:06
unknownna 
Leonard 
normalminoralways
needs testingopen 
2.0 
3.1 
0002295: Wall-jitter misprediction issue with high ping
Quote from Torr Samaho
Quote from unknownna
But I noticed a client-side misprediction that is not present in ZDaemon. You jitter when bumping into every wall in Zandronum.

It seems that the client is sometimes mispredicting how much the player is sliding against a wall, but only if the player changes his movement.
1. zandronum -host
2. Connect a client to the server with an emulated ping of 603.
3. Join the game.
4. Move into walls at a slight angle with +forward and then release +forward.
No tags attached.
related to 0000106needs testing Leonard Client mispredicts its z position in swimmable water online 
has duplicate 0002638closed  Player prediction: desync when sliding on walls. 
Issue History
2015-06-08 21:00unknownnaNew Issue
2015-06-08 21:00unknownnaStatusnew => confirmed
2015-06-08 21:03unknownnaSummaryWall-jitter issue with high ping => Wall-jitter misprediction issue with high ping
2017-09-11 17:06DuskRelationship addedhas duplicate 0002638
2017-09-11 17:06DuskRelationship addedrelated to 0000106
2017-09-11 17:07DuskStatusconfirmed => needs review
2017-09-11 17:32LeonardNote Added: 0018273
2017-09-11 18:48DuskTarget Version => 3.1
2017-09-17 16:10Torr SamahoNote Added: 0018302
2017-09-17 16:10Torr SamahoStatusneeds review => feedback
2017-10-04 16:16LeonardStatusfeedback => needs testing
2017-10-23 15:05LeonardStatusneeds testing => assigned
2017-10-23 15:05LeonardAssigned To => Leonard
2017-10-23 15:06LeonardStatusassigned => needs testing

Notes
(0018273)
Leonard   
2017-09-11 17:32   
Pull request.

With the test wad: simply typing "+forward;wait;-forward" in console with 200 ping is enough to get the desync every time.

The problem comes from the fact that the player prediction doesn't actually set the player's ticcmd but only passes it as an argument.
This is problematic because the physics code later use that ticcmd to determine velocity:
In p_mobj.cpp, line 2559:

    if (mo->velx > -STOPSPEED && mo->velx < STOPSPEED
        && mo->vely > -STOPSPEED && mo->vely < STOPSPEED
        && (!player || (player->mo != mo)
            || !(player->cmd.ucmd.forwardmove | player->cmd.ucmd.sidemove)))
(0018302)
Torr Samaho   
2017-09-17 16:10   
Good finding! I just have a technical question, please see my comment on bitbucket.