View previous topic :: View next topic |
Author |
Message |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Tue Feb 24, 2009 12:22 am Post subject: _Host_Frame question |
|
|
Is there any reason why my ping is 10ms less if I send client commands AFTER the server sends its info vs before?
Code: |
// if running the server remotely, send intentions now after
// the incoming messages have been read
//R00: moved down ...
// if (!sv.active)
// CL_SendCmd ();
host_time += host_frametime;
// fetch results from server
if (cls.state == ca_connected)
CL_ReadFromServer ();
// if running the server remotely, send intentions now after
// the incoming messages have been read
if (!sv.active)
CL_SendCmd ();
|
Or it is a cosmetic timing issue?? |
|
Back to top |
|
 |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Wed Feb 25, 2009 7:48 pm Post subject: |
|
|
It seems like its a more true representation of the ping times, as CL_ReadfromServer timestamps when you read the last message, and CL_SendMove writes to the server the duration since the timestamp. Before it had to wait until the end of the cycle before it sent the cl.mtime[0] back to the server. So the extra 10ms was the client processing the server's data. If i ping thru cmd.exe in windows i get average 35ms which is concurrent to what the code is telling me.
So, i guess its okay...  |
|
Back to top |
|
 |
|