Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

_Host_Frame question

| Inside3d Forums Forum Index -> Engine Programming

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 |

Display posts from previous:

| Inside3d Forums Forum Index -> Engine Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group