Open adem4ik opened 9 years ago
The displayed ping value is affected by cl_extrapolateTime value
I believe you mean cl_extrapolationTime https://github.com/Warsow/qfusion/blob/ad67e05a8c8d8724c2c5c1de481abe7aba933fb6/source/client/cl_main.c#L2082 . Just have checked it by myself, you're right, cl_extrapolationTime 0 makes the ping the same as for cl_extrapolate 0.
As I can see, client ping gets calculated by the server here: https://github.com/Warsow/qfusion/blob/fafad38e3f138c818c3fc5e1339b09d3cc2232e9/source/server/sv_client.c#L1118 And according to the comments above that string ping should be calculated in realtime, not in gametime, as it was done originally in Q2 engine: https://github.com/id-Software/Quake-2/blob/372afde46e7defc9dd2d719a1732b8ace1fa096e/server/sv_user.c#L593
The ping shown in the scoreboards is not the real ping time between the client and the server. It's the latency as it's displayed in the game. When you reduce the time it takes to display events the ping in the scoreboard is reduced too.
Remember that Q2 engine kept a buffer of 2 snapshots before starting drawing (so there could exist interpolation). This added a latency of one full snapshot that wasn't real ping. Extrapolation gets rid of such built in latency.
Cl_extrapolate 1 is default value, it is used to toggle prediction model.
With "1" ping is showed for 15-20ms lower than the real one, it can be checked by pressing TAB while connected to any internet server.
So it allows to mislead the opponent with ping showed ingame during the cups.
My suggestion is that it needs to be fixed, so with any value of cl_extrapolate there will be only one value of the ping showed ingame - the most real and accurate, as UI Server browser does so.