Also check ranking game restrictions on server.

This commit is contained in:
lotodore
2010-08-01 20:15:49 +00:00
parent 002defcead
commit 9e039182ec
7 changed files with 44 additions and 7 deletions
+4 -1
View File
@@ -498,7 +498,10 @@ ServerGameStateInit::InternalProcessPacket(boost::shared_ptr<ServerGame> server,
{
StartEventMessage_t *netStartEvent = &packet->GetMsg()->choice.startEventMessage;
// Only admins are allowed to start the game.
if (session.playerData->IsGameAdmin() && netStartEvent->gameId == server->GetId())
if (session.playerData->IsGameAdmin()
&& netStartEvent->gameId == server->GetId()
&& (server->GetGameData().gameType != GAME_TYPE_RANKING // ranking games need to be full
|| server->GetGameData().maxNumberOfPlayers == server->GetCurNumberOfPlayers()))
{
SendStartEvent(*server, netStartEvent->fillWithComputerPlayers);
}