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
+5 -14
View File
@@ -39,6 +39,7 @@
#include <map>
#include <net/sessionmanager.h>
#include <net/serverdelaytime.h>
#include <db/serverdbcallback.h>
#include <gui/guiinterface.h>
#include <gamedata.h>
@@ -57,7 +58,7 @@ class ServerGame : public boost::enable_shared_from_this<ServerGame>
public:
ServerGame(
boost::shared_ptr<ServerLobbyThread> lobbyThread, u_int32_t id, const std::string &name, const std::string &pwd, const GameData &gameData,
unsigned adminPlayerId, unsigned creatorPlayerDBId, GuiInterface &gui, ConfigFile &playerConfig);
unsigned adminPlayerId, unsigned creatorPlayerDBId, GuiInterface &gui, ConfigFile &playerConfig, const ServerMode mode);
virtual ~ServerGame();
void Init();
@@ -126,15 +127,6 @@ public:
void KickPlayer(unsigned playerId);
#ifdef NEW_LOCAL_GAME
bool getLanLocal() {
return lan_local;
}
void setLanLocal(bool theValue) {
lan_local = theValue;
}
#endif
protected:
struct RankingData {
@@ -200,6 +192,7 @@ protected:
const SessionManager &GetSessionManager() const;
SessionManager &GetSessionManager();
ServerDBInterface &GetDatabase();
const ServerDelayTime GetServerDelayTime() const;
private:
ServerGame(const ServerGame &other);
@@ -235,6 +228,8 @@ private:
boost::shared_ptr<ServerDBInterface> m_database;
GuiInterface &m_gui;
ServerDelayTime m_serverDelayTime;
const GameData m_gameData;
StartData m_startData;
boost::shared_ptr<Game> m_game;
@@ -262,10 +257,6 @@ private:
friend class ServerGameStateWaitPlayerAction;
friend class ServerGameStateWaitNextHand;
#ifdef NEW_LOCAL_GAME
bool lan_local;
#endif
};
#endif