Created
October 14, 2020 14:25
-
-
Save ProdigySim/73c9d1d5b13c42c4585068034d32822b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CGameclient::ExecuteStringcommand() { | |
double now = getRealTime(); | |
int maxCmdsPerSecond = sv_quota_stringcmdspersecond->GetInt(); | |
if ( now - this->m_dLastCmdTime < 1.0 ) | |
{ | |
this->m_cmdQuotaCount = this->m_cmdQuotaCount + 1; | |
} | |
else | |
{ | |
this->m_dLastCmdTime = now; | |
this->m_cmdQuotaCount = 1; | |
} | |
if ( maxCmdsPerSecond < this->m_cmdQuotaCount ) { | |
// Disconnected: Issued too many commands" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment