mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Flag afk when player timed-out
This commit is contained in:
parent
8239836a02
commit
fabc194081
|
@ -220,6 +220,8 @@ void CPlayer::Tick()
|
||||||
|
|
||||||
if(Server()->GetNetErrorString(m_ClientID)[0])
|
if(Server()->GetNetErrorString(m_ClientID)[0])
|
||||||
{
|
{
|
||||||
|
m_Afk = true;
|
||||||
|
|
||||||
char aBuf[512];
|
char aBuf[512];
|
||||||
str_format(aBuf, sizeof(aBuf), "'%s' would have timed out, but can use timeout protection now", Server()->ClientName(m_ClientID));
|
str_format(aBuf, sizeof(aBuf), "'%s' would have timed out, but can use timeout protection now", Server()->ClientName(m_ClientID));
|
||||||
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf);
|
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf);
|
||||||
|
|
Loading…
Reference in a new issue