mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 07:10:25 -08:00
changed a lot of thread locking code in the server, rooms are working with ISL now
This commit is contained in:
@@ -88,11 +88,9 @@ class Command_ShutdownServer;
|
||||
class Server_ProtocolHandler : public QObject, public Server_AbstractUserInterface {
|
||||
Q_OBJECT
|
||||
protected:
|
||||
QMap<int, QPair<Server_Game *, Server_Player *> > games;
|
||||
QMap<int, QPair<int, int> > games; // gameId -> (roomId, playerId)
|
||||
QMap<int, Server_Room *> rooms;
|
||||
|
||||
QPair<Server_Game *, Server_Player *> getGame(int gameId) const;
|
||||
|
||||
AuthenticationResult authState;
|
||||
bool acceptsUserListChanges;
|
||||
bool acceptsRoomListChanges;
|
||||
@@ -100,6 +98,8 @@ protected:
|
||||
void prepareDestroy();
|
||||
int sessionId;
|
||||
private:
|
||||
QMutex gameListMutex;
|
||||
|
||||
QList<int> messageSizeOverTime, messageCountOverTime;
|
||||
int timeRunning, lastDataReceived;
|
||||
QTimer *pingClock;
|
||||
@@ -175,8 +175,6 @@ private slots:
|
||||
signals:
|
||||
void logDebugMessage(const QString &message, Server_ProtocolHandler *session);
|
||||
public:
|
||||
QMutex gameListMutex;
|
||||
|
||||
Server_ProtocolHandler(Server *_server, QObject *parent = 0);
|
||||
~Server_ProtocolHandler();
|
||||
void playerRemovedFromGame(Server_Game *game);
|
||||
|
||||
Reference in New Issue
Block a user