MantisBT - Zandronum
View Issue Details
0003316Zandronum[All Projects] Bugpublic2017-10-28 01:452017-11-08 01:01
needs testingopen 
0003316: Unlagged is off by one tic every time
This affects both ping and tic-based unlagged.
As is explained in issue 0003315, P_PlayerThink is called before any mobj ticks and therefore moves.
However, the recording of players positions is done way after their bodies moved for the specified tic:
UNLAGGED_Tick (which calls UNLAGGED_RecordPlayer) is called in G_Ticker while the player's movements are processed in SERVER_Tick (which is what calls G_Ticker afterwards).
This means that the unlagged positions are recorded one tick too late.
Using the test wad and the debug commit referenced in 0002859:0018627:
-host a server on MAP01 (no need to enable sv_unlagged_debugactors)
-connect and join 2 clients
-align the clients horizontally
-make sure you test this with client 0 so as to not run into issue 0003315
-make sure to have cl_ticsperupdate on 1 so as to not run into 0003317
-shoot the other client
-if you have no latency to the server, you will hit however if you have at least one tic of latency (you may emulate the ping) you will always miss
-whenever you have at least one tic of latency, you are forced to aim right ahead of the player to land a hit (this may explain 0001705:0008281)
With the fix, using the steps to reproduce above, your hits will always land both with ping and gametic-based unlagged.
No tags attached.
parent of 0002859needs testing Leonard Gametic-based unlagged seemingly goes out of sync often compared to ping-based unlagged 
Not all the children of this issue are yet resolved or closed.
Issue History
2017-10-28 01:45LeonardNew Issue
2017-10-28 01:45LeonardStatusnew => assigned
2017-10-28 01:45LeonardAssigned To => Leonard
2017-10-28 01:56LeonardSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11206#r11206
2017-10-28 14:42LeonardNote Added: 0018634
2017-10-28 14:42LeonardStatusassigned => needs review
2017-10-28 16:47Torr SamahoNote Added: 0018636
2017-10-28 16:47Torr SamahoStatusneeds review => needs testing
2017-11-08 01:01LeonardRelationship addedparent of 0002859

2017-10-28 14:42   
Torr Samaho   
2017-10-28 16:47   
Thanks! I added your patch.