Don't use runningPlayerLists in server, as all in players are not in these lists. Fixed game state in lobby for players joining after a game started.
This commit is contained in:
@@ -158,8 +158,6 @@ ServerGameThread::Main()
|
||||
void
|
||||
ServerGameThread::InternalStartGame()
|
||||
{
|
||||
GetLobbyThread().NotifyStartingGame(GetId());
|
||||
|
||||
// Set order of players.
|
||||
AssignPlayerNumbers();
|
||||
|
||||
@@ -196,6 +194,8 @@ ServerGameThread::InternalStartGame()
|
||||
SetStartData(startData);
|
||||
|
||||
m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum()));
|
||||
|
||||
GetLobbyThread().NotifyStartingGame(GetId());
|
||||
}
|
||||
|
||||
void
|
||||
@@ -264,6 +264,12 @@ ServerGameThread::IsPlayerConnected(const std::string &name) const
|
||||
return GetSessionManager().IsPlayerConnected(name);
|
||||
}
|
||||
|
||||
bool
|
||||
ServerGameThread::IsRunning() const
|
||||
{
|
||||
return m_game.get() != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
ServerGameThread::AddComputerPlayer(boost::shared_ptr<PlayerData> player)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user