Forum

_Host_Frame question

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

_Host_Frame question

Postby r00k » Tue Feb 24, 2009 12:22 am

Is there any reason why my ping is 10ms less if I send client commands AFTER the server sends its info vs before?

Code: Select all
   // 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??
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby r00k » Wed Feb 25, 2009 7:48 pm

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... :P
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest