Fixed elevation of spectator rights; added some spectator options; closes bug 0000005

This commit is contained in:
Max-Wilhelm Bruker
2010-05-26 21:36:54 +02:00
parent 604d1ffa94
commit befafa28ae
26 changed files with 430 additions and 220 deletions

View File

@@ -32,9 +32,9 @@ Server::~Server()
{
}
Server_Game *Server::createGame(const QString &description, const QString &password, int maxPlayers, bool spectatorsAllowed, Server_ProtocolHandler *creator)
Server_Game *Server::createGame(const QString &description, const QString &password, int maxPlayers, bool spectatorsAllowed, bool spectatorsNeedPassword, bool spectatorsCanTalk, bool spectatorsSeeEverything, Server_ProtocolHandler *creator)
{
Server_Game *newGame = new Server_Game(creator, nextGameId++, description, password, maxPlayers, spectatorsAllowed, this);
Server_Game *newGame = new Server_Game(creator, nextGameId++, description, password, maxPlayers, spectatorsAllowed, spectatorsNeedPassword, spectatorsCanTalk, spectatorsSeeEverything, this);
games.insert(newGame->getGameId(), newGame);
connect(newGame, SIGNAL(gameClosing()), this, SLOT(gameClosing()));
@@ -84,6 +84,7 @@ void Server::broadcastGameListUpdate(Server_Game *game)
game->getMaxPlayers(),
game->getCreatorName(),
game->getSpectatorsAllowed(),
game->getSpectatorsNeedPassword(),
game->getSpectatorCount()
));
else