]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
New rate burst handling; cvars: cl_rate_burstsize, net_usesizelimit, net_burstreserve
[xonotic/darkplaces.git] / cl_main.c
index 180a90d5994e4f0185a1f8c8e1513f02d7a7d4b5..76f27168b6efe2ee4cffd152c3e4059b244e7969 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -268,6 +268,11 @@ void CL_SetInfo(const char *key, const char *value, qboolean send, qboolean allo
                        MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
                        MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate \"%s\"", value));
                }
+               else if (!strcasecmp(key, "rate_burstsize"))
+               {
+                       MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
+                       MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate_burstsize \"%s\"", value));
+               }
        }
 }
 
@@ -383,9 +388,9 @@ void CL_Disconnect(void)
                        Con_DPrint("Sending clc_disconnect\n");
                        MSG_WriteByte(&buf, clc_disconnect);
                }
-               NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, false);
-               NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, false);
-               NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, false);
+               NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false);
+               NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false);
+               NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false);
                NetConn_Close(cls.netcon);
                cls.netcon = NULL;
        }