mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix AFK being shown only for a split second when timing out
This commit is contained in:
parent
32e585b453
commit
64a70ac7a7
|
@ -210,6 +210,8 @@ void CPlayer::Tick()
|
|||
if(Server()->GetNetErrorString(m_ClientID)[0])
|
||||
{
|
||||
SetAfk(true);
|
||||
// Ensure that the AFK state is not reset again automatically
|
||||
m_LastPlaytime = time_get() - time_freq() * g_Config.m_SvMaxAfkTime - 1;
|
||||
|
||||
char aBuf[512];
|
||||
str_format(aBuf, sizeof(aBuf), "'%s' would have timed out, but can use timeout protection now", Server()->ClientName(m_ClientID));
|
||||
|
|
Loading…
Reference in a new issue