aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-07-07 22:13:06 +0000
committerzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-07-07 22:13:06 +0000
commit4f048d03758b5988d17720b901daa3914e242f79 (patch)
tree9f6bc07a1d991c626ae59293a49ced3a50033b0a
parent9a72375ef789be4c1bd5edf8f1cd2af5303b69be (diff)
downloadioquake3-aero-4f048d03758b5988d17720b901daa3914e242f79.tar.gz
ioquake3-aero-4f048d03758b5988d17720b901daa3914e242f79.zip
More 3966 business:
http://bugzilla.icculus.org/show_bug.cgi?id=3966 I'm hopeful that the server browser will surrender. git-svn-id: svn://svn.icculus.org/quake3/trunk@1581 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/client/cl_main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/code/client/cl_main.c b/code/client/cl_main.c
index ac50fb6..e77761b 100644
--- a/code/client/cl_main.c
+++ b/code/client/cl_main.c
@@ -3365,10 +3365,7 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) {
if ( cl_pinglist[i].adr.port && !cl_pinglist[i].time && NET_CompareAdr( from, cl_pinglist[i].adr ) )
{
// calc ping time
- if (cl_pinglist[i].start == cls.realtime)
- cl_pinglist[i].time = Sys_Milliseconds() - cl_pinglist[i].start + 1;
- else
- cl_pinglist[i].time = cls.realtime - cl_pinglist[i].start + 1;
+ cl_pinglist[i].time = Sys_Milliseconds() - cl_pinglist[i].start;
Com_DPrintf( "ping time %dms from %s\n", cl_pinglist[i].time, NET_AdrToString( from ) );
// save of info
@@ -3769,7 +3766,7 @@ void CL_GetPing( int n, char *buf, int buflen, int *pingtime )
if (!time)
{
// check for timeout
- time = cls.realtime - cl_pinglist[n].start;
+ time = Sys_Milliseconds() - cl_pinglist[n].start;
maxPing = Cvar_VariableIntegerValue( "cl_maxPing" );
if( maxPing < 100 ) {
maxPing = 100;
@@ -3876,7 +3873,7 @@ ping_t* CL_GetFreePing( void )
{
if (!pingptr->time)
{
- if (cls.realtime - pingptr->start < 500)
+ if (Sys_Milliseconds() - pingptr->start < 500)
{
// still waiting for response
continue;
@@ -3901,7 +3898,7 @@ ping_t* CL_GetFreePing( void )
for (i=0; i<MAX_PINGREQUESTS; i++, pingptr++ )
{
// scan for oldest
- time = cls.realtime - pingptr->start;
+ time = Sys_Milliseconds() - pingptr->start;
if (time > oldest)
{
oldest = time;
@@ -3954,7 +3951,7 @@ void CL_Ping_f( void ) {
pingptr = CL_GetFreePing();
memcpy( &pingptr->adr, &to, sizeof (netadr_t) );
- pingptr->start = cls.realtime;
+ pingptr->start = Sys_Milliseconds();
pingptr->time = 0;
CL_SetServerInfoByAddress(pingptr->adr, NULL, 0);
@@ -4026,7 +4023,7 @@ qboolean CL_UpdateVisiblePings_f(int source) {
}
}
memcpy(&cl_pinglist[j].adr, &server[i].adr, sizeof(netadr_t));
- cl_pinglist[j].start = cls.realtime;
+ cl_pinglist[j].start = Sys_Milliseconds();
cl_pinglist[j].time = 0;
NET_OutOfBandPrint( NS_CLIENT, cl_pinglist[j].adr, "getinfo xxx" );
slots++;