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:
Bill Currie 2013-02-02 17:35:09 +09:00
parent 0a89e88ef3
commit 7e2fcd1fbd
4 changed files with 4 additions and 3 deletions

View file

@ -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 */

View file

@ -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);

View file

@ -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);

View file

@ -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;