Merge branch 'master' into login-error-fix

This commit is contained in:
Kevin Boxhoorn 2016-10-06 20:39:46 +11:00 committed by GitHub
commit 000f6ea2c0
3 changed files with 7 additions and 3 deletions

View file

@ -100,6 +100,8 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
{ {
loadLocalButton = new QPushButton; loadLocalButton = new QPushButton;
loadRemoteButton = new QPushButton; loadRemoteButton = new QPushButton;
if (parentGame->getIsLocalGame())
loadRemoteButton->setEnabled(false);
readyStartButton = new ToggleButton; readyStartButton = new ToggleButton;
readyStartButton->setEnabled(false); readyStartButton->setEnabled(false);
sideboardLockButton = new ToggleButton; sideboardLockButton = new ToggleButton;
@ -307,6 +309,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
secondsElapsed(0), secondsElapsed(0),
hostId(-1), hostId(-1),
localPlayerId(-1), localPlayerId(-1),
isLocalGame(_tabSupervisor->getIsLocalGame()),
spectator(true), spectator(true),
gameStateKnown(false), gameStateKnown(false),
resuming(false), resuming(false),
@ -375,6 +378,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
roomGameTypes(_roomGameTypes), roomGameTypes(_roomGameTypes),
hostId(event.host_id()), hostId(event.host_id()),
localPlayerId(event.player_id()), localPlayerId(event.player_id()),
isLocalGame(_tabSupervisor->getIsLocalGame()),
spectator(event.spectator()), spectator(event.spectator()),
gameStateKnown(false), gameStateKnown(false),
resuming(event.resuming()), resuming(event.resuming()),

View file

@ -111,6 +111,7 @@ private:
QMap<int, QString> roomGameTypes; QMap<int, QString> roomGameTypes;
int hostId; int hostId;
int localPlayerId; int localPlayerId;
const 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; }

View file

@ -3,8 +3,6 @@
if [[ $TRAVIS_OS_NAME == "osx" ]] ; then if [[ $TRAVIS_OS_NAME == "osx" ]] ; then
brew update > /dev/null brew update > /dev/null
brew install qt5 protobuf > /dev/null brew install qt5 protobuf > /dev/null
brew unlink cmake
brew upgrade cmake
else else
# common prerequisites # common prerequisites
sudo add-apt-repository -y ppa:smspillaz/cmake-master sudo add-apt-repository -y ppa:smspillaz/cmake-master
@ -29,4 +27,4 @@ else
sudo ln -s /usr/src/gtest/build/libgtest_main.so /usr/lib/libgtest_main.so sudo ln -s /usr/src/gtest/build/libgtest_main.so /usr/lib/libgtest_main.so
cd - cd -
fi fi
fi fi