From: havoc Date: Thu, 16 Feb 2006 07:24:09 +0000 (+0000) Subject: remove an unused extern for sys_ticrate, and added a comment warning about improper... X-Git-Tag: xonotic-v0.1.0preview~4322 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=b38dfe0d586f29e2c909a98eaaf81e0f7e1f0eed remove an unused extern for sys_ticrate, and added a comment warning about improper rate limiting if sys_ticrate is 0 (but it should never be 0 on a real server) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5989 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_input.c b/cl_input.c index 786e8698..d1af6899 100644 --- a/cl_input.c +++ b/cl_input.c @@ -59,7 +59,6 @@ kbutton_t in_button9, in_button10, in_button11, in_button12, in_button13, in_but int in_impulse; -extern cvar_t sys_ticrate; void KeyDown (kbutton_t *b) diff --git a/sv_main.c b/sv_main.c index b817cc97..923617c6 100644 --- a/sv_main.c +++ b/sv_main.c @@ -1207,6 +1207,8 @@ qboolean SV_SendClientDatagram (client_t *client) if (sv_maxrate.integer != maxrate) Cvar_SetValueQuick(&sv_maxrate, maxrate); + // this rate limiting does not understand sys_ticrate 0 + // (but no one should be running that on a server!) rate = bound(NET_MINRATE, client->rate, maxrate); rate = (int)(client->rate * sys_ticrate.value); maxsize = bound(100, rate, 1400);