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:
lotodore
2007-09-29 22:50:57 +00:00
parent 27b82a4260
commit 879cac4bbc
5 changed files with 27 additions and 15 deletions
+8 -2
View File
@@ -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)
{