mirror of
https://github.com/rehlds/rehlds.git
synced 2025-03-31 22:59:06 +03:00
Fix setting delay to zero when connection active breaking server logic.
This commit is contained in:
parent
0178d74f42
commit
da9a5b05ab
@ -360,15 +360,12 @@ void Proxy::RunFrame(double time)
|
||||
m_System->RemoveModule((ISystemModule*)oldWorld);
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
{
|
||||
if (m_Server->IsConnected()) {
|
||||
m_Server->Reconnect();
|
||||
}
|
||||
|
||||
#ifdef HLTV_FIXES
|
||||
}
|
||||
#endif
|
||||
m_IsReconnectRequested = true;
|
||||
}
|
||||
}
|
||||
@ -2559,11 +2556,17 @@ void Proxy::SetDelay(float seconds)
|
||||
{
|
||||
m_ClientDelay = 0;
|
||||
m_World->SetBufferSize(10);
|
||||
#ifdef HLTV_FIXES
|
||||
m_Server->SetDelayReconnect(false);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
m_World->SetBufferSize(seconds + seconds);
|
||||
m_ClientWorldTime = m_World->GetTime() - m_ClientDelay;
|
||||
#ifdef HLTV_FIXES
|
||||
m_Server->SetDelayReconnect(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
m_Server->SetUserInfo("hdelay", COM_VarArgs("%u", (int)m_ClientDelay));
|
||||
|
Loading…
x
Reference in New Issue
Block a user