From 830e8fea8c7bfade831dea231681d84b5e1b1b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 31 Mar 2024 11:17:24 +0200 Subject: [PATCH] Fix rcon username not reset when disconnecting while connecting The rcon username requirement was not reset correctly when disconnecting from a server while connecting/loading, at which point the `NETMSG_RCONTYPE` message has already been received. Closes #4170. --- src/game/client/components/console.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index e1dad91ff..0805f4c5c 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -1498,7 +1498,7 @@ void CGameConsole::OnInit() void CGameConsole::OnStateChange(int NewState, int OldState) { - if(OldState == IClient::STATE_ONLINE && NewState < IClient::STATE_LOADING) + if(OldState <= IClient::STATE_ONLINE && NewState == IClient::STATE_OFFLINE) { m_RemoteConsole.m_UserGot = false; m_RemoteConsole.m_aUser[0] = '\0';