From 5b6856876e23acd4c51aa1a90e2401593e628726 Mon Sep 17 00:00:00 2001 From: s1lent Date: Sun, 11 Aug 2019 23:26:14 +0700 Subject: [PATCH] HLTV-Core: Increased rates threshold --- rehlds/HLTV/Core/src/Server.cpp | 4 ++-- rehlds/HLTV/Core/src/Server.h | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/rehlds/HLTV/Core/src/Server.cpp b/rehlds/HLTV/Core/src/Server.cpp index 3e8c407..965078b 100644 --- a/rehlds/HLTV/Core/src/Server.cpp +++ b/rehlds/HLTV/Core/src/Server.cpp @@ -480,13 +480,13 @@ void Server::SetVoiceBlocking(bool state) void Server::SetRate(int rate) { - m_Rate = Q_clamp(rate, 1000, MAX_SERVER_RATE); + m_Rate = clamp(rate, MIN_SERVER_RATE, MAX_SERVER_RATE); SetUserInfo("rate", COM_VarArgs("%i", m_Rate)); } void Server::SetUpdateRate(int updaterate) { - m_UpdateRate = Q_clamp(updaterate, 1, MAX_SERVER_UPDATERATE); + m_UpdateRate = clamp(updaterate, MIN_SERVER_UPDATERATE, MAX_SERVER_UPDATERATE); SetUserInfo("cl_updaterate", COM_VarArgs("%i", m_UpdateRate)); } diff --git a/rehlds/HLTV/Core/src/Server.h b/rehlds/HLTV/Core/src/Server.h index 4282f53..25b2fec 100644 --- a/rehlds/HLTV/Core/src/Server.h +++ b/rehlds/HLTV/Core/src/Server.h @@ -39,8 +39,16 @@ class IFileSystem; class NetPacket; class INetSocket; -#define MAX_SERVER_RATE 20000 -#define MAX_SERVER_UPDATERATE 100 +#ifdef HLTV_FIXES +const int MAX_SERVER_RATE = 100000; +#else +const int MAX_SERVER_RATE = 20000; +#endif + +const int MIN_SERVER_RATE = 1000; + +const int MAX_SERVER_UPDATERATE = 100; +const int MIN_SERVER_UPDATERATE = 1; #define TE_MAX 128