mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
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:
parent
8412d2be6e
commit
830e8fea8c
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue