The console server can now be fully used for a single game. The first player to join the game is admin, he can start the game and kick players.
However, if the admin player leaves, a new game can only be started if all players have left before (this is a bug, admin status should be passed to another player).
This commit is contained in:
@@ -57,26 +57,6 @@ ServerThread::Init(unsigned serverPort, bool ipv6, bool sctp, const std::string
|
||||
GetRecvThread().Init(pwd, gameData);
|
||||
}
|
||||
|
||||
void
|
||||
ServerThread::StartGame()
|
||||
{
|
||||
if (!IsRunning())
|
||||
return; // TODO: throw exception
|
||||
|
||||
// Thread-safe notification.
|
||||
GetRecvThread().AddNotification(NOTIFY_GAME_START, "");
|
||||
}
|
||||
|
||||
void
|
||||
ServerThread::KickPlayer(const string &playerName)
|
||||
{
|
||||
if (!IsRunning())
|
||||
return; // TODO: throw exception
|
||||
|
||||
// Thread-safe notification.
|
||||
GetRecvThread().AddNotification(NOTIFY_KICK_PLAYER, playerName);
|
||||
}
|
||||
|
||||
ServerCallback &
|
||||
ServerThread::GetCallback()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user