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.
This commit is contained in:
Robert Müller 2024-03-31 11:17:24 +02:00
parent 8412d2be6e
commit 830e8fea8c

View file

@ -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';