Also check ranking game restrictions on server.

This commit is contained in:
lotodore committed 2010-08-01 20:15:49 +00:00
1 parent 002defcead
commit 9e039182ec
7 files changed
+44 -7

No files matched your search

+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);
}