From 632683e703bef0954a10ba3f3c08460603fd9cec Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Mon, 17 Jun 2002 16:18:34 +0000 Subject: [PATCH] Change `sv_maxrate 0` to unlimited. Change default to 10000. Remove forced ceiling of 10000. --- nq/source/cl_parse.c | 2 +- qw/source/cl_parse.c | 2 +- qw/source/net_chan.c | 2 +- qw/source/sv_init.c | 2 +- qw/source/sv_main.c | 6 +++--- qw/source/sv_user.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index 4bc0ecdfc..81cb15b58 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -251,7 +251,7 @@ CL_ParseServerInfo (void) str = MSG_ReadString (net_message); strncpy (cl.levelname, str, sizeof (cl.levelname) - 1); - // seperate the printfs so the server message can have a color + // separate the printfs so the server message can have a color Con_Printf ("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36" "\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n" "\n"); diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index 76ec159ce..fef91f3b0 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -688,7 +688,7 @@ CL_ParseServerData (void) movevars.waterfriction = MSG_ReadFloat (net_message); movevars.entgravity = MSG_ReadFloat (net_message); - // seperate the printfs so the server message can have a color + // separate the printfs so the server message can have a color Con_Printf ("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36" "\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n"); Con_Printf ("%c%s\n", 2, str); diff --git a/qw/source/net_chan.c b/qw/source/net_chan.c index 3341700d2..f91d94cda 100644 --- a/qw/source/net_chan.c +++ b/qw/source/net_chan.c @@ -198,7 +198,7 @@ Netchan_Setup (netchan_t *chan, netadr_t adr, int qport) chan->qport = qport; - chan->rate = 1.0 / 2500; + chan->rate = 1.0 / 2500.0; } #define MAX_BACKUP 200 diff --git a/qw/source/sv_init.c b/qw/source/sv_init.c index c14263ecd..966ca11d0 100644 --- a/qw/source/sv_init.c +++ b/qw/source/sv_init.c @@ -141,7 +141,7 @@ SV_CreateBaseline (void) ((entity_state_t*)svent->data)->glow_color = 254; ((entity_state_t*)svent->data)->colormod = 255; - // flush the signon message out to a seperate buffer if nearly full + // flush the signon message out to a separate buffer if nearly full SV_FlushSignon (); // add to the message diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index c783d83a0..b480456f2 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -2049,7 +2049,7 @@ SV_InitLocal (void) NULL, "Time cheat check interval"); sv_minqfversion = Cvar_Get ("sv_minqfversion", "0", CVAR_SERVERINFO, Cvar_Info, "Minimum QF version on client"); - sv_maxrate = Cvar_Get ("sv_maxrate", "0", CVAR_SERVERINFO, Cvar_Info, + sv_maxrate = Cvar_Get ("sv_maxrate", "10000", CVAR_SERVERINFO, Cvar_Info, "Maximum allowable rate"); sv_allow_log = Cvar_Get ("sv_allow_log", "1", CVAR_NONE, NULL, "Allow remote logging"); @@ -2324,10 +2324,10 @@ SV_ExtractFromUserinfo (client_t *cl) if (strlen (val)) { i = atoi (val); - if ((sv_maxrate->int_val) && (i > sv_maxrate->int_val)) { + if (sv_maxrate->int_val) { i = bound (500, i, sv_maxrate->int_val); } else { - i = bound (500, i, 10000); + i = max (500, i); } cl->netchan.rate = 1.0 / i; } diff --git a/qw/source/sv_user.c b/qw/source/sv_user.c index ac78924fd..047f8476e 100644 --- a/qw/source/sv_user.c +++ b/qw/source/sv_user.c @@ -1076,10 +1076,10 @@ SV_Rate_f (void) } rate = atoi (Cmd_Argv (1)); - if ((sv_maxrate->int_val) && (rate > sv_maxrate->int_val)) { + if (sv_maxrate->int_val) { rate = bound (500, rate, sv_maxrate->int_val); } else { - rate = bound (500, rate, 10000); + rate = max (500, rate); } SV_ClientPrintf (host_client, PRINT_HIGH, "Net rate set to %i\n", rate);