update ping time on any packet, not just ping packets, for now

This commit is contained in:
Lion Kortlepel
2021-03-30 15:31:04 +02:00
parent 61726ea3ab
commit 1875c8832d
2 changed files with 7 additions and 5 deletions

View File

@@ -37,12 +37,13 @@ void TPPSMonitor::operator()() {
C++;
V += c->GetCarCount();
}
// kick on "no ping"
if (c->SecondsSinceLastPing() > 10 && c->IsSynced()) {
TimedOutClients.push_back(c);
} else if (!c->IsSynced()) {
if (!c->IsSynced() || c->IsSyncing()) {
c->UpdatePingTime();
}
// kick on "no ping"
if (c->SecondsSinceLastPing() > 10 && c->IsSynced() && !c->IsSyncing()) {
TimedOutClients.push_back(c);
}
}
return true;
});