mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 07:10:25 -08:00
improved packet loss handling
This commit is contained in:
@@ -58,7 +58,6 @@ void Server_Game::pingClockTimeout()
|
||||
{
|
||||
++secondsElapsed;
|
||||
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
QList<ServerInfo_PlayerPing *> pingList;
|
||||
QMapIterator<int, Server_Player *> playerIterator(players);
|
||||
bool allPlayersInactive = true;
|
||||
@@ -66,7 +65,7 @@ void Server_Game::pingClockTimeout()
|
||||
Server_Player *player = playerIterator.next().value();
|
||||
int pingTime;
|
||||
if (player->getProtocolHandler()) {
|
||||
pingTime = player->getProtocolHandler()->getLastCommandTime().secsTo(now);
|
||||
pingTime = player->getProtocolHandler()->getLastCommandTime();
|
||||
allPlayersInactive = false;
|
||||
} else
|
||||
pingTime = -1;
|
||||
|
||||
Reference in New Issue
Block a user