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

This commit is contained in:
Lion Kortlepel committed 2021-03-30 15:31:44 +02:00
1 parent 61726ea3ab
commit 1875c8832d
2 files changed
+7 -5

No files matched your search

+5 -4
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;
});