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

@@ -57,14 +57,12 @@ class Command_ShutdownServer;
class Server_ProtocolHandler : public QObject, public Server_AbstractUserInterface {
Q_OBJECT
protected:
QMap<int, QPair<int, int> > games; // gameId -> (roomId, playerId)
QMap<int, Server_Room *> rooms;
AuthenticationResult authState;
bool acceptsUserListChanges;
bool acceptsRoomListChanges;
private:
QMutex gameListMutex;
QList<int> messageSizeOverTime, messageCountOverTime;
int timeRunning, lastDataReceived;
@@ -113,8 +111,6 @@ public slots:
public:
Server_ProtocolHandler(Server *_server, QObject *parent = 0);
~Server_ProtocolHandler();
void playerRemovedFromGame(Server_Game *game);
void playerAddedToGame(int gameId, int roomId, int playerId);
bool getAcceptsUserListChanges() const { return acceptsUserListChanges; }
bool getAcceptsRoomListChanges() const { return acceptsRoomListChanges; }