2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-28 15:45:46 +03:00

HLTV-Core: Increased rates threshold

This commit is contained in:
s1lent 2019-08-11 23:26:14 +07:00
parent 2713dfaae2
commit 5b6856876e
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
2 changed files with 12 additions and 4 deletions

View File

@ -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));
}

View File

@ -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