handle maximum number of players in kart selection screen
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4912 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -859,6 +859,13 @@ bool KartSelectionScreen::playerJoin(InputDevice* device, bool firstPlayer)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (StateManager::get()->activePlayerCount() >= MAX_PLAYER_COUNT)
|
||||
{
|
||||
std::cerr << "Maximum number of players reached\n";
|
||||
sfx_manager->quickSound( "use_anvil" );
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---- Get available area for karts
|
||||
// make a copy of the area, ands move it to be outside the screen
|
||||
Widget kartsArea = *this->getWidget("playerskarts"); // copy
|
||||
|
||||
Reference in New Issue
Block a user