mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
server shouldn't update client ping in local games
This commit is contained in:
parent
62bf2572a9
commit
daf1fa18aa
5 changed files with 11 additions and 5 deletions
|
|
@ -27,14 +27,16 @@
|
|||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
Server_Game::Server_Game(Server_ProtocolHandler *_creator, int _gameId, const QString &_description, const QString &_password, int _maxPlayers, bool _spectatorsAllowed, bool _spectatorsNeedPassword, bool _spectatorsCanTalk, bool _spectatorsSeeEverything, QObject *parent)
|
||||
Server_Game::Server_Game(Server_ProtocolHandler *_creator, int _gameId, const QString &_description, const QString &_password, int _maxPlayers, bool _spectatorsAllowed, bool _spectatorsNeedPassword, bool _spectatorsCanTalk, bool _spectatorsSeeEverything, Server *parent)
|
||||
: QObject(parent), gameStarted(false), gameId(_gameId), description(_description), password(_password), maxPlayers(_maxPlayers), activePlayer(-1), activePhase(-1), spectatorsAllowed(_spectatorsAllowed), spectatorsNeedPassword(_spectatorsNeedPassword), spectatorsCanTalk(_spectatorsCanTalk), spectatorsSeeEverything(_spectatorsSeeEverything), inactivityCounter(0)
|
||||
{
|
||||
creator = addPlayer(_creator, false, false);
|
||||
|
||||
pingClock = new QTimer(this);
|
||||
connect(pingClock, SIGNAL(timeout()), this, SLOT(pingClockTimeout()));
|
||||
pingClock->start(1000);
|
||||
if (parent->getGameShouldPing()) {
|
||||
pingClock = new QTimer(this);
|
||||
connect(pingClock, SIGNAL(timeout()), this, SLOT(pingClockTimeout()));
|
||||
pingClock->start(1000);
|
||||
}
|
||||
}
|
||||
|
||||
Server_Game::~Server_Game()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue