mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Rename nq's cl.last_received_message to cl.last_servermessage.
And make it double rather than float because absolute time should not be stored in a float.
This commit is contained in:
parent
0a89e88ef3
commit
7e2fcd1fbd
4 changed files with 4 additions and 3 deletions
|
@ -185,7 +185,7 @@ typedef struct {
|
||||||
double oldtime; // Previous cl.time, time-oldtime is used
|
double oldtime; // Previous cl.time, time-oldtime is used
|
||||||
// to decay light values and smooth step ups
|
// to decay light values and smooth step ups
|
||||||
|
|
||||||
float last_received_message; // (realtime) for net trouble icon
|
double last_servermessage; // (realtime) for net trouble icon
|
||||||
|
|
||||||
/* information that is static for the entire time connected to a server */
|
/* information that is static for the entire time connected to a server */
|
||||||
|
|
||||||
|
|
|
@ -426,7 +426,6 @@ CL_ReadFromServer (void)
|
||||||
if (!ret)
|
if (!ret)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
cl.last_received_message = realtime;
|
|
||||||
CL_ParseServerMessage ();
|
CL_ParseServerMessage ();
|
||||||
} while (ret && cls.state >= ca_connected);
|
} while (ret && cls.state >= ca_connected);
|
||||||
|
|
||||||
|
|
|
@ -833,6 +833,8 @@ CL_ParseServerMessage (void)
|
||||||
static dstring_t *stuffbuf;
|
static dstring_t *stuffbuf;
|
||||||
signon_t so;
|
signon_t so;
|
||||||
|
|
||||||
|
cl.last_servermessage = realtime;
|
||||||
|
|
||||||
// if recording demos, copy the message out
|
// if recording demos, copy the message out
|
||||||
if (cl_shownet->int_val == 1)
|
if (cl_shownet->int_val == 1)
|
||||||
Sys_Printf ("%i ", net_message->message->cursize);
|
Sys_Printf ("%i ", net_message->message->cursize);
|
||||||
|
|
|
@ -54,7 +54,7 @@ static qpic_t *scr_net;
|
||||||
static void
|
static void
|
||||||
SCR_DrawNet (void)
|
SCR_DrawNet (void)
|
||||||
{
|
{
|
||||||
if (realtime - cl.last_received_message < 0.3)
|
if (realtime - cl.last_servermessage < 0.3)
|
||||||
return;
|
return;
|
||||||
if (cls.demoplayback)
|
if (cls.demoplayback)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue