mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
everything compiles again; enough for today
This commit is contained in:
parent
dd5ae4d74d
commit
cb0e4d07e4
29 changed files with 340 additions and 766 deletions
|
|
@ -77,17 +77,17 @@ void Server_Game::startGameIfReady()
|
|||
setActivePlayer(0);
|
||||
}
|
||||
|
||||
ProtocolResponse::ResponseCode Server_Game::checkJoin(const QString &_password, bool spectator)
|
||||
ResponseCode Server_Game::checkJoin(const QString &_password, bool spectator)
|
||||
{
|
||||
if (_password != password)
|
||||
return ProtocolResponse::RespWrongPassword;
|
||||
return RespWrongPassword;
|
||||
if (spectator) {
|
||||
if (!spectatorsAllowed)
|
||||
return ProtocolResponse::RespSpectatorsNotAllowed;
|
||||
return RespSpectatorsNotAllowed;
|
||||
} else if (gameStarted || (getPlayerCount() >= getMaxPlayers()))
|
||||
return ProtocolResponse::RespContextError;
|
||||
return RespContextError;
|
||||
|
||||
return ProtocolResponse::RespOk;
|
||||
return RespOk;
|
||||
}
|
||||
|
||||
Server_Player *Server_Game::addPlayer(Server_ProtocolHandler *handler, bool spectator)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue