Show and update admin player of a game even when in lobby and not in the game.
This commit is contained in:
@@ -42,7 +42,8 @@ class Game;
|
||||
class ServerGameThread : public Thread
|
||||
{
|
||||
public:
|
||||
ServerGameThread(ServerLobbyThread &lobbyThread, u_int32_t id, const std::string &name, const std::string &pwd, GuiInterface &gui, ConfigFile *playerConfig);
|
||||
ServerGameThread(
|
||||
ServerLobbyThread &lobbyThread, u_int32_t id, const std::string &name, const std::string &pwd, unsigned adminPlayerId, GuiInterface &gui, ConfigFile *playerConfig);
|
||||
virtual ~ServerGameThread();
|
||||
|
||||
void Init(const GameData &gameData);
|
||||
@@ -68,6 +69,9 @@ public:
|
||||
|
||||
bool IsRunning() const;
|
||||
|
||||
unsigned GetAdminPlayerId() const;
|
||||
void SetAdminPlayerId(unsigned playerId);
|
||||
|
||||
// should be protected, but is needed in function.
|
||||
const Game &GetGame() const;
|
||||
Game &GetGame();
|
||||
@@ -127,6 +131,9 @@ private:
|
||||
PlayerDataList m_computerPlayerList;
|
||||
mutable boost::mutex m_computerPlayerListMutex;
|
||||
|
||||
unsigned m_adminPlayerId;
|
||||
mutable boost::mutex m_adminPlayerIdMutex;
|
||||
|
||||
ServerLobbyThread &m_lobbyThread;
|
||||
std::auto_ptr<ReceiverHelper> m_receiver;
|
||||
std::auto_ptr<SenderThread> m_sender;
|
||||
|
||||
Reference in New Issue
Block a user