mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Engine: flip order of checks
Check for cvar or state first before checking the current thread. The cvar/state check is slightly cheaper.
This commit is contained in:
parent
728038b9b1
commit
3c5a1a1203
@ -562,7 +562,7 @@ void Cmd_Exec_f(const CCommand& args)
|
||||
// Prevent users from running neo strafe commands and other quick hacks.
|
||||
// TODO: when reBar becomes a thing, we should verify this function and
|
||||
// flag users that patch them out.
|
||||
if (!ThreadInServerFrameThread() && g_pClientState->IsActive())
|
||||
if (g_pClientState->IsActive() && !ThreadInServerFrameThread())
|
||||
{
|
||||
const int execQuota = sv_quota_scriptExecsPerSecond.GetInt();
|
||||
|
||||
|
@ -372,7 +372,7 @@ void CNetChan::_Shutdown(CNetChan* pChan, const char* szReason, uint8_t bBadRep,
|
||||
bool CNetChan::_ProcessMessages(CNetChan* pChan, bf_read* pBuf)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
if (!ThreadInServerFrameThread() || !net_processTimeBudget.GetInt())
|
||||
if (!net_processTimeBudget.GetInt() || !ThreadInServerFrameThread())
|
||||
return pChan->ProcessMessages(pBuf);
|
||||
|
||||
const double flStartTime = Plat_FloatTime();
|
||||
|
Loading…
x
Reference in New Issue
Block a user