create additional class for server time delay; remove define NEW_LOCAL_GAME

This commit is contained in:
floty
2014-07-27 18:09:19 +02:00
parent 304eac07a3
commit 015d6b7c72
11 changed files with 152 additions and 117 deletions
+8 -2
View File
@@ -66,13 +66,13 @@ static bool LessThanPlayerHandStartMoney(const boost::shared_ptr<PlayerInterface
ServerGame::ServerGame(boost::shared_ptr<ServerLobbyThread> lobbyThread, u_int32_t id, const string &name, const string &pwd, const GameData &gameData,
unsigned adminPlayerId, unsigned creatorPlayerDBId, GuiInterface &gui, ConfigFile &playerConfig)
unsigned adminPlayerId, unsigned creatorPlayerDBId, GuiInterface &gui, ConfigFile &playerConfig, const ServerMode mode)
: m_adminPlayerId(adminPlayerId), m_lobbyThread(lobbyThread), m_gui(gui),
m_gameData(gameData), m_curState(NULL), m_id(id), m_name(name),
m_password(pwd), m_creatorPlayerDBId(creatorPlayerDBId), m_playerConfig(playerConfig),
m_gameNum(1), m_curPetitionId(1), m_voteKickTimer(lobbyThread->GetIOService()),
m_stateTimer1(lobbyThread->GetIOService()), m_stateTimer2(lobbyThread->GetIOService()),
m_isNameReported(false)
m_isNameReported(false), m_serverDelayTime(mode)
{
LOG_VERBOSE("Game object " << GetId() << " created.");
}
@@ -1042,6 +1042,12 @@ ServerGame::GetSessionManager() const
return m_sessionManager;
}
const ServerDelayTime
ServerGame::GetServerDelayTime() const
{
return m_serverDelayTime;
}
ServerDBInterface &
ServerGame::GetDatabase()
{