From 46e2424bb21132cfe58e0c50e8cc2a6413ec328e Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:08:40 +0100 Subject: [PATCH] Engine: increase default stringcmd quota to 32 16 was causing the clients to get kicked when they hover and moving their cursor over the characters in character select very fast. The scripts tell the server to update the view to other clients but unfortunately the system relies on string commands (ClientCommand) and is pending a rewrite to incorporate a proper RPC just like Server and UI has. For now we increase the limit to 32 as 32 is still outside the exploitable range when the game is ran without dev tools enabled. --- src/engine/client/client.cpp | 2 +- src/engine/cmd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 10399b16..00953336 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -75,7 +75,7 @@ static ConVar sv_onlineAuthValidateIssuedAt("sv_onlineAuthValidateIssuedAt", "1" static ConVar sv_onlineAuthExpiryTolerance("sv_onlineAuthExpiryTolerance", "1", FCVAR_DEVELOPMENTONLY, "The online authentication token 'expiry' claim tolerance in seconds", true, 0.f, true, float(UINT8_MAX), "Must range between [0,255]"); static ConVar sv_onlineAuthIssuedAtTolerance("sv_onlineAuthIssuedAtTolerance", "30", FCVAR_DEVELOPMENTONLY, "The online authentication token 'issued at' claim tolerance in seconds", true, 0.f, true, float(UINT8_MAX), "Must range between [0,255]"); -static ConVar sv_quota_stringCmdsPerSecond("sv_quota_stringCmdsPerSecond", "16", FCVAR_RELEASE, "How many string commands per second clients are allowed to submit, 0 to disallow all string commands", true, 0.f, false, 0.f); +static ConVar sv_quota_stringCmdsPerSecond("sv_quota_stringCmdsPerSecond", "32", FCVAR_RELEASE, "How many string commands per second clients are allowed to submit, 0 to disallow all string commands", true, 0.f, false, 0.f); //--------------------------------------------------------------------------------- // Purpose: check whether this client is authorized to join this server diff --git a/src/engine/cmd.cpp b/src/engine/cmd.cpp index fb52a7f8..df0c3508 100644 --- a/src/engine/cmd.cpp +++ b/src/engine/cmd.cpp @@ -61,7 +61,7 @@ bool Cbuf_AddTextWithMarkers(const char* const pText, const ECmdExecutionMarker // Output : true on success, false otherwise //----------------------------------------------------------------------------- #ifndef DEDICATED -ConVar cl_quota_stringCmdsPerSecond("cl_quota_stringCmdsPerSecond", "16", FCVAR_RELEASE, "How many string commands per second user is allowed to submit, 0 to allow all submissions.", true, 0.f, false, 0.f); +ConVar cl_quota_stringCmdsPerSecond("cl_quota_stringCmdsPerSecond", "32", FCVAR_RELEASE, "How many string commands per second user is allowed to submit, 0 to allow all submissions.", true, 0.f, false, 0.f); #endif // DEDICATED bool Cmd_ForwardToServer(const CCommand* args)