Clear player chosen kart each race if not grand prix
This commit is contained in:
parent
114dca1733
commit
e5aa172d00
@ -130,12 +130,17 @@ ServerLobby::~ServerLobby()
|
|||||||
void ServerLobby::setup()
|
void ServerLobby::setup()
|
||||||
{
|
{
|
||||||
LobbyProtocol::setup();
|
LobbyProtocol::setup();
|
||||||
|
auto players = m_game_setup->getConnectedPlayers();
|
||||||
if (m_game_setup->isGrandPrix() && !m_game_setup->isGrandPrixStarted())
|
if (m_game_setup->isGrandPrix() && !m_game_setup->isGrandPrixStarted())
|
||||||
{
|
{
|
||||||
auto players = m_game_setup->getConnectedPlayers();
|
|
||||||
for (auto player : players)
|
for (auto player : players)
|
||||||
player->resetGrandPrixData();
|
player->resetGrandPrixData();
|
||||||
}
|
}
|
||||||
|
if (!m_game_setup->isGrandPrix() || !m_game_setup->isGrandPrixStarted())
|
||||||
|
{
|
||||||
|
for (auto player : players)
|
||||||
|
player->setKartName("");
|
||||||
|
}
|
||||||
|
|
||||||
StateManager::get()->resetActivePlayers();
|
StateManager::get()->resetActivePlayers();
|
||||||
// We use maximum 16bit unsigned limit
|
// We use maximum 16bit unsigned limit
|
||||||
|
Loading…
Reference in New Issue
Block a user