mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
servatrice: create correct game ids when not using a database
This commit is contained in:
parent
c8852b450d
commit
a1e35ccda5
5 changed files with 11 additions and 8 deletions
|
|
@ -61,6 +61,7 @@ public:
|
|||
virtual bool getThreaded() const { return false; }
|
||||
|
||||
Server_DatabaseInterface *getDatabaseInterface() const;
|
||||
int getNextLocalGameId() { QMutexLocker locker(&nextLocalGameIdMutex); return ++nextLocalGameId; }
|
||||
virtual void storeGameInformation(int secondsElapsed, const QSet<QString> &allPlayersEver, const QSet<QString> &allSpectatorsEver, const QList<GameReplay *> &replays) { }
|
||||
|
||||
void sendIsl_Response(const Response &item, int serverId = -1, qint64 sessionId = -1);
|
||||
|
|
@ -81,6 +82,8 @@ private:
|
|||
bool threaded;
|
||||
QMultiMap<QString, PlayerReference> persistentPlayers;
|
||||
mutable QReadWriteLock persistentPlayersLock;
|
||||
int nextLocalGameId;
|
||||
QMutex nextLocalGameIdMutex;
|
||||
protected slots:
|
||||
void externalUserJoined(const ServerInfo_User &userInfo);
|
||||
void externalUserLeft(const QString &userName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue