memset(&cls.capturevideo, 0, sizeof(cls.capturevideo));
// soundrate is figured out on the first SoundFrame
cls.capturevideo.active = true;
- cls.capturevideo.starttime = Sys_DoubleTime();
+ cls.capturevideo.starttime = realtime;
cls.capturevideo.framerate = bound(1, cl_capturevideo_fps.value, 1000);
cls.capturevideo.soundrate = S_GetSoundRate();
cls.capturevideo.frame = 0;
if (cls.capturevideo.realtime)
{
// preserve sound sync by duplicating frames when running slow
- newframenum = (int)((Sys_DoubleTime() - cls.capturevideo.starttime) * cls.capturevideo.framerate);
+ newframenum = (int)((realtime - cls.capturevideo.starttime) * cls.capturevideo.framerate);
}
else
newframenum = cls.capturevideo.frame + 1;
prog->globals.server->self = PRVM_EDICT_TO_PROG(host_client->edict);
PRVM_ExecuteProgram (prog->globals.server->ClientConnect, "QC function ClientConnect is missing");
- if ((Sys_DoubleTime() - host_client->connecttime) <= sv.time)
+ if (svs.maxclients > 1 || cls.state == ca_dedicated)
Con_Printf("%s entered the game\n", host_client->name);
PRVM_ExecuteProgram (prog->globals.server->PutClientInServer, "QC function PutClientInServer is missing");
#ifdef STANDALONETEST
if (i < MAX_NAMECACHE)
#else
- if (i < MAX_NAMECACHE && Sys_DoubleTime() < namecache[i].expirationtime)
+ if (i < MAX_NAMECACHE && realtime < namecache[i].expirationtime)
#endif
{
*address = namecache[i].address;
namecache[namecacheposition].name[i] = name[i];
namecache[namecacheposition].name[i] = 0;
#ifndef STANDALONETEST
- namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 12 * 3600; // 12 hours
+ namecache[namecacheposition].expirationtime = realtime + 12 * 3600; // 12 hours
#endif
namecache[namecacheposition].address = *address;
namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE;
namecache[namecacheposition].name[i] = name[i];
namecache[namecacheposition].name[i] = 0;
#ifndef STANDALONETEST
- namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 12 * 3600; // 12 hours
+ namecache[namecacheposition].expirationtime = realtime + 12 * 3600; // 12 hours
#endif
namecache[namecacheposition].address = *address;
namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE;
namecache[namecacheposition].name[i] = name[i];
namecache[namecacheposition].name[i] = 0;
#ifndef STANDALONETEST
- namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 12 * 3600; // 12 hours
+ namecache[namecacheposition].expirationtime = realtime + 12 * 3600; // 12 hours
#endif
namecache[namecacheposition].address.addresstype = LHNETADDRESSTYPE_NONE;
namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE;
continue;
}
#ifndef STANDALONETEST
- if (cl_netlocalping.value && (Sys_DoubleTime() - cl_netlocalping.value * (1.0 / 2000.0)) < p->sentdoubletime)
+ if (cl_netlocalping.value && (realtime - cl_netlocalping.value * (1.0 / 2000.0)) < p->sentdoubletime)
continue;
#endif
if (value == 0 && p->destinationport == lhnetsocket->address.addressdata.loop.port)
p->next->prev = p;
p->prev->next = p;
#ifndef STANDALONETEST
- p->sentdoubletime = Sys_DoubleTime();
+ p->sentdoubletime = realtime;
#endif
value = contentlength;
}
void ServerList_QueryList(qboolean querydp, qboolean queryqw)
{
- //masterquerytime = realtime;
- masterquerytime = Sys_DoubleTime();
+ masterquerytime = realtime;
masterquerycount = 0;
masterreplycount = 0;
serverquerycount = 0;
// store the data the engine cares about (address and ping)
strlcpy(serverlist_cache[serverlist_cachecount].info.cname, addressstring, sizeof(serverlist_cache[serverlist_cachecount].info.cname));
serverlist_cache[serverlist_cachecount].info.ping = 100000;
- //serverlist_cache[serverlist_cachecount].querytime = realtime;
- serverlist_cache[serverlist_cachecount].querytime = Sys_DoubleTime();
+ serverlist_cache[serverlist_cachecount].querytime = realtime;
// if not in the slist menu we should print the server to console
if (serverlist_consoleoutput)
Con_Printf("querying %s\n", addressstring);
// if this is the first reply from this server, count it as having replied
if (serverlist_cache[n].info.ping == 100000)
serverreplycount++;
- pingtime = (int)((Sys_DoubleTime() - serverlist_cache[n].querytime) * 1000.0 + 0.5);
+ pingtime = (int)((realtime - serverlist_cache[n].querytime) * 1000.0 + 0.5);
pingtime = bound(0, pingtime, 9999);
// update the ping
serverlist_cache[n].info.ping = min(serverlist_cache[n].info.ping, pingtime);
NetConn_WriteString(cl_sockets[socket], "\377\377\377\377getinfo", &address);
}
- //entry->querytime = realtime;
- entry->querytime = Sys_DoubleTime();
+ entry->querytime = realtime;
entry->querycounter++;
// if not in the slist menu we should print the server to console
static double framerate = 0;
static int framecount = 0;
double newtime;
- newtime = Sys_DoubleTime();
+ newtime = realtime;
if (newtime >= nexttime)
{
framerate = framecount / (newtime - lasttime);