improved code for automatic joining of persistent games; disconnecting + reconnecting works as it should with ISL

This commit is contained in:
Max-Wilhelm Bruker 2012-03-18 21:57:21 +01:00
parent 5db0fcd6ae
commit af8e357487
13 changed files with 215 additions and 135 deletions

View file

@ -42,6 +42,7 @@ class Server_Game : public QObject {
Q_OBJECT
private:
Server_Room *room;
int nextPlayerId;
int hostId;
ServerInfo_User *creatorInfo;
QMap<int, Server_Player *> players;
@ -108,6 +109,7 @@ public:
void nextTurn();
int getSecondsElapsed() const { return secondsElapsed; }
void createGameJoinedEvent(Server_Player *player, ResponseContainer &rc, bool resuming);
void sendGameStateToPlayers();
QList<ServerInfo_Player> getGameState(Server_Player *playerWhosAsking, bool omniscient = false, bool withUserInfo = false) const;