Update player list if state changes to WAITING_FOR_START_GAME (#4685)

This commit is contained in:
STK-Waldlaubsaengernest 2021-12-06 23:21:50 +01:00
parent 97eb45b93b
commit a0cc6c95c2

View File

@ -1451,6 +1451,7 @@ void ServerLobby::asynchronousUpdate()
if (NetworkConfig::get()->isLAN()) if (NetworkConfig::get()->isLAN())
{ {
m_state = WAITING_FOR_START_GAME; m_state = WAITING_FOR_START_GAME;
updatePlayerList();
STKHost::get()->startListening(); STKHost::get()->startListening();
return; return;
} }
@ -1482,6 +1483,7 @@ void ServerLobby::asynchronousUpdate()
if (m_game_setup->isGrandPrixStarted() || m_registered_for_once_only) if (m_game_setup->isGrandPrixStarted() || m_registered_for_once_only)
{ {
m_state = WAITING_FOR_START_GAME; m_state = WAITING_FOR_START_GAME;
updatePlayerList();
break; break;
} }
// Register this server with the STK server. This will block // Register this server with the STK server. This will block
@ -1500,6 +1502,7 @@ void ServerLobby::asynchronousUpdate()
if (allowJoinedPlayersWaiting()) if (allowJoinedPlayersWaiting())
m_registered_for_once_only = true; m_registered_for_once_only = true;
m_state = WAITING_FOR_START_GAME; m_state = WAITING_FOR_START_GAME;
updatePlayerList();
} }
} }
break; break;
@ -4775,6 +4778,7 @@ void ServerLobby::resetServer()
setup(); setup();
m_state = NetworkConfig::get()->isLAN() ? m_state = NetworkConfig::get()->isLAN() ?
WAITING_FOR_START_GAME : REGISTER_SELF_ADDRESS; WAITING_FOR_START_GAME : REGISTER_SELF_ADDRESS;
updatePlayerList();
} // resetServer } // resetServer
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------