Add getIsLocalGame
to TabGame
This commit is contained in:
parent
a7a0ea23ca
commit
2a7fc827f4
2 changed files with 6 additions and 2 deletions
|
@ -316,7 +316,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
|
||||||
replay(_replay),
|
replay(_replay),
|
||||||
currentReplayStep(0),
|
currentReplayStep(0),
|
||||||
sayLabel(0),
|
sayLabel(0),
|
||||||
sayEdit(0)
|
sayEdit(0),
|
||||||
|
isLocalGame(_tabSupervisor->getIsLocalGame())
|
||||||
{
|
{
|
||||||
// THIS CTOR IS USED ON REPLAY
|
// THIS CTOR IS USED ON REPLAY
|
||||||
gameInfo.CopyFrom(replay->game_info());
|
gameInfo.CopyFrom(replay->game_info());
|
||||||
|
@ -382,7 +383,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
|
||||||
activeCard(0),
|
activeCard(0),
|
||||||
gameClosed(false),
|
gameClosed(false),
|
||||||
replay(0),
|
replay(0),
|
||||||
replayDock(0)
|
replayDock(0),
|
||||||
|
isLocalGame(_tabSupervisor->getIsLocalGame())
|
||||||
{
|
{
|
||||||
// THIS CTOR IS USED ON GAMES
|
// THIS CTOR IS USED ON GAMES
|
||||||
gameInfo.set_started(false);
|
gameInfo.set_started(false);
|
||||||
|
|
|
@ -111,6 +111,7 @@ private:
|
||||||
QMap<int, QString> roomGameTypes;
|
QMap<int, QString> roomGameTypes;
|
||||||
int hostId;
|
int hostId;
|
||||||
int localPlayerId;
|
int localPlayerId;
|
||||||
|
bool isLocalGame;
|
||||||
bool spectator;
|
bool spectator;
|
||||||
QMap<int, Player *> players;
|
QMap<int, Player *> players;
|
||||||
QMap<int, ServerInfo_User> spectators;
|
QMap<int, ServerInfo_User> spectators;
|
||||||
|
@ -238,6 +239,7 @@ public:
|
||||||
const QMap<int, Player *> &getPlayers() const { return players; }
|
const QMap<int, Player *> &getPlayers() const { return players; }
|
||||||
CardItem *getCard(int playerId, const QString &zoneName, int cardId) const;
|
CardItem *getCard(int playerId, const QString &zoneName, int cardId) const;
|
||||||
bool isHost() const { return hostId == localPlayerId; }
|
bool isHost() const { return hostId == localPlayerId; }
|
||||||
|
bool getIsLocalGame() const { return isLocalGame; }
|
||||||
int getGameId() const { return gameInfo.game_id(); }
|
int getGameId() const { return gameInfo.game_id(); }
|
||||||
QString getTabText() const;
|
QString getTabText() const;
|
||||||
bool getSpectator() const { return spectator; }
|
bool getSpectator() const { return spectator; }
|
||||||
|
|
Loading…
Reference in a new issue