When a player leaves, check if we're ready to start
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4268 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
11694b93a9
commit
363849fd24
@ -821,6 +821,19 @@ bool KartSelectionScreen::playerQuit(ActivePlayer* player)
|
||||
Widget* fullarea = this->getWidget("playerskarts");
|
||||
removedWidget->move( removedWidget->x + removedWidget->w/2, fullarea->y + fullarea->h, 0, 0);
|
||||
|
||||
// check if all players are ready
|
||||
bool allPlayersReady = true;
|
||||
const int amount = m_kart_widgets.size();
|
||||
for (int n=0; n<amount; n++)
|
||||
{
|
||||
if (!m_kart_widgets[n].isReady())
|
||||
{
|
||||
allPlayersReady = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (allPlayersReady) allPlayersDone();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user